dnl Process this file with autoconf to produce a configure script. AC_INIT(pxe.cc) AC_CONFIG_HEADER(autoconf.h) AC_PROG_CC AC_PROG_CPP AC_PROG_CXX dnl Checks for programs. dnl Checks for user options. dnl setuid? AC_MSG_CHECKING(if the daemon should setuid to a non-privilaged user) AC_ARG_ENABLE(setuid, [ --disable-setuid disable the setuid facility], [ AC_MSG_RESULT(no.) AC_DEFINE(NO_SUID) ], [ AC_MSG_RESULT(yes.) SETUID="\"nobody\"" AC_ARG_WITH(setuid, [ --with-setuid=user name of the user to setuid to], [ SETUID="\"${withval}\"" ]) AC_DEFINE_UNQUOTED(SETUID, $SETUID) ] ) dnl location of the config file AC_MSG_CHECKING(the location of the config file) PXECONFIGFILE="\"/etc/pxe.conf"\" AC_ARG_WITH(config, [ --with-config=file location of the pxe config file], [ PXECONFIGFILE="\"${withval}\"" ]) AC_MSG_RESULT($PXECONFIGFILE) AC_DEFINE_UNQUOTED(PXECONFIGFILE, $PXECONFIGFILE) dnl location of the config file AC_MSG_CHECKING(the location of the log file) PXELOGFILE="\"/tmp/pxe.log"\" AC_ARG_WITH(log, [ --with-log=file location of the pxe log file], [ PXELOGFILE="\"${withval}\"" ]) AC_MSG_RESULT($PXELOGFILE) AC_DEFINE_UNQUOTED(PXELOGFILE, $PXELOGFILE) dnl Checks for libraries. AC_HAVE_LIBRARY(socket) AC_HAVE_LIBRARY(nsl) AC_HAVE_LIBRARY(resolv) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h strings.h sys/ioctl.h sys/time.h unistd.h) AC_CHECK_HEADERS(sys/sockio.h stdint.h stropts.h ifaddrs.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL AC_CHECK_FUNCS(select socket strerror setsockopt getifaddrs hstrerror inet_aton) AC_OUTPUT(Makefile)