[dhcp-agent-commits] dhcp-agent configure.ac,1.19,1.20
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2003-08-31 16:09:19
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv1153 Modified Files: configure.ac Log Message: better, clearer autoconf Index: configure.ac =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.ac,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** configure.ac 27 Jul 2003 00:57:28 -0000 1.19 --- configure.ac 31 Aug 2003 16:09:14 -0000 1.20 *************** *** 1,5 **** dnl $Header$ dnl ! dnl Second try at writing a more coherent configure script. dnl We've layed it out per the gnu autoconf manual dnl Please look at: --- 1,5 ---- dnl $Header$ dnl ! dnl Third try at writing a more coherent configure script. dnl We've layed it out per the gnu autoconf manual dnl Please look at: *************** *** 9,15 **** dnl -- tm...@wh... ! dnl dnl init ! dnl AC_PREREQ(2.57) --- 9,15 ---- dnl -- tm...@wh... ! dnl --------------------------------------------------------------------------- dnl init ! dnl --------------------------------------------------------------------------- AC_PREREQ(2.57) *************** *** 20,30 **** AC_LIBTOOL_TAGS([]) ! dnl ! dnl command line options ! dnl dnl fail-on-warning option for strict compilation FAIL_ON_WARNING="no" AC_ARG_ENABLE(fail-on-warning, AC_HELP_STRING([--enable-fail-on-warning], --- 20,34 ---- AC_LIBTOOL_TAGS([]) ! dnl --------------------------------------------------------------------------- ! dnl preset constants ! dnl --------------------------------------------------------------------------- dnl fail-on-warning option for strict compilation FAIL_ON_WARNING="no" + dnl --------------------------------------------------------------------------- + dnl command line options + dnl --------------------------------------------------------------------------- + AC_ARG_ENABLE(fail-on-warning, AC_HELP_STRING([--enable-fail-on-warning], *************** *** 60,66 **** AM_CONDITIONAL(HTMLDOC, test x$htmldoc = xtrue) - dnl allow user to pick where dhcp-agent does its work dnl check for CC, INSTALL, and sane make AC_PROG_CC --- 64,71 ---- AM_CONDITIONAL(HTMLDOC, test x$htmldoc = xtrue) + dnl --------------------------------------------------------------------------- dnl check for CC, INSTALL, and sane make + dnl --------------------------------------------------------------------------- AC_PROG_CC *************** *** 69,80 **** AC_PROG_LIBTOOL dnl check header files we should have AC_HEADER_STDC AC_CHECK_HEADERS(inttypes.h signal.h varargs.h stdarg.h sys/utsname.h getopt.h) ! dnl dnl check for types ! dnl AC_CHECK_TYPE(sig_atomic_t, [AC_DEFINE(HAVE_SIG_ATOMIC_T, 1, [have sigatomic_t])], [], [#include <signal.h>]) --- 74,87 ---- AC_PROG_LIBTOOL + dnl --------------------------------------------------------------------------- dnl check header files we should have + dnl --------------------------------------------------------------------------- AC_HEADER_STDC AC_CHECK_HEADERS(inttypes.h signal.h varargs.h stdarg.h sys/utsname.h getopt.h) ! dnl --------------------------------------------------------------------------- dnl check for types ! dnl --------------------------------------------------------------------------- AC_CHECK_TYPE(sig_atomic_t, [AC_DEFINE(HAVE_SIG_ATOMIC_T, 1, [have sigatomic_t])], [], [#include <signal.h>]) *************** *** 87,95 **** #include <net/bpf.h> ]) dnl try finding or generating our own C99 stdint macros ! AC_WF_TRY_PRI_MACROS ! if test "x$have_primacros" = "x"; then dnl this ought to work -- i think :-) --- 94,113 ---- #include <net/bpf.h> ]) + AC_TYPE_SIGNAL + dnl try finding or generating our own C99 stdint macros ! AC_MSG_CHECKING(for stdint conversion macros) ! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> ! #include <stdlib.h> ! #include <inttypes.h> ! ]],[[uint32_t t=1; printf("%"PRIu32, t);]])], ! [AC_MSG_RESULT(found); have_primacros="yes"], ! AC_MSG_RESULT(not found); have_primacros="no") ! ! if test "x$have_primacros" = "xno"; then ! ! echo "Generating our own stdint macros." dnl this ought to work -- i think :-) *************** *** 117,135 **** fi ! AC_TYPE_SIGNAL ! dnl check for functions AC_CHECK_FUNCS(strdup uname calloc daemon rename sysconf getrusage getprogname) dnl other checks ! dnl check if kill(pid, 0) can be used to detect a process ! ! AC_WF_CHECK_KILL_SIGNAL_DETECT ! dnl check for BPF_IMMEDIATE flag ! AC_WF_CHECK_BPF_IMMEDIATE dnl check for __progname --- 135,168 ---- fi ! dnl --------------------------------------------------------------------------- dnl check for functions + dnl --------------------------------------------------------------------------- AC_CHECK_FUNCS(strdup uname calloc daemon rename sysconf getrusage getprogname) + dnl --------------------------------------------------------------------------- dnl other checks + dnl --------------------------------------------------------------------------- ! dnl check for SO_BINDTODEVICE ! AC_MSG_CHECKING(SO_BINDTODEVICE) ! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> ! #include <stdlib.h> ! #include <sys/types.h> ! #include <sys/socket.h> ! ]], [[ ! char *dev = "foo0"; ! socklen_t len; ! setsockopt(0, SOL_SOCKET, SO_BINDTODEVICE, dev, len); ! ]])], [AC_MSG_RESULT(found) AC_DEFINE(HAVE_SO_BINDTODEVICE, 1, [have SO_BINDTODEVICE])], ! [AC_MSG_RESULT(not found)]) ! AC_MSG_CHECKING(BIOCIMMEDIATE) ! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> ! #include <stdlib.h> ! #include <pcap.h> ! ]], [[ ioctl(0, BIOCIMMEDIATE, NULL);]])],[AC_MSG_RESULT(found) ! AC_DEFINE(HAVE_BPF_IMMEDIATE, 1, [have BPF_IMMEDIATE])],[AC_MSG_RESULT(not found)]) dnl check for __progname *************** *** 149,153 **** --- 182,188 ---- fi + dnl --------------------------------------------------------------------------- dnl pcap sifting + dnl --------------------------------------------------------------------------- if test -z "$libpcap_prefix"; then *************** *** 155,159 **** dnl excessive pcap sifting ! AC_WF_CHECK_PCAP_LIB_DIR if test x$ac_pcap_lib_dir = "xnone"; then --- 190,212 ---- dnl excessive pcap sifting ! AC_MSG_CHECKING(for pcap header directory) ! ac_pcap_header_dir="none" ! for dir in $prefix/include /include /usr/include /usr/local/include /include/pcap /usr/include/pcap /usr/local/include/pcap ! do ! if test -f "$dir/pcap.h" ; then ! ac_pcap_header_dir=$dir ! fi ! done ! AC_MSG_RESULT($ac_pcap_header_dir) ! ! AC_MSG_CHECKING(for pcap library directory) ! ac_pcap_lib_dir="none" ! for dir in $prefix/lib /lib /usr/lib /usr/local/lib ! do ! if test -f "$dir/libpcap.a" ; then ! ac_pcap_lib_dir=$dir ! fi ! done ! AC_MSG_RESULT($ac_pcap_lib_dir) if test x$ac_pcap_lib_dir = "xnone"; then *************** *** 174,179 **** PCAP_LIB="-L$ac_pcap_lib_dir -lpcap" - - AC_WF_CHECK_PCAP_HEADER_DIR PCAP_INC="-I$ac_pcap_header_dir" --- 227,230 ---- *************** *** 187,191 **** --- 238,244 ---- fi + dnl --------------------------------------------------------------------------- dnl check for pcap_freecode + dnl --------------------------------------------------------------------------- AC_MSG_CHECKING([pcap_freecode in pcap]) *************** *** 205,209 **** --- 258,264 ---- fi + dnl --------------------------------------------------------------------------- dnl check for pcap_setnonblock + dnl --------------------------------------------------------------------------- AC_MSG_CHECKING([pcap_setnonblock in pcap]) *************** *** 219,238 **** fi ! dnl check for BIOCIMMEDIATE ! ! AC_MSG_CHECKING(BIOCIMMEDIATE) ! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> ! #include <stdlib.h> ! #include <pcap.h> ! ]], [[ ioctl(0, BIOCIMMEDIATE, NULL);]])],[AC_MSG_RESULT(found) ! AC_DEFINE(HAVE_BPF_IMMEDIATE, 1, [have BPF_IMMEDIATE])],[AC_MSG_RESULT(not found)]) ! ! ! dnl dnl libdnet sifting; actually it's a lot more well behaved dnl than pcap. dnl begin by looking for dnet-config if we find it, then dnl just use it to get the include and lib dirs. ! dnl if test -z $libdnet_prefix; then --- 274,283 ---- fi ! dnl --------------------------------------------------------------------------- dnl libdnet sifting; actually it's a lot more well behaved dnl than pcap. dnl begin by looking for dnet-config if we find it, then dnl just use it to get the include and lib dirs. ! dnl --------------------------------------------------------------------------- if test -z $libdnet_prefix; then *************** *** 267,270 **** --- 312,318 ---- fi + dnl --------------------------------------------------------------------------- + dnl guile sifting + dnl --------------------------------------------------------------------------- if test -z $guile_prefix; then *************** *** 322,328 **** fi ! dnl dnl setup paths so they can be passed to the Makefile.in ! dnl dhcpsysconfdir="${sysconfdir}/${PACKAGE_NAME}" --- 370,376 ---- fi ! dnl --------------------------------------------------------------------------- dnl setup paths so they can be passed to the Makefile.in ! dnl --------------------------------------------------------------------------- dhcpsysconfdir="${sysconfdir}/${PACKAGE_NAME}" *************** *** 336,339 **** --- 384,391 ---- dhcpdocdir="/doc/dhcp-agent" + dnl --------------------------------------------------------------------------- + dnl do substitutions + dnl --------------------------------------------------------------------------- + AC_SUBST(PCAP_LIB) AC_SUBST(PCAP_INC) *************** *** 351,354 **** --- 403,409 ---- AC_SUBST(dhcpdocdir) + dnl --------------------------------------------------------------------------- + dnl fail on warning if argumetn passed + dnl --------------------------------------------------------------------------- if test x"${FAIL_ON_WARNING}" = "xyes"; then CFLAGS="${CFLAGS} -Werror" |