version 1.1, 2012/02/21 22:30:18
|
version 1.1.1.1, 2012/10/09 09:06:54
|
Line 1
|
Line 1
|
AC_INIT([DHCP], [4.1-ESV-R4], [dhcp-users@isc.org]) | AC_INIT([DHCP], [4.1-ESV-R7], [dhcp-users@isc.org]) |
|
|
# we specify "foreign" to avoid having to have the GNU mandated files, |
# we specify "foreign" to avoid having to have the GNU mandated files, |
# like AUTHORS, COPYING, and such |
# like AUTHORS, COPYING, and such |
Line 50 AC_DEFINE_UNQUOTED([DHCP_BYTE_ORDER], [$byte_order],
|
Line 50 AC_DEFINE_UNQUOTED([DHCP_BYTE_ORDER], [$byte_order],
|
# Optional compile-time DEBUGging. |
# Optional compile-time DEBUGging. |
AC_ARG_ENABLE(debug, |
AC_ARG_ENABLE(debug, |
AC_HELP_STRING([--enable-debug], |
AC_HELP_STRING([--enable-debug], |
[create a debug-only version of the software (default is no).])) | [create a debug-only version of the software (default is no).]), |
| [enable_debug=yes],[enable_debug=no]) |
# This is very much off by default. |
# This is very much off by default. |
if test "$enable_debug" = "yes" ; then |
if test "$enable_debug" = "yes" ; then |
AC_DEFINE([DEBUG], [1], |
AC_DEFINE([DEBUG], [1], |
Line 150 if test "$enable_early_chroot" = "yes" ; then
|
Line 151 if test "$enable_early_chroot" = "yes" ; then
|
[Define to any value to chroot() prior to loading config.]) |
[Define to any value to chroot() prior to loading config.]) |
fi |
fi |
|
|
AC_ARG_ENABLE(IPv4_PKTINFO, | AC_ARG_ENABLE(ipv4_pktinfo, |
AC_HELP_STRING([--enable-ipv4-pktinfo], |
AC_HELP_STRING([--enable-ipv4-pktinfo], |
[enable use of pktinfo on IPv4 sockets (default is no)])) |
[enable use of pktinfo on IPv4 sockets (default is no)])) |
|
|
Line 159 if test "$enable_ipv4_pktinfo" = "yes"; then
|
Line 160 if test "$enable_ipv4_pktinfo" = "yes"; then
|
[Define to 1 to enable IPv4 packet info support.]) |
[Define to 1 to enable IPv4 packet info support.]) |
fi |
fi |
|
|
AC_ARG_ENABLE(USE_SOCKETS, | AC_ARG_ENABLE(use_sockets, |
AC_HELP_STRING([--enable-use-sockets], |
AC_HELP_STRING([--enable-use-sockets], |
[use the standard BSD socket API (default is no)])) |
[use the standard BSD socket API (default is no)])) |
|
|
Line 168 if test "$enable_use_sockets" = "yes"; then
|
Line 169 if test "$enable_use_sockets" = "yes"; then
|
[Define to 1 to use the standard BSD socket API.]) |
[Define to 1 to use the standard BSD socket API.]) |
fi |
fi |
|
|
|
# Testing section |
|
|
|
atf_path="no" |
|
AC_ARG_WITH([atf], |
|
AC_HELP_STRING([--with-atf=PATH], |
|
[specify location where atf was installed]), |
|
[atf_path="$withval"]) |
|
if test "$atf_path" != "no" ; then |
|
# Config path for pkg-config |
|
atf_pcp="" |
|
if test "$atf_path" != "yes" ; then |
|
if test -f $atf_path/lib/pkgconfig/atf-c.pc ; then |
|
atf_pcp=$atf_path/lib/pkgconfig |
|
fi |
|
else |
|
# Not specified, try some common paths |
|
atf_dirs="/usr /usr/local /usr/pkg /opt /opt/local" |
|
for d in $atf_dirs |
|
do |
|
if test -f $d/lib/pkgconfig/atf-c.pc ; then |
|
atf_pcp=$d/lib/pkgconfig |
|
fi |
|
done |
|
fi |
|
if test "$atf_pcp" = "" ; then |
|
AC_MSG_ERROR([Unable to find atf files in location specified]) |
|
else |
|
ATF_CFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --cflags atf-c` -DUNIT_TEST" |
|
ATF_LDFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --libs atf-c`" |
|
AC_SUBST(ATF_CFLAGS) |
|
AC_SUBST(ATF_LDFLAGS) |
|
fi |
|
fi |
|
|
|
AM_CONDITIONAL(HAVE_ATF, test "$atf_pcp" != "") |
|
### Uncomment this once docs.lab.isc.org upgrades to automake 1.11 |
|
### AM_COND_IF([HAVE_ATF], [AC_DEFINE([HAVE_ATF], [1], [ATF framework specified?])]) |
|
|
### |
### |
### Path fun. Older versions of DHCP were installed in /usr/sbin, so we |
### Path fun. Older versions of DHCP were installed in /usr/sbin, so we |
### need to look there and potentially overwrite by default (but not if |
### need to look there and potentially overwrite by default (but not if |
Line 403 else
|
Line 442 else
|
AC_CHECK_HEADER(net/bpf.h, DO_BPF=1) |
AC_CHECK_HEADER(net/bpf.h, DO_BPF=1) |
if test -n "$DO_BPF" |
if test -n "$DO_BPF" |
then |
then |
AC_DEFINE([HAVE_BPF], [""], | AC_DEFINE([HAVE_BPF], [1], |
[Define to 1 to use the |
[Define to 1 to use the |
Berkeley Packet Filter interface code.]) |
Berkeley Packet Filter interface code.]) |
fi |
fi |
Line 453 AC_TRY_LINK(
|
Line 492 AC_TRY_LINK(
|
[Define to 1 if the system has 'struct if_laddrreq'.])], |
[Define to 1 if the system has 'struct if_laddrreq'.])], |
[AC_MSG_RESULT(no)]) |
[AC_MSG_RESULT(no)]) |
|
|
|
# |
|
# check for GCC noreturn attribute |
|
# |
|
AC_MSG_CHECKING(for GCC noreturn attribute) |
|
AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));], |
|
[AC_MSG_RESULT(yes) |
|
AC_DEFINE([ISC_DHCP_NORETURN], [__attribute__((noreturn))], |
|
[Define to the string for a noreturn attribute.])], |
|
[AC_MSG_RESULT(no) |
|
AC_DEFINE([ISC_DHCP_NORETURN], [], |
|
[Define to the string for a noreturn attribute.])]) |
|
|
# Look for optional headers. |
# Look for optional headers. |
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h) |
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h) |
|
|
Line 488 AC_CHECK_SIZEOF(struct iaddr *, , [
|
Line 539 AC_CHECK_SIZEOF(struct iaddr *, , [
|
#include <stdio.h> |
#include <stdio.h> |
]) |
]) |
|
|
# Solaris does not have the msg_control or msg_controlen members in | # Solaris does not have the msg_control or msg_controlen members |
# in the msghdr structure unless you define: |
# in the msghdr structure unless you define: |
# |
# |
# _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, and __EXTENSIONS__ |
# _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, and __EXTENSIONS__ |
Line 535 AC_OUTPUT([
|
Line 586 AC_OUTPUT([
|
relay/Makefile |
relay/Makefile |
server/Makefile |
server/Makefile |
tests/Makefile |
tests/Makefile |
|
server/tests/Makefile |
|
doc/devel/doxyfile |
]) |
]) |
|
|
|
cat > config.report << END |
|
|
|
ISC DHCP source configure results: |
|
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
|
|
|
Package: |
|
Name: $PACKAGE_NAME |
|
Version: $PACKAGE_VERSION |
|
|
|
C Compiler: $CC |
|
|
|
Flags: |
|
DEFS: $DEFS |
|
CFLAGS: $CFLAGS |
|
|
|
Features: |
|
debug: $enable_debug |
|
failover: $enable_failover |
|
execute: $enable_execute |
|
|
|
Developer: |
|
ATF unittests : $atf_path |
|
|
|
END |
|
# TODO: Add Perl system tests |
|
|
|
if test "$atf_path" != "no" |
|
then |
|
echo "ATF_CFLAGS : $ATF_CFLAGS" >> config.report |
|
echo "ATF_LDFLAGS : $ATF_LDFLAGS" >> config.report |
|
echo |
|
fi |
|
|
|
cat config.report |
|
|
|
echo |
|
echo Now you can type "make" to build ISC DHCP |
|
echo |