-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,
# like AUTHORS, COPYING, and such
-AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_INIT_AUTOMAKE([foreign])
# we specify AM_MAINTAINER_MODE to avoid problems with rebuilding
# the configure and makefiles. Without it users doing things that
[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.
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)
[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
# 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=""
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
;;
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
# 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
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"
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
# For HP/UX we need -lipv6 for if_nametoindex, perhaps others.
AC_SEARCH_LIBS(if_nametoindex, [ipv6])
-# check for /dev/random (declares HAVE_DEV_RANDOM)
+# For some Solaris nanosleep is found by BIND in librt
+have_nanosleep="no"
+AC_CHECK_FUNC(nanosleep, have_nanosleep="yes")
+if test "$have_nanosleep" = "no"; then
+ AC_CHECK_LIB(rt, nanosleep, have_nanosleep="rt")
+fi
+if test "$have_nanosleep" = "rt"; then
+ LIBS="-lrt $LIBS"
+fi
+
+# 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
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"
if test ! -d "$use_libbind"; then
AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
fi
- if test ! -d "$use_libbind/include"; then
+ if test ! -d "$use_libbind/include" -o \
+ ! -f "$use_libbind/include/isc/buffer.h"
+ then
AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
fi
- if test ! -d "$use_libbind/lib"; then
+ if test ! -d "$use_libbind/lib" -o \
+ \( ! -f "$use_libbind/lib/libisc.a" -a \
+ ! -f "$use_libbind/lib/libisc.la" \)
+ then
AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
fi
BINDDIR="$use_libbind"
AC_SUBST(DISTCHECK_LIBBIND_CONFIGURE_FLAG)
AM_CONDITIONAL(HAVE_BINDDIR, test "$use_libbind" = "no")
-AC_ARG_ENABLE(bind_install,
- AS_HELP_STRING([--enable-bind-install],[install bind includes and libraries (default is no).]))
-if test "$enable_bind_install" = "yes" -a "$use_libbind" != "no"; then
- AC_MSG_WARN([--enable-bind-install does nothing when --with-libbind is set])
-fi
-AM_CONDITIONAL(INSTALL_BIND, test "$enable_bind_install" = "yes")
-
#
# GNU libtool support
#
want_libtool="no"
BINDLT=
+DISTCHECK_LIBTOOL_CONFIGURE_FLAG=
AC_ARG_ENABLE(libtool,
- AS_HELP_STRING([--enable-libtool],[use GNU libtool for dynamic shared libraries (default is $default_libtool).]),
+ AS_HELP_STRING([--enable-libtool],
+[use GNU libtool for dynamic shared libraries (default is no).]),
want_libtool="$enableval")
-if test "$want_libtool" = "yes"; then
+
+if test "$use_libbind" != "no"; then
+ if test "$want_libtool" = "yes" -a \
+ ! -f "$use_libbind/lib/libisc.la"
+ then
+ AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib])
+ fi
+ if test "$want_libtool" = "no" -a \
+ ! -f "$use_libbind/lib/libisc.a"
+ then
+ AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib])
+ fi
+fi
+
+
if test "$want_libtool" = "yes"; then
AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
- AC_MSG_WARN([legacy configure is used but libtool is enabled. Trying to recover...])
- cd $srcdir; exec ./re-conf $ac_configure_args
- cd $srcdir; exec ./re-conf $ac_configure_args
- AC_MSG_ERROR([Recovering failed])
+ # expand $ac_configure_args
+ eval "set my_configure_args $ac_configure_args"
+ shift
+ cd $srcdir; exec ./config+lt "$@"
AC_MSG_ERROR([Recovering failed])
fi
-fi
-A=a
+
+DHLIBS=LIBRARIES
A=a
+
+AC_SUBST(DHLIBS)
AC_SUBST(A)
AC_SUBST(BINDLT)
+AC_SUBST(DISTCHECK_LIBTOOL_CONFIGURE_FLAG)
+
+# quoting in Makefile.am.in
+Q=@
+AC_SUBST(Q)
+
+# install bind includes and libraries
+
+want_install_bind="no"
+if test "$want_libtool" = "yes"; then
+ want_install_bind="yes"
+fi
+if test "$use_libbind" != "no"; then
+ want_install_bind="no"
+fi
+AC_ARG_ENABLE(bind_install,
+ AS_HELP_STRING([--enable-bind-install],
+[install bind includes and libraries (default is no).]),
+ want_install_bind="$enableval")
+if test "$want_install_bind" = "yes"; then
+ if test "$use_libbind" != "no"; then
+ AC_MSG_WARN([--enable-bind-install does nothing when --with-libbind is set])
+ fi
+elif test "$want_libtool" = "yes" -a "$use_libbind" = "no"; then
+ AC_MSG_WARN([embedded dynamic bind libraries must be installed])
+fi
+AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
# OpenLDAP support.
AC_ARG_WITH(ldap,
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
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