]> git.ipfire.org Git - thirdparty/dhcp.git/blobdiff - configure.ac
[#189] Whitespace fixes in opened files
[thirdparty/dhcp.git] / configure.ac
index b4d5bc3fd521164913f0eb673862c369d2148c3c..c7ad192245404eb6f97f0799d83d4b5e311a982b 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT([DHCP],[4.4.0-dev],[dhcp-users@isc.org])
+AC_INIT([DHCP],[4.4.2],[dhcp-users@isc.org])
 
 
 # we specify "foreign" to avoid having to have the GNU mandated files,
@@ -142,14 +142,13 @@ if test "$enable_tracing" != "no" ; then
                  [Define to include server activity tracing support.])
 fi
 
-# Delayed-ack feature support (experimental).
+# Delayed-ack feature support.
 AC_ARG_ENABLE(delayed_ack,
-       AS_HELP_STRING([--enable-delayed-ack],[queues multiple DHCPACK replies (default is no)]))
-if test "$enable_delayed_ack" = "yes"; then
+       AS_HELP_STRING([--enable-delayed-ack],[queues multiple DHCPACK replies (default is yes)]))
+if test "$enable_delayed_ack" != "no"; then
+    enable_delayed_ack="yes"
        AC_DEFINE([DELAYED_ACK], [1],
                  [Define to queue multiple DHCPACK replies per fsync.])
-else
-    enable_delayed_ack="no"
 fi
 
 # DHCPv6 optional compile-time feature.
@@ -171,12 +170,23 @@ if test "$enable_dhcpv4o6" = "yes"; then
        if test "$enable_dhcpv6" = "no"; then
                AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
        fi
-       # DHCPv4o6 is not yet compatible with delayed-ack
-       if test "$enable_delayed_ack" = "yes"; then
-               AC_MSG_ERROR([dhcpv4o6 is not compatible with delayed-ack])
-       fi
        AC_DEFINE([DHCP4o6], [1], 
                  [Define to 1 to include DHCPv4 over DHCPv6 support.])
+else
+    # so we can report below
+    enable_dhcpv4o6="no"
+fi
+
+# Relay port (draft-ietf-dhc-relay-port-10.txt) optional compile-time feature.
+AC_ARG_ENABLE(relay-port,
+       AS_HELP_STRING([--enable-relay-port],[enable support for relay port (default is no)]))
+# Relay port is off by default (for now)
+if test "$enable_relay_port" = "yes"; then
+       AC_DEFINE([RELAY_PORT], [1],
+                 [Define to 1 to include relay port support.])
+else
+       # so we can report below
+       enable_relay_port="no"
 fi
 
 # PARANOIA is off by default (until we can test it with all features)
@@ -216,16 +226,6 @@ if test "$enable_use_sockets" = "yes"; then
                [Define to 1 to use the standard BSD socket API.])
 fi
 
-# Try to hnadle incorrect byte order for secs field
-# This is off by default
-AC_ARG_ENABLE(secs_byteorder,
-       AS_HELP_STRING([--enable-secs-byteorder],[Correct bad byteorders in the secs field (default is no).]))
-
-if test "$enable_secs_byteorder" = "yes" ; then
-       AC_DEFINE([SECS_BYTEORDER], [1],
-               [Define to correct bad byteorders in secs field.])
-fi
-
 # Include the PID in the log messages.  This is useful when there may
 # be multiple instances of a program.
 # This is off by default
@@ -249,24 +249,15 @@ fi
 
 # Testing section
 
+# Bind Makefile needs to know ATF is not included.
+AM_CONDITIONAL(BIND_ATF, test "foo" = "barr")
+
 DISTCHECK_ATF_CONFIGURE_FLAG=
 atf_path="no"
 AC_ARG_WITH([atf],
-    AS_HELP_STRING([--with-atf=PATH],[specify location where atf was installed (or "bind")]),
+    AS_HELP_STRING([--with-atf=PATH],[specify location where atf was installed]),
     [atf_path="$withval"])
-AM_CONDITIONAL(BIND_ATF, test "$atf_path" = "bind")
-if test "$atf_path" = "bind" ; then
-    DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=bind"
-    atf_pcp="bind"
-    atf_path="\${top_srcdir}/bind/atf"
-    ATF_CFLAGS="-I$atf_path/include -DUNIT_TEST"
-    ATF_LDFLAGS="-L$atf_path/lib -latf-c"
-    ATF_BIN=`cd $srcdir; pwd`/bind/atf/bin
-    AC_SUBST(ATF_CFLAGS)
-    AC_SUBST(ATF_LDFLAGS)
-    AC_SUBST(ATF_BIN)
-    BINDCONFIG="$BINDCONFIG --with-atf"
-elif test "$atf_path" != "no" ; then
+if test "$atf_path" != "no" ; then
     DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=$atf_path"
     # Config path for pkg-config
     atf_pcp=""
@@ -307,13 +298,12 @@ elif test "$atf_path" != "no" ; then
                 ATF_BIN=$atf_path/bin
         fi
 
-        if test ! -x $ATF_BIN/atf-run  -o  ! -x $ATF_BIN/atf-report ; then
-            AC_MSG_WARN([atf-run/atf-report not found, assuming they are in your path])
-        fi
+        UNITTESTS=tests
 
         AC_SUBST(ATF_CFLAGS)
         AC_SUBST(ATF_LDFLAGS)
         AC_SUBST(ATF_BIN)
+        AC_SUBST(UNITTESTS)
     fi
 fi
 
@@ -340,6 +330,13 @@ case "$localstatedir" in
                ;;
 esac
 
+# Default server configuration file.
+AC_ARG_WITH(srv-conf-file,
+       AS_HELP_STRING([--with-srv-conf-file=PATH],[Default file containing dhcpd configuration
+                       (default is typically /etc/dhcpd.conf)]),
+       AC_DEFINE_UNQUOTED([_PATH_DHCPD_CONF], ["$withval"],
+                          [Default file containing dhcpd configuration.]))
+
 # Allow specification of alternate state files
 AC_ARG_WITH(srv-lease-file,
        AS_HELP_STRING([--with-srv-lease-file=PATH],[File for dhcpd leases
@@ -526,6 +523,7 @@ AC_CHECK_HEADERS(ifaddrs.h)
 # figure out what IPv4 interface code to use
 AC_CHECK_HEADERS(linux/types.h)  # needed for linux/filter.h on old systems
 
+relay_port_supported="no"
 AC_CHECK_HEADER(linux/filter.h, DO_LPF=1, ,
 [
 #ifdef HAVE_LINUX_TYPES_H
@@ -536,6 +534,7 @@ if test -n "$DO_LPF"
 then
        AC_DEFINE([HAVE_LPF], [1],
                  [Define to 1 to use the Linux Packet Filter interface code.])
+       relay_port_supported="yes"
 else
        AC_CHECK_HEADER(sys/dlpi.h, DO_DLPI=1)
        if test -n "$DO_DLPI"
@@ -549,10 +548,17 @@ else
                        AC_DEFINE([HAVE_BPF], [1],
                                   [Define to 1 to use the
                                   Berkeley Packet Filter interface code.])
+                       relay_port_supported="yes"
                fi
        fi
 fi
 
+if test "$enable_relay_port" = "yes"; then
+       if test "$relay_port_supported" != "yes"; then
+               AC_MSG_ERROR([--enable-relay-port requires BPF or LPF])
+       fi
+fi
+
 # SIOCGLIFCONF uses some transport structures.  Trick is not all platforms
 # use the same structures.  We like to use 'struct lifconf' and 'struct
 # lifreq', but we'll use these other structures if they're present.  HPUX
@@ -623,7 +629,7 @@ if test "$have_nanosleep" = "rt"; then
        LIBS="-lrt $LIBS"
 fi
 
-# check for /dev/random (declares HAVE_DEV_RANDOM)
+# check for /dev/random (declares ISC_PATH_RANDOMDEV)
 AC_MSG_CHECKING(for random device)
 AC_ARG_WITH(randomdev,
        AS_HELP_STRING([--with-randomdev=PATH],[Path for random device
@@ -647,8 +653,8 @@ else
        else
                AC_MSG_RESULT($use_randomdev)
                AC_CHECK_FILE($use_randomdev,
-                   AC_DEFINE([HAVE_DEV_RANDOM], [1], 
-                       [Define to 1 if you have the /dev/random or other configured file.]),
+                   AC_DEFINE_UNQUOTED([ISC_PATH_RANDOMDEV], ["$use_randomdev"], 
+                       [Define if you have the /dev/random or other configured file.]),
                    AC_MSG_ERROR(cannot find $use_randomdev))
        fi
        BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev"
@@ -994,9 +1000,11 @@ AC_CONFIG_FILES([
   dhcpctl/Makefile.am
   dhcpctl/Makefile
   includes/Makefile
+  keama/Makefile
   omapip/Makefile.am
   omapip/Makefile
   relay/Makefile
+  relay/tests/Makefile
   server/Makefile
   tests/Makefile.am
   tests/Makefile
@@ -1039,6 +1047,8 @@ Features:
   binary-leases: $enable_binary_leases
   dhcpv6:        $enable_dhcpv6
   delayed-ack:   $enable_delayed_ack
+  dhcpv4o6:      $enable_dhcpv4o6
+  relay-port:    $enable_relay_port
 
 Developer:
   ATF unittests : $atf_path