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