]> git.ipfire.org Git - thirdparty/dhcp.git/blame - configure.ac+lt
[master] set enable-relay-port to "no" for config reporting
[thirdparty/dhcp.git] / configure.ac+lt
CommitLineData
397599cb 1AC_INIT([DHCP],[4.4.0b1],[dhcp-users@isc.org])
13e5cc6c
FD
2
3# for libtool
4AC_CONFIG_MACRO_DIR([m4])
5
6# we specify "foreign" to avoid having to have the GNU mandated files,
7# like AUTHORS, COPYING, and such
bf6f8fce 8AM_INIT_AUTOMAKE([foreign])
13e5cc6c
FD
9
10# we specify AM_MAINTAINER_MODE to avoid problems with rebuilding
11# the configure and makefiles. Without it users doing things that
12# change the timestamps on the code, like checking it into a cvs
13# tree, could trigger a rebuild of the infrastructure files which
14# might fail if they don't have the correct tools.
15AM_MAINTAINER_MODE
16
17AC_CANONICAL_HOST
18
19# We want to turn on warnings if we are using gcc and the user did
20# not specify CFLAGS. The autoconf check for the C compiler sets the
21# CFLAGS if gcc is used, so we will save it before we run that check.
22SAVE_CFLAGS="$CFLAGS"
23
24# Now find our C compiler.
25AC_PROG_CC
26
27# Suppress warnings about --datarootdir
28AC_DEFUN([AC_DATAROOTDIR_CHECKED])
29
30# If we have gcc, and AC_PROG_CC changed the flags, then we know the
31# user did not specify any flags. Add warnings in this case.
32if test "$GCC" = "yes"; then
33 if test "$CFLAGS" != "$SAVE_CFLAGS"; then
34 STD_CWARNINGS="$STD_CWARNINGS -Wall -Werror -fno-strict-aliasing"
35 fi
36fi
37
38# We can have some flags to pass to bind configure
39BINDCONFIG=
40if test "$cross_compiling" = "yes"; then
41 BINDCONFIG="--host=$host"
42fi
43# Pass CFLAGS and co. $ac_configure_args looks like "'arg1' 'arg2' ..."
44# and as there can be a space inside an argument some magic is required.
45# This sets $1 ... $N to my_configure_args, arg1 ... argN
46eval "set my_configure_args $ac_configure_args"
47# remove my_configure_args, i.e., the guard against empty $ac_configure_args
48shift
49# iterate on arguments and copying 'arg' when it begins by an upper case
50for a
51do
52 case $a in
53 [[A-Z]]*) BINDCONFIG="$BINDCONFIG '$a'" ;;
54 esac
55done
56AC_SUBST(BINDCONFIG)
57
58# POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
59# parts of the IPv6 Advanced Socket API as a result. This is stupid
60# as it breaks how the two halves (Basic and Advanced) of the IPv6
61# Socket API were designed to be used but we have to live with it.
62# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
63AC_USE_SYSTEM_EXTENSIONS
64
13e5cc6c
FD
65
66AC_PATH_PROG(AR, ar)
67AC_SUBST(AR)
68
69if test "X$AR" = "X"; then
70 AC_MSG_ERROR([
71ar program not found. Please fix your PATH to include the directory in
72which ar resides, or set AR in the environment with the full path to ar.])
73fi
74
75AC_CONFIG_HEADERS([includes/config.h])
76
77# we sometimes need to know byte order for building packets
78AC_C_BIGENDIAN(AC_SUBST(byte_order, BIG_ENDIAN),
79 AC_SUBST(byte_order, LITTLE_ENDIAN))
80AC_DEFINE_UNQUOTED([DHCP_BYTE_ORDER], [$byte_order],
81 [Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs)
82 or LITTLE_ENDIAN for LSB (Intel CPUs).])
83
84# Optional compile-time DEBUGging.
85AC_ARG_ENABLE(debug,
86 AS_HELP_STRING([--enable-debug],[create a debug-only version of the software (default is no).]),
87 [case "${enableval}" in
88 yes) enable_debug=yes
89 AC_DEFINE([DEBUG], [1],
90 [Define to compile debug-only DHCP software.])
91 # Just override CFLAGS totally to remove optimization.
92 CFLAGS="-g";;
93 no) enable_debug=no ;;
94 *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
95 esac],[enable_debug=no])
96
97# XXX: there are actually quite a lot more DEBUG_ features we could enable,
98# but I don't want to pollute the --help space.
99#
100#/* #define DEBUG_TOKENS */
101#/* #define DEBUG_PACKET */
102#/* #define DEBUG_EXPRESSIONS */
103#/* #define DEBUG_FIND_LEASE */
104#/* #define DEBUG_EXPRESSION_PARSE */
105#/* #define DEBUG_CLASS_MATCHING */
106#/* #define DEBUG_MEMORY_LEAKAGE */
107#/* #define DEBUG_MALLOC_POOL */
108#/* #define DEBUG_LEASE_STATE_TRANSITIONS */
109#/* #define DEBUG_RC_HISTORY */
110#/* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */
111#/* #define RC_HISTORY_MAX 10240 */
112#/* #define POINTER_DEBUG */
113#/* #define DEBUG_FAILOVER_MESSAGES */
114#/* #define DEBUG_FAILOVER_TIMING */
115#/* #define DEBUG_DUMP_ALL_LEASES */
116
117# Failover optional compile-time feature.
118AC_ARG_ENABLE(failover,
119 AS_HELP_STRING([--enable-failover],[enable support for failover (default is yes)]))
120# Failover is on by default, so define if it is not explicitly disabled.
121if test "$enable_failover" != "no"; then
122 enable_failover="yes"
123 AC_DEFINE([FAILOVER_PROTOCOL], [1],
124 [Define to include Failover Protocol support.])
125fi
126
127# execute() support.
128AC_ARG_ENABLE(execute,
129 AS_HELP_STRING([--enable-execute],[enable support for execute() in config (default is yes)]))
130# execute() is on by default, so define if it is not explicitly disabled.
131if test "$enable_execute" != "no" ; then
132 enable_execute="yes"
133 AC_DEFINE([ENABLE_EXECUTE], [1],
134 [Define to include execute() config language support.])
135fi
136
137# Server tracing support.
138AC_ARG_ENABLE(tracing,
139 AS_HELP_STRING([--enable-tracing],[enable support for server activity tracing (default is yes)]))
140# tracing is on by default, so define if it is not explicitly disabled.
141if test "$enable_tracing" != "no" ; then
142 AC_DEFINE([TRACING], [1],
143 [Define to include server activity tracing support.])
144fi
145
4406f9b0 146# Delayed-ack feature support.
13e5cc6c 147AC_ARG_ENABLE(delayed_ack,
4406f9b0
TM
148 AS_HELP_STRING([--enable-delayed-ack],[queues multiple DHCPACK replies (default is yes)]))
149if test "$enable_delayed_ack" != "no"; then
150 enable_delayed_ack="yes"
13e5cc6c
FD
151 AC_DEFINE([DELAYED_ACK], [1],
152 [Define to queue multiple DHCPACK replies per fsync.])
13e5cc6c
FD
153fi
154
155# DHCPv6 optional compile-time feature.
156AC_ARG_ENABLE(dhcpv6,
157 AS_HELP_STRING([--enable-dhcpv6],[enable support for DHCPv6 (default is yes)]))
158# DHCPv6 is on by default, so define if it is not explicitly disabled.
159if test "$enable_dhcpv6" != "no"; then
160 enable_dhcpv6="yes"
161 AC_DEFINE([DHCPv6], [1],
162 [Define to 1 to include DHCPv6 support.])
163fi
164
165# DHCPv4o6 optional compile-time feature.
166AC_ARG_ENABLE(dhcpv4o6,
167 AS_HELP_STRING([--enable-dhcpv4o6],[enable support for DHCPv4-over-DHCPv6 (default is no)]))
168# DHCPv4o6 is off by default, so define if it is explicitly enabled.
169if test "$enable_dhcpv4o6" = "yes"; then
170 # DHCPv4o6 requires DHCPv6
171 if test "$enable_dhcpv6" = "no"; then
172 AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
173 fi
13e5cc6c
FD
174 AC_DEFINE([DHCP4o6], [1],
175 [Define to 1 to include DHCPv4 over DHCPv6 support.])
4406f9b0
TM
176else
177 # so we can report below
178 enable_dhcpv4o6="no"
13e5cc6c
FD
179fi
180
563f0b8a
FD
181# Relay port (draft-ietf-dhc-relay-port-10.txt) optional compile-time feature.
182AC_ARG_ENABLE(relay-port,
183 AS_HELP_STRING([--enable-relay-port],[enable support for relay port (default is no)]))
184# Relay port is off by default (for now)
185if test "$enable_relay_port" = "yes"; then
186 AC_DEFINE([RELAY_PORT], [1],
187 [Define to 1 to include relay port support.])
2f1fd274
TM
188else
189 # so we can report below
190 enable_relay_port="no"
563f0b8a
FD
191fi
192
13e5cc6c
FD
193# PARANOIA is off by default (until we can test it with all features)
194AC_ARG_ENABLE(paranoia,
195 AS_HELP_STRING([--enable-paranoia],[enable support for chroot/setuid (default is no)]))
196AC_ARG_ENABLE(early_chroot,
197 AS_HELP_STRING([--enable-early-chroot],[enable chrooting prior to configuration (default is no)]))
198# If someone enables early chroot, but does not enable paranoia, do so for
199# them.
200if test "$enable_paranoia" != "yes" && \
201 test "$enable_early_chroot" = "yes" ; then
202 enable_paranoia="yes"
203fi
204
205if test "$enable_paranoia" = "yes" ; then
206 AC_DEFINE([PARANOIA], [1],
207 [Define to any value to include Ari's PARANOIA patch.])
208fi
209if test "$enable_early_chroot" = "yes" ; then
210 AC_DEFINE([EARLY_CHROOT], [1],
211 [Define to any value to chroot() prior to loading config.])
212fi
213
214AC_ARG_ENABLE(ipv4_pktinfo,
215 AS_HELP_STRING([--enable-ipv4-pktinfo],[enable use of pktinfo on IPv4 sockets (default is no)]))
216
217if test "$enable_ipv4_pktinfo" = "yes"; then
218 AC_DEFINE([USE_V4_PKTINFO], [1],
219 [Define to 1 to enable IPv4 packet info support.])
220fi
221
222AC_ARG_ENABLE(use_sockets,
223 AS_HELP_STRING([--enable-use-sockets],[use the standard BSD socket API (default is no)]))
224
225if test "$enable_use_sockets" = "yes"; then
226 AC_DEFINE([USE_SOCKETS], [1],
227 [Define to 1 to use the standard BSD socket API.])
228fi
229
13e5cc6c
FD
230# Include the PID in the log messages. This is useful when there may
231# be multiple instances of a program.
232# This is off by default
233AC_ARG_ENABLE(log_pid,
234 AS_HELP_STRING([--enable-log-pid],[Include PIDs in syslog messages (default is no).]))
235if test "$enable_log_pid" = "yes" ; then
236 AC_DEFINE([USE_LOG_PID], [1],
237 [Define to include PIDs in syslog messages.])
238fi
239
240# Allow for binary search when inserting v4 leases into queues
241AC_ARG_ENABLE(binary_leases,
242 AS_HELP_STRING([--enable-binary-leases],[enable support for binary insertion of leases (default is no)]))
243# binary_leases is off by default.
244if test "$enable_binary_leases" = "yes"; then
245 AC_DEFINE([BINARY_LEASES], [1],
246 [Define to support binary insertion of leases into queues.])
247else
248 enable_binary_leases="no"
249fi
250
251# Testing section
252
253DISTCHECK_ATF_CONFIGURE_FLAG=
254atf_path="no"
255AC_ARG_WITH([atf],
256 AS_HELP_STRING([--with-atf=PATH],[specify location where atf was installed (or "bind")]),
257 [atf_path="$withval"])
258AM_CONDITIONAL(BIND_ATF, test "$atf_path" = "bind")
259if test "$atf_path" = "bind" ; then
260 DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=bind"
261 atf_pcp="bind"
262 atf_path="\${top_srcdir}/bind/atf"
263 ATF_CFLAGS="-I$atf_path/include -DUNIT_TEST"
264 ATF_LDFLAGS="-L$atf_path/lib -latf-c"
265 ATF_BIN=`cd $srcdir; pwd`/bind/atf/bin
266 AC_SUBST(ATF_CFLAGS)
267 AC_SUBST(ATF_LDFLAGS)
268 AC_SUBST(ATF_BIN)
269 BINDCONFIG="$BINDCONFIG --with-atf"
270elif test "$atf_path" != "no" ; then
271 DISTCHECK_ATF_CONFIGURE_FLAG="--with-atf=$atf_path"
272 # Config path for pkg-config
273 atf_pcp=""
274 if test "$atf_path" != "yes" ; then
275 if test -f $atf_path/lib/pkgconfig/atf-c.pc ; then
276 atf_pcp=$atf_path/lib/pkgconfig
277 elif test -f $atf_path/lib64/pkgconfig/atf-c.pc ; then
278 atf_pcp=$atf_path/lib64/pkgconfig
279 fi
280 else
281 # Not specified, try some common paths
282 atf_dirs="/usr /usr/local /usr/pkg /opt /opt/local"
283 for d in $atf_dirs
284 do
285 if test -f $d/lib/pkgconfig/atf-c.pc ; then
286 atf_pcp=$d/lib/pkgconfig
287 atf_path=$d
288 elif test -f $d/lib64/pkgconfig/atf-c.pc ; then
289 atf_pcp=$d/lib64/pkgconfig
290 atf_path=$d
291 fi
292 done
293 fi
294
295 if test "$atf_pcp" = "" ; then
296 AC_MSG_ERROR([Unable to find atf files in location specified])
297 else
298 AC_CHECK_PROG([pkgcfg_found],[pkg-config],[pkg-config],[])
299 if test "$pkgcfg_found" = ""; then
300 AC_MSG_ERROR([Could not locate ATF, pkg-config not installed])
301 fi
302 ATF_CFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --cflags atf-c` -DUNIT_TEST"
303 ATF_LDFLAGS="`PKG_CONFIG_PATH=$atf_pcp pkg-config --libs atf-c`"
304 if test -f $atf_pcp/atf-sh.pc ; then
305 ATF_BIN="`PKG_CONFIG_PATH=$atf_pcp pkg-config --variable=exec_prefix atf-sh`/bin"
306 else
307 # older versions don't have atf-sh, try usual place
308 ATF_BIN=$atf_path/bin
309 fi
310
311 if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
312 AC_MSG_WARN([atf-run/atf-report not found, assuming they are in your path])
313 fi
314
315 AC_SUBST(ATF_CFLAGS)
316 AC_SUBST(ATF_LDFLAGS)
317 AC_SUBST(ATF_BIN)
318 fi
319fi
320
321AM_CONDITIONAL(HAVE_ATF, test "$atf_pcp" != "")
322AM_COND_IF([HAVE_ATF], [AC_DEFINE([HAVE_ATF], [1], [ATF framework specified?])])
323AC_SUBST(DISTCHECK_ATF_CONFIGURE_FLAG)
324
325###
326### Path fun. Older versions of DHCP were installed in /usr/sbin, so we
327### need to look there and potentially overwrite by default (but not if
328### the user configures an alternate value). LOCALSTATEDIR is totally
329### braindead. No one uses /usr/local/var/db/ nor /usr/local/var/run, and
330### they would be insane for suggesting it. We need to look in /var/for
331### 'db' and 'state/dhcp' for db files, and /var/run for pid files by
332### default.
333###
334AC_PREFIX_PROGRAM(dhcpd)
335
336# XXX - isn't there SOME WAY to default autoconf to /var instead of
337# /usr/local/var/no/one/has/this/please/stop/trying?
338case "$localstatedir" in
339 '${prefix}/var')
340 localstatedir=/var
341 ;;
342esac
343
c8f0b32a
MS
344# Default server configuration file.
345AC_ARG_WITH(srv-conf-file,
346 AS_HELP_STRING([--with-srv-conf-file=PATH],[Default file containing dhcpd configuration
347 (default is typically /etc/dhcpd.conf)]),
348 AC_DEFINE_UNQUOTED([_PATH_DHCPD_CONF], ["$withval"],
349 [Default file containing dhcpd configuration.]))
350
13e5cc6c
FD
351# Allow specification of alternate state files
352AC_ARG_WITH(srv-lease-file,
353 AS_HELP_STRING([--with-srv-lease-file=PATH],[File for dhcpd leases
354 (default is LOCALSTATEDIR/db/dhcpd.leases)]),
355 AC_DEFINE_UNQUOTED([_PATH_DHCPD_DB], ["$withval"],
356 [File for dhcpd leases.]))
357
358AC_MSG_CHECKING([for dhcpd.leases location])
359if [[ "x$with_srv_lease_file" = "x" ]] ; then
360 if [[ -d "${localstatedir}/db" ]] ; then
361 with_srv_lease_file="${localstatedir}/db/dhcpd.leases"
362 elif [[ -d "${localstatedir}/state" ]] ; then
363 if [[ -d "${localstatedir}/state/dhcp" ]] ; then
364 with_srv_lease_file="${localstatedir}/state/dhcp/dhcpd.leases"
365 else
366 with_srv_lease_file="${localstatedir}/state/dhcpd.leases"
367 fi
368 elif [[ -d "${localstatedir}/lib" ]] ; then
369 if [[ -d "${localstatedir}/lib/dhcp" ]] ; then
370 with_srv_lease_file="${localstatedir}/lib/dhcp/dhcpd.leases"
371 else
372 with_srv_lease_file="${localstatedir}/lib/dhcpd.leases"
373 fi
374 elif [[ -d "${localstatedir}/etc" ]] ; then
375 with_srv_lease_file="${localstatedir}/etc/dhcpd.leases"
376 else
377 with_srv_lease_file="/etc/dhcpd.leases"
378 fi
379fi
380AC_MSG_RESULT($with_srv_lease_file)
381
382AC_ARG_WITH(srv6-lease-file,
383 AS_HELP_STRING([--with-srv6-lease-file=PATH],[File for dhcpd6 leases
384 (default is LOCALSTATEDIR/db/dhcpd6.leases)]),
385 AC_DEFINE_UNQUOTED([_PATH_DHCPD6_DB], ["$withval"],
386 [File for dhcpd6 leases.]))
387
388AC_MSG_CHECKING([for dhcpd6.leases location])
389if [[ "x$with_srv6_lease_file" = "x" ]] ; then
390 if [[ -d "${localstatedir}/db" ]] ; then
391 with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases"
392 elif [[ -d "${localstatedir}/state" ]] ; then
393 if [[ -d "${localstatedir}/state/dhcp" ]] ; then
394 with_srv6_lease_file="${localstatedir}/state/dhcp/dhcpd6.leases"
395 else
396 with_srv6_lease_file="${localstatedir}/state/dhcpd6.leases"
397 fi
398 elif [[ -d "${localstatedir}/lib" ]] ; then
399 if [[ -d "${localstatedir}/lib/dhcp" ]] ; then
400 with_srv6_lease_file="${localstatedir}/lib/dhcp/dhcpd6.leases"
401 else
402 with_srv6_lease_file="${localstatedir}/lib/dhcpd6.leases"
403 fi
404 elif [[ -d "${localstatedir}/etc" ]] ; then
405 with_srv6_lease_file="${localstatedir}/etc/dhcpd6.leases"
406 else
407 with_srv6_lease_file="/etc/dhcpd6.leases"
408 fi
409fi
410AC_MSG_RESULT($with_srv6_lease_file)
411
412AC_ARG_WITH(cli-lease-file,
413 AS_HELP_STRING([--with-cli-lease-file=PATH],[File for dhclient leases
414 (default is LOCALSTATEDIR/db/dhclient.leases)]),
415 AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_DB], ["$withval"],
416 [File for dhclient leases.]))
417
418AC_MSG_CHECKING([for dhclient.leases location])
419if [[ "x$with_cli_lease_file" = "x" ]] ; then
420 if [[ -d "${localstatedir}/db" ]] ; then
421 with_cli_lease_file="${localstatedir}/db/dhclient.leases"
422 elif [[ -d "${localstatedir}/state" ]] ; then
423 if [[ -d "${localstatedir}/state/dhcp" ]] ; then
424 with_cli_lease_file="${localstatedir}/state/dhcp/dhclient.leases"
425 else
426 with_cli_lease_file="${localstatedir}/state/dhclient.leases"
427 fi
428 elif [[ -d "${localstatedir}/lib" ]] ; then
429 if [[ -d "${localstatedir}/lib/dhcp" ]] ; then
430 with_cli_lease_file="${localstatedir}/lib/dhcp/dhclient.leases"
431 else
432 with_cli_lease_file="${localstatedir}/lib/dhclient.leases"
433 fi
434 elif [[ -d "${localstatedir}/etc" ]] ; then
435 with_cli_lease_file="${localstatedir}/etc/dhclient.leases"
436 else
437 with_cli_lease_file="/etc/dhclient.leases"
438 fi
439fi
440AC_MSG_RESULT($with_cli_lease_file)
441
442AC_ARG_WITH(cli6-lease-file,
443 AS_HELP_STRING([--with-cli6-lease-file=PATH],[File for dhclient6 leases
444 (default is LOCALSTATEDIR/db/dhclient6.leases)]),
445 AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_DB], ["$withval"],
446 [File for dhclient6 leases.]))
447
448AC_MSG_CHECKING([for dhclient6.leases location])
449if [[ "x$with_cli6_lease_file" = "x" ]] ; then
450 if [[ -d "${localstatedir}/db" ]] ; then
451 with_cli6_lease_file="${localstatedir}/db/dhclient6.leases"
452 elif [[ -d "${localstatedir}/state" ]] ; then
453 if [[ -d "${localstatedir}/state/dhcp" ]] ; then
454 with_cli6_lease_file="${localstatedir}/state/dhcp/dhclient6.leases"
455 else
456 with_cli6_lease_file="${localstatedir}/state/dhclient6.leases"
457 fi
458 elif [[ -d "${localstatedir}/lib" ]] ; then
459 if [[ -d "${localstatedir}/lib/dhcp" ]] ; then
460 with_cli6_lease_file="${localstatedir}/lib/dhcp/dhclient6.leases"
461 else
462 with_cli6_lease_file="${localstatedir}/lib/dhclient6.leases"
463 fi
464 elif [[ -d "${localstatedir}/etc" ]] ; then
465 with_cli6_lease_file="${localstatedir}/etc/dhclient6.leases"
466 else
467 with_cli6_lease_file="/etc/dhclient6.leases"
468 fi
469fi
470AC_MSG_RESULT($with_cli6_lease_file)
471
472AC_ARG_WITH(srv-pid-file,
473 AS_HELP_STRING([--with-srv-pid-file=PATH],[File for dhcpd process information
474 (default is LOCALSTATEDIR/run/dhcpd.pid)]),
475 AC_DEFINE_UNQUOTED([_PATH_DHCPD_PID], ["$withval"],
476 [File for dhcpd process information.]))
477AC_ARG_WITH(srv6-pid-file,
478 AS_HELP_STRING([--with-srv6-pid-file=PATH],[File for dhcpd6 process information
479 (default is LOCALSTATEDIR/run/dhcpd6.pid)]),
480 AC_DEFINE_UNQUOTED([_PATH_DHCPD6_PID], ["$withval"],
481 [File for dhcpd6 process information.]))
482AC_ARG_WITH(cli-pid-file,
483 AS_HELP_STRING([--with-cli-pid-file=PATH],[File for dhclient process information
484 (default is LOCALSTATEDIR/run/dhclient.pid)]),
485 AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_PID], ["$withval"],
486 [File for dhclient process information.]))
487AC_ARG_WITH(cli6-pid-file,
488 AS_HELP_STRING([--with-cli6-pid-file=PATH],[File for dhclient6 process information
489 (default is LOCALSTATEDIR/run/dhclient6.pid)]),
490 AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_PID], ["$withval"],
491 [File for dhclient6 process information.]))
492AC_ARG_WITH(relay-pid-file,
493 AS_HELP_STRING([--with-relay-pid-file=PATH],[File for dhcrelay process information
494 (default is LOCALSTATEDIR/run/dhcrelay.pid)]),
495 AC_DEFINE_UNQUOTED([_PATH_DHCRELAY_PID], ["$withval"],
496 [File for dhcrelay process information.]))
497AC_ARG_WITH(relay6-pid-file,
498 AS_HELP_STRING([--with-relay6-pid-file=PATH],[File for dhcrelay6 process information
499 (default is LOCALSTATEDIR/run/dhcrelay6.pid)]),
500 AC_DEFINE_UNQUOTED([_PATH_DHCRELAY6_PID], ["$withval"],
501 [File for dhcrelay6 process information.]))
502
503# Check basic types.
504AC_TYPE_INT8_T
505AC_TYPE_INT16_T
506AC_TYPE_INT32_T
507AC_TYPE_INT64_T
508
509# Some systems need the u_intX_t types defined across.
510AC_CHECK_TYPE([u_int8_t], [], [
511 AC_TYPE_UINT8_T
512 AC_DEFINE(u_int8_t, [uint8_t], [Define a type for 8-bit unsigned
513 integers.])
514])
515AC_CHECK_TYPE([u_int16_t], [], [
516 AC_TYPE_UINT16_T
517 AC_DEFINE(u_int16_t, [uint16_t], [Define a type for 16-bit unsigned
518 integers.])
519])
520AC_CHECK_TYPE([u_int32_t], [], [
521 AC_TYPE_UINT32_T
522 AC_DEFINE(u_int32_t, [uint32_t], [Define a type for 32-bit unsigned
523 integers.])
524])
525AC_CHECK_TYPE([u_int64_t], [], [
526 AC_TYPE_UINT64_T
527 AC_DEFINE(u_int64_t, [uint64_t], [Define a type for 64-bit unsigned
528 integers.])
529])
530
531# see if ifaddrs.h is available
532AC_CHECK_HEADERS(ifaddrs.h)
533
534# figure out what IPv4 interface code to use
535AC_CHECK_HEADERS(linux/types.h) # needed for linux/filter.h on old systems
536
563f0b8a 537relay_port_supported="no"
13e5cc6c
FD
538AC_CHECK_HEADER(linux/filter.h, DO_LPF=1, ,
539[
540#ifdef HAVE_LINUX_TYPES_H
541#include <linux/types.h>
542#endif
543])
544if test -n "$DO_LPF"
545then
546 AC_DEFINE([HAVE_LPF], [1],
547 [Define to 1 to use the Linux Packet Filter interface code.])
563f0b8a 548 relay_port_supported="yes"
13e5cc6c
FD
549else
550 AC_CHECK_HEADER(sys/dlpi.h, DO_DLPI=1)
551 if test -n "$DO_DLPI"
552 then
553 AC_DEFINE([HAVE_DLPI], [1],
554 [Define to 1 to use DLPI interface code.])
555 else
556 AC_CHECK_HEADER(net/bpf.h, DO_BPF=1)
557 if test -n "$DO_BPF"
558 then
559 AC_DEFINE([HAVE_BPF], [1],
560 [Define to 1 to use the
561 Berkeley Packet Filter interface code.])
563f0b8a 562 relay_port_supported="yes"
13e5cc6c
FD
563 fi
564 fi
565fi
566
563f0b8a
FD
567if test "$enable_relay_port" = "yes"; then
568 if test "$relay_port_supported" != "yes"; then
569 AC_MSG_ERROR([--enable-relay-port requires BPF or LPF])
570 fi
571fi
572
13e5cc6c
FD
573# SIOCGLIFCONF uses some transport structures. Trick is not all platforms
574# use the same structures. We like to use 'struct lifconf' and 'struct
575# lifreq', but we'll use these other structures if they're present. HPUX
576# does not define 'struct lifnum', but does use SIOCGLIFNUM - they use an
577# int value.
578#
579AC_MSG_CHECKING([for struct lifnum])
580AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h>
581 #include <sys/socket.h>
582 #include <net/if.h>
583]], [[ struct lifnum a;
584]])],[AC_MSG_RESULT(yes)
585 AC_DEFINE([ISC_PLATFORM_HAVELIFNUM], [1],
586 [Define to 1 if the system has 'struct lifnum'.])],[AC_MSG_RESULT(no)])
587
588AC_MSG_CHECKING([for struct if_laddrconf])
589AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h>
590 #include <net/if6.h>
591]], [[ struct if_laddrconf a;
592]])],[AC_MSG_RESULT(yes)
593 AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRCONF], [1],
594 [Define to 1 if the system has 'struct if_laddrconf'.])],[AC_MSG_RESULT(no)])
595
596AC_MSG_CHECKING([for struct if_laddrreq])
597AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
598 #include <net/if6.h>
599]], [[ struct if_laddrreq a;
600]])],[AC_MSG_RESULT(yes)
601 AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRREQ], [1],
602 [Define to 1 if the system has 'struct if_laddrreq'.])],[AC_MSG_RESULT(no)])
603
604#
605# check for GCC noreturn attribute
606#
607AC_MSG_CHECKING(for GCC noreturn attribute)
608AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn));]])],[AC_MSG_RESULT(yes)
609 AC_DEFINE([ISC_DHCP_NORETURN], [__attribute__((noreturn))],
610 [Define to the string for a noreturn attribute.])],[AC_MSG_RESULT(no)
611 AC_DEFINE([ISC_DHCP_NORETURN], [],
612 [Define to the string for a noreturn attribute.])])
613
614# Look for optional headers.
615AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
616
617# Solaris needs some libraries for functions
618AC_SEARCH_LIBS(socket, [socket])
619AC_SEARCH_LIBS(inet_ntoa, [nsl])
620
621AC_SEARCH_LIBS(inet_aton, [socket nsl], ,
622 AC_DEFINE([NEED_INET_ATON], [1],
623 [Define to 1 if the inet_aton() function is missing.]))
624
625# Check for a standalone regex library.
626AC_SEARCH_LIBS(regcomp, [regex])
627
628AC_CHECK_FUNCS(strlcat)
629
630# For HP/UX we need -lipv6 for if_nametoindex, perhaps others.
631AC_SEARCH_LIBS(if_nametoindex, [ipv6])
632
f76938c5
FD
633# For some Solaris nanosleep is found by BIND in librt
634have_nanosleep="no"
635AC_CHECK_FUNC(nanosleep, have_nanosleep="yes")
636if test "$have_nanosleep" = "no"; then
637 AC_CHECK_LIB(rt, nanosleep, have_nanosleep="rt")
638fi
639if test "$have_nanosleep" = "rt"; then
640 LIBS="-lrt $LIBS"
641fi
642
13e5cc6c
FD
643# check for /dev/random (declares HAVE_DEV_RANDOM)
644AC_MSG_CHECKING(for random device)
645AC_ARG_WITH(randomdev,
646 AS_HELP_STRING([--with-randomdev=PATH],[Path for random device
647 (default is /dev/random)]),
648 use_randomdev="$withval", use_randomdev="unspec")
649if test "$use_randomdev" = "unspec"; then
650 if test "$cross_compiling" = "yes"; then
651 AC_MSG_RESULT(unspecified)
652 AC_MSG_ERROR([ need --with-randomdev=PATH or --with-randomdev=no])
653 fi
654 use_randomdev="/dev/random"
655elif test "$use_randomdev" = "yes"; then
656 use_randomdev="/dev/random"
657fi
658if test "$use_randomdev" = "no"; then
659 AC_MSG_RESULT(disabled)
660 BINDCONFIG="$BINDCONFIG --with-randomdev=no"
661else
662 if test "$cross_compiling" = "yes"; then
663 AC_MSG_RESULT($use_randomdev (unchecked))
664 else
665 AC_MSG_RESULT($use_randomdev)
666 AC_CHECK_FILE($use_randomdev,
667 AC_DEFINE([HAVE_DEV_RANDOM], [1],
668 [Define to 1 if you have the /dev/random or other configured file.]),
669 AC_MSG_ERROR(cannot find $use_randomdev))
670 fi
671 BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev"
672fi
673
674BINDIOMUX="--disable-kqueue --disable-epoll --disable-devpoll"
675# check kqueue/epoll/devpoll alternative to select
676AC_ARG_ENABLE(kqueue,
677 AS_HELP_STRING([--enable-kqueue],[use BSD kqueue (default is no)]),
678 want_kqueue="$enableval", want_kqueue="no")
679if test "$want_kqueue" = "yes"; then
680 BINDIOMUX="--enable-kqueue"
681 AC_MSG_WARN([--enable-kqueue is not supported: it may lead to issues such as server looping])
682fi
683AC_ARG_ENABLE(epoll,
684 AS_HELP_STRING([--enable-epoll],[use Linux epoll (default is no)]),
685 want_epoll="$enableval", want_epoll="no")
686if test "$want_epoll" = "yes"; then
687 BINDIOMUX="--enable-epoll"
688 AC_MSG_WARN([--enable-epoll is not supported: it may lead to issues such as server looping])
689fi
690AC_ARG_ENABLE(devpoll,
691 AS_HELP_STRING([--enable-devpoll],[use /dev/poll (default is no)]),
692 want_devpoll="$enableval", want_devpoll="no")
693if test "$want_devpoll" = "yes"; then
694 BINDIOMUX="--enable-devpoll"
695 AC_MSG_WARN([--enable-devpoll is not supported: it may lead to issues such as server looping])
696fi
697AC_SUBST(BINDIOMUX)
698
699# general extra bind configure arguments
700AC_ARG_WITH(bind-extra-config,
701 AS_HELP_STRING([--with-bind-extra-config],[configure bind librairies
702 with some extra options (default is none)]),
703 use_xbindconfig="$withval", use_xbindconfig="")
704case "$use_xbindconfig" in
705yes|no|'')
706 ;;
707*)
708 BINDCONFIG="$BINDCONFIG $use_xbindconfig"
709 AC_MSG_WARN([Most options to bind configure are not supported when used by ISC DHCP])
710 ;;
711esac
712
713# see if there is a "sa_len" field in our interface information structure
714AC_CHECK_MEMBER(struct sockaddr.sa_len,
715 AC_DEFINE([HAVE_SA_LEN], [],
716 [Define to 1 if the sockaddr structure has a length field.]),
717 ,
718 [#include <sys/socket.h>])
719
720# figure out pointer size
721SAVE_CFLAGS="$CFLAGS"
722CFLAGS="$CFLAGS -I$srcdir"
723AC_CHECK_SIZEOF(struct iaddr *, , [
724#include "includes/inet.h"
725#include <stdio.h>
726])
727CFLAGS="$SAVE_CFLAGS"
728
729# Solaris does not have the msg_control or msg_controlen members
730# in the msghdr structure unless you define:
731#
732# _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, and __EXTENSIONS__
733#
734# See the "standards" man page for details.
735#
736# We check for the msg_control member, and if it is not found, we check
737# again with the appropriate defines added to the CFLAGS. (In order to
738# do this we have to remove the check from the cache, which is what the
739# "unset" is for.)
740AC_CHECK_MEMBER(struct msghdr.msg_control,,
741 [CFLAGS="$CFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
742 CFLAGS="$CFLAGS -D__EXTENSIONS__"
743 unset ac_cv_member_struct_msghdr_msg_control
744 AC_CHECK_MEMBER(struct msghdr.msg_control,,
745 [AC_MSG_ERROR([Missing msg_control member in
746 msg_control structure.])],
747 [
748#include <sys/types.h>
749#include <sys/socket.h>
750 ])
751 ],
752 [
753#include <sys/types.h>
754#include <sys/socket.h>
755 ])
756
757AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci,
758 [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])]
759 ,, [#include <linux/if_packet.h>])
760
761# bind/Makefile.in is not from automake so we need 2 variables for bind dir
762BINDSUBDIR=
763BINDDIR=
764BINDSRCDIR=
765BINDLIBIRSDIR=
766BINDLIBDNSDIR=
767BINDLIBISCCFGDIR=
768BINDLIBISCDIR=
769DISTCHECK_LIBBIND_CONFIGURE_FLAG=
770AC_ARG_WITH(libbind,
771 AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH]),
772 use_libbind="$withval", use_libbind="no")
773case "$use_libbind" in
774yes)
775 AC_MSG_ERROR([PATH is required in --with-libbind=PATH])
776 ;;
777no)
778 BINDSUBDIR="\${top_srcdir}/bind"
779 my_abs_srcdir=`cd $srcdir && pwd`
780 BINDDIR="${my_abs_srcdir}/bind"
781 if test ! -d "$srcdir/bind"; then
782 AC_MSG_ERROR([Where to find or build bind includes and libraries must be specified])
783 fi
784 if test -d "$srcdir/bind/bind9"; then
785 BINDSRCDIR="${my_abs_srcdir}/bind/bind9"
786 else
787 if test ! -f "$srcdir/bind/version.tmp"; then
788 AC_MSG_ERROR([Cannot find $srcdir/bind/version.tmp])
789 fi
790 . "$srcdir/bind/version.tmp"
791 bindversion=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
792 BINDSRCDIR="${my_abs_srcdir}/bind/bind-$bindversion"
793 fi
794 AC_CONFIG_FILES([$srcdir/bind/Makefile])
795
796 BINDLIBIRSDIR="$BINDSRCDIR/lib/irs"
797 BINDLIBDNSDIR="$BINDSRCDIR/lib/dns"
798 BINDLIBISCCFGDIR="$BINDSRCDIR/lib/isccfg"
799 BINDLIBISCDIR="$BINDSRCDIR/lib/isc"
800 ;;
801*)
802 if test ! -d "$use_libbind"; then
803 AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
804 fi
6d91a86b
FD
805 if test ! -d "$use_libbind/include" -o \
806 ! -f "$use_libbind/include/isc/buffer.h"
807 then
13e5cc6c
FD
808 AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
809 fi
6d91a86b
FD
810 if test ! -d "$use_libbind/lib" -o \
811 \( ! -f "$use_libbind/lib/libisc.a" -a \
812 ! -f "$use_libbind/lib/libisc.la" \)
813 then
13e5cc6c
FD
814 AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
815 fi
816 BINDDIR="$use_libbind"
817 BINDLIBIRSDIR="$BINDDIR/lib"
818 BINDLIBDNSDIR="$BINDDIR/lib"
819 BINDLIBISCCFGDIR="$BINDDIR/lib"
820 BINDLIBISCDIR="$BINDDIR/lib"
821 DISTCHECK_LIBBIND_CONFIGURE_FLAG="--with-libbind=$use_libbind"
822 ;;
823esac
824AC_SUBST(BINDSUBDIR)
825AC_SUBST(BINDDIR)
826AC_SUBST(BINDSRCDIR)
827AC_SUBST(BINDLIBIRSDIR)
828AC_SUBST(BINDLIBDNSDIR)
829AC_SUBST(BINDLIBISCCFGDIR)
830AC_SUBST(BINDLIBISCDIR)
831AC_SUBST(DISTCHECK_LIBBIND_CONFIGURE_FLAG)
832AM_CONDITIONAL(HAVE_BINDDIR, test "$use_libbind" = "no")
833
13e5cc6c
FD
834#
835# GNU libtool support
836#
837case "$build_os" in
838 sunos*)
839 # Just set the maximum command line length for sunos
840 # as it otherwise takes a exceptionally long time to
841 # work it out. Required for libtool.
842
843 lt_cv_sys_max_cmd_len=4096
844 ;;
845esac
846
847want_libtool="no"
848LT_INIT
849want_libtool="yes"
850
851BINDLT=
bf6f8fce 852DISTCHECK_LIBTOOL_CONFIGURE_FLAG=
13e5cc6c 853AC_ARG_ENABLE(libtool,
6d91a86b
FD
854 AS_HELP_STRING([--enable-libtool],
855[use GNU libtool for dynamic shared libraries (default is yes).]),
13e5cc6c 856 want_libtool="$enableval")
d113bc2c 857
6d91a86b
FD
858if test "$use_libbind" != "no"; then
859 if test "$want_libtool" = "yes" -a \
860 ! -f "$use_libbind/lib/libisc.la"
861 then
862 AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib])
863 fi
864 if test "$want_libtool" = "no" -a \
865 ! -f "$use_libbind/lib/libisc.a"
866 then
867 AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib])
868 fi
869fi
870
13e5cc6c
FD
871if test "$want_libtool" = "no"; then
872 AC_MSG_ERROR([libtool configure is used but libtool is disabled?])
873fi
d113bc2c
FD
874
875DHLIBS=LTLIBRARIES
13e5cc6c 876A=la
bf6f8fce 877BINDLT="--with-libtool --disable-symtable"
36d4e51a 878DISTCHECK_LIBTOOL_CONFIGURE_FLAG="--enable-libtool"
d113bc2c
FD
879
880
881AC_SUBST(DHLIBS)
13e5cc6c
FD
882AC_SUBST(A)
883AC_SUBST(BINDLT)
bf6f8fce
FD
884AC_SUBST(DISTCHECK_LIBTOOL_CONFIGURE_FLAG)
885
886# quoting in Makefile.am.in
887Q=@
888AC_SUBST(Q)
889
890# install bind includes and libraries
891
892want_install_bind="no"
893want_install_bind="yes"
894if test "$want_libtool" = "yes"; then
895 want_install_bind="yes"
896fi
897if test "$use_libbind" != "no"; then
898 want_install_bind="no"
899fi
900AC_ARG_ENABLE(bind_install,
6d91a86b
FD
901 AS_HELP_STRING([--enable-bind-install],
902[install bind includes and libraries.]),
bf6f8fce
FD
903 want_install_bind="$enableval")
904if test "$want_install_bind" = "yes"; then
905 if test "$use_libbind" != "no"; then
906 AC_MSG_WARN([--enable-bind-install does nothing when --with-libbind is set])
907 fi
908elif test "$want_libtool" = "yes" -a "$use_libbind" = "no"; then
909 AC_MSG_WARN([embedded dynamic bind libraries must be installed])
910fi
911AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
13e5cc6c
FD
912
913# OpenLDAP support.
914AC_ARG_WITH(ldap,
915 AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
916 [ldap=$withval],
917 [ldap=no])
918
919# OpenLDAP with SSL support.
920AC_ARG_WITH(ldapcrypto,
921 AS_HELP_STRING([--with-ldapcrypto],[enable OpenLDAP crypto support in dhcpd (default is no)]),
922 [ldapcrypto=$withval],
923 [ldapcrypto=no])
924
925# Gssapi to allow LDAP to authenticate with a keytab
926AC_ARG_WITH(ldap-gssapi,
927 AC_HELP_STRING([--with-ldap-gssapi],
928 [enable krb5/gssapi authentication for OpenLDAP in dhcpd (default is no)]),
929 [ldap_gssapi=$withval],
930 [ldap_gssapi=no])
931
932
933# LDAP CASA auth support.
934AC_ARG_WITH(ldapcasa,
935 AC_HELP_STRING([--with-ldapcasa],
936 [enable LDAP CASA auth support in dhcpd (default is no)]),
937 [ldapcasa=$withval],
938 [ldapcasa=no])
939
940# OpenLDAP support is disabled by default, if enabled then SSL support is an
941# extra optional that is also disabled by default. Enabling LDAP SSL support
942# implies enabling LDAP support. Similarly, KRB5 support implies LDAP support,
943# but doesn't include SSL. The two are not dependant.
944if test x$ldap = xyes || test x$ldapcrypto = xyes || test x$ldap_gssapi = xyes; then
945 saved_LIBS="$LIBS"
946 LIBS=""
947 AC_SEARCH_LIBS(ldap_initialize, [ldap], ,
948 AC_MSG_FAILURE([*** Cannot find ldap_initialize with -lldap - do you need to install an OpenLDAP2 Devel package?]))
949 AC_SEARCH_LIBS(ber_pvt_opt_on, [lber], ,
950 AC_MSG_FAILURE([*** Cannot find ber_pvt_opt_on with -llber - do you need to install an OpenLDAP2 Devel package?]))
951 if test x$ldap_gssapi = xyes ; then
952 AC_SEARCH_LIBS(krb5_init_context, [krb5], ,
953 AC_MSG_FAILURE([*** Cannot find krb5_init_context with -lkrb5 - do you need to install a Kerberos Devel package?]))
954 fi
955
956 # Create LDAP_LIBS which we specify them explicitly rather than lumping them in with LIBS
957 AC_SUBST(LDAP_LIBS, [$LIBS])
958 LIBS="$saved_LIBS"
959
960
961 AC_CHECK_HEADERS([ldap.h])
962 AC_CHECK_FUNCS([inet_pton inet_ntop])
963
964
965 LDAP_CFLAGS="-DLDAP_CONFIGURATION"
966
967 if test x$ldapcasa = xyes ; then
968 AC_CHECK_HEADERS([micasa_mgmd.h],[
969 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_CASA_AUTH"
970 ], AC_MSG_FAILURE([*** Cannot find micasa_mgmd.h for ldap casa auth support]))
971 fi
972
973 if test x$ldapcrypto = xyes ; then
974 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_USE_SSL"
975 fi
976
977 if test x$ldap_gssapi = xyes; then
978 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_USE_GSSAPI"
979 fi
980
981 AC_SUBST(LDAP_CFLAGS, [$LDAP_CFLAGS])
982fi
983
984# Append selected warning levels to CFLAGS before substitution (but after
985# AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
986CFLAGS="$CFLAGS $STD_CWARNINGS"
987
988# Try to add the bind and dhcp include directories
989CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
990
991case "$host" in
992*-darwin*)
993 CFLAGS="$CFLAGS -D__APPLE_USE_RFC_3542";;
994*-solaris*)
995 # As of Solaris 11, ethernet dev files are in /dev/net
996 AC_CHECK_FILE(/dev/net,
997 [AC_DEFINE([USE_DEV_NET], [1],
998 [Define to 1 if ethernet devices are in /dev/net])])
999 ;;
1000esac
1001
1002AC_C_FLEXIBLE_ARRAY_MEMBER
1003
1004AC_CONFIG_FILES([
1005 Makefile
1006 client/Makefile
1007 client/tests/Makefile
1008 common/Makefile.am
1009 common/Makefile
1010 common/tests/Makefile
1011 dhcpctl/Makefile.am
1012 dhcpctl/Makefile
1013 includes/Makefile
1014 omapip/Makefile.am
1015 omapip/Makefile
1016 relay/Makefile
1017 server/Makefile
1018 tests/Makefile.am
1019 tests/Makefile
1020 tests/unittest.sh
1021 server/tests/Makefile
1022 doc/devel/doxyfile
1023])
1024AC_OUTPUT
1025
1026AC_MSG_NOTICE([postconfig: run automake in $srcdir])
1027(cd $srcdir; automake)
1028AC_MSG_NOTICE([postconfig: rerun config.status])
1029sh ./config.status
1030
1031if test "$enable_dhcpv4o6" = "yes"; then
1032 DHCP_VERSIONS="DHCPv4, DHCPv6 and DHCPv4-over-DHCPv6"
1033elif test "$enable_dhcpv6" != "no"; then
1034 DHCP_VERSIONS="DHCPv4 and DHCPv6"
1035else
1036 DHCP_VERSIONS="DHCPv4"
1037fi
1038
1039cat > config.report << END
1040
1041 ISC DHCP source configure results:
1042 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1043
1044Package:
1045 Name: $PACKAGE_NAME
1046 Version: $PACKAGE_VERSION
1047
1048C Compiler: $CC
1049
1050Flags:
1051 DEFS: $DEFS
1052 CFLAGS: $CFLAGS
1053
1054DHCP versions: $DHCP_VERSIONS
1055
1056Features:
1057 debug: $enable_debug
1058 failover: $enable_failover
1059 execute: $enable_execute
1060 binary-leases: $enable_binary_leases
1061 dhcpv6: $enable_dhcpv6
1062 delayed-ack: $enable_delayed_ack
4406f9b0 1063 dhcpv4o6: $enable_dhcpv4o6
563f0b8a 1064 relay-port: $enable_relay_port
13e5cc6c
FD
1065
1066Developer:
1067 ATF unittests : $atf_path
1068
1069END
1070# TODO: Add Perl system tests
1071
1072if test "$atf_path" != "no"
1073then
1074echo "ATF_CFLAGS : $ATF_CFLAGS" >> config.report
1075echo "ATF_LDFLAGS : $ATF_LDFLAGS" >> config.report
1076echo "ATF_BIN : $ATF_BIN" >> config.report
1077echo
1078fi
1079
1080cat config.report
1081
1082echo
1083echo Now you can type "make" to build ISC DHCP
1084echo