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