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