# # graphicboot - Provides graphical X Window startup to FreeBSD during 'rc'. # Copyright (C) 2005 Matthew Holder (sixxgate@hotmail.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $SixXGate: motifapps/graphicboot/configure.ac,v 1.5 2005/08/04 21:56:57 matthew Exp $ # AC_PREREQ(2.59) AC_INIT([FreeBSD Graphic Boot], 1.01, [http://matt.sixxgate.com/]) AC_CONFIG_SRCDIR([common.h]) AC_CONFIG_HEADER([config.h]) # Default settings AC_PREFIX_PROGRAM(X) AC_LANG(C) # Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PATH_PROG(RM, rm, no) AC_PROG_LN_S AC_PATH_PROGS(COMPRESSCMD, [gzip bzip2]. no) # Checks for libraries. # Checks for header files. AC_PATH_X AC_PATH_XTRA AC_HEADER_STDC AC_CHECK_HEADERS([time.h fcntl.h stdlib.h string.h sys/socket.h termios.h unistd.h pthread.h],,[AC_MSG_ERROR([[You are missing a required header, or you are not running FreeBSD]])]) # Find Program Paths AC_PATH_PROG(XLOADIMAGE, xloadimage, no) AC_PATH_PROG(XRDB, xrdb, no) AC_PATH_PROG(XSETROOT, xsetroot, no) # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_FUNC_FORK AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_CHECK_FUNCS([setenv socket]) AC_SEARCH_LIBS(pthread_create, [pthread thr c_r], [AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if you have a POSIX compatible thread library])], [AC_MSG_ERROR([I require a POSIX compatible thread library])] ) # ================================== # Custom library and header search # ================================== # MOTIF ---------------------------- AC_MSG_CHECKING([for Motif compatible libraries and headers]); sxg_cppflags="$CPPFLAGS" sxg_ldflags="$LDFLAGS" sxg_libs="$LIBS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" LDFLAGS="$X_LIBS $LDFLAGS" LIBS="-lXm $LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]],[[XmStringCreateLocalized("Hello World");]])], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR([[not found]])] ) CPPFLAGS="$sxg_cppflags" LDFLAGS="$sxg_ldflags" LIBS="$sxg_libs" X_EXTRA_LIBS="-lXm $X_EXTRA_LIBS" # mini-xml ------------------------- #AC_ARG_WITH([minixmlprefix], # AC_HELP_STRING( # [--with-minixmlprefix] # [The prefix to the mini-xml library] # ), # [minixmlprefix=$withval], # [minixmlprefix=no] #) # #test $minixmlprefix = no && minixmlprefix=$prefix # #AC_SUBST(minixmlprefix) # #AC_MSG_CHECKING([for mini-xml libraries and headers]); # #CPPFLAGS="-I${minixmlprefix}/include $CPPFLAGS" #LDFLAGS="-L${minixmlprefix}/lib $LDFLAGS" #LIBS="-lmxml $LIBS" #AC_LINK_IFELSE( # [AC_LANG_PROGRAM([[#include ]],[[mxmlLoadString(0,"Hello World", MXML_NO_CALLBACK);]])], # [AC_MSG_RESULT(yes)], # [AC_MSG_ERROR([[not found]])] #) # Now lests check for the required toolkits AC_CONFIG_FILES([Makefile]) AC_OUTPUT