1 # Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 1998-2003 Internet Software Consortium.
4 # Permission to use, copy, modify, and/or distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
8 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 # PERFORMANCE OF THIS SOFTWARE.
16 # Copyright (C) 1998-2003 Internet Software Consortium.
18 # Permission to use, copy, modify, and/or distribute this software for any
19 # purpose with or without fee is hereby granted, provided that the above
20 # copyright notice and this permission notice appear in all copies.
22 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
23 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
25 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
26 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
27 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28 # PERFORMANCE OF THIS SOFTWARE.
32 esyscmd([sed -e 's/^/# /' -e '/Portions of this code/,$d' COPYRIGHT])dnl
35 AC_INIT(BIND, [9.10], [bind9-bugs@isc.org], [], [https://www.isc.org/downloads/BIND/])
38 AC_CONFIG_HEADER(config.h)
39 AC_CONFIG_MACRO_DIR([m4])
50 # Just set the maximum command line length for sunos as it otherwise
51 # takes a exceptionally long time to work it out. Required for libtool.
53 lt_cv_sys_max_cmd_len=4096;
61 AC_SUBST(STD_CINCLUDES)
62 AC_SUBST(STD_CDEFINES)
63 AC_SUBST(STD_CWARNINGS)
66 AC_SUBST(BACKTRACECFLAGS)
68 # Warn if the user specified libbind, which is now deprecated
69 AC_ARG_ENABLE(libbind, [ --enable-libbind deprecated])
71 case "$enable_libbind" in
73 AC_MSG_ERROR(['libbind' is no longer part of the BIND 9 distribution.
74 It is available from http://www.isc.org as a separate download.])
80 AC_ARG_ENABLE(warn_shadow, [ --enable-warn-shadow turn on -Wshadow when compiling])
82 AC_ARG_ENABLE(warn_error, [ --enable-warn-error turn on -Werror when compiling])
84 AC_ARG_ENABLE(developer, [ --enable-developer enable developer build settings])
85 case "$enable_developer" in
87 STD_CDEFINES="$STD_CDEFINES -DISC_LIST_CHECKINIT=1"
88 test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes
89 test "${with_atf+set}" = set || with_atf=yes
90 test "${enable_filter_aaaa+set}" = set || enable_filter_aaaa=yes
91 test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes
92 test "${enable_symtable+set}" = set || enable_symtable=all
93 test "${enable_sit+set}" = set || enable_sit=yes
94 test "${enable_warn_error+set}" = set || enable_warn_error=yes
95 test "${enable_warn_shadow+set}" = set || enable_warn_shadow=yes
99 #libseccomp sandboxing
100 AC_ARG_ENABLE(seccomp,
101 AS_HELP_STRING([--enable-seccomp],[enable support for libseccomp system call filtering [default=no]]))
102 case "$enable_seccomp" in
108 AC_MSG_WARN([seccomp is not supported on non-linux platforms; disabling it])
112 AC_SEARCH_LIBS(seccomp_init, [seccomp])
113 if test "$ac_cv_search_seccomp_init" = "-lseccomp" ; then
118 #include <sys/prctl.h>
119 #include <linux/seccomp.h>
125 ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0);
137 prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
151 , AC_DEFINE([HAVE_LIBSECCOMP], 1,
152 [Define to use libseccomp system call filtering.])
162 # Make very sure that these are the first files processed by
163 # config.status, since we use the processed output as the input for
164 # AC_SUBST_FILE() substitutions in other files.
166 AC_CONFIG_FILES([make/rules make/includes])
173 # The POSIX ln(1) program. Non-POSIX systems may substitute
174 # "copy" or something.
181 ar program not found. Please fix your PATH to include the directory in
182 which ar resides, or set AR in the environment with the full path to ar.
191 AC_PATH_PROGS(ETAGS, etags emacs-etags)
194 # Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
195 # GNU emacs etags, and it requires the -L flag.
197 if test "X$ETAGS" != "X"; then
198 AC_MSG_CHECKING(for Exuberant Ctags etags)
199 if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
209 # Perl is optional; it is used only by some of the system test scripts.
210 # Note: the backtrace feature (see below) uses perl to build the symbol table,
211 # but it still compiles without perl, in which case an empty table will be used.
213 AC_PATH_PROGS(PERL, perl5 perl)
217 # Python is also optional; it is used by the tools in bin/python.
218 # If python is unavailable, we simply don't build those.
221 [ --with-python=PATH specify path to python interpreter],
222 use_python="$withval", use_python="unspec")
224 python="python python3 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5 python2.4"
225 testscript='try: import argparse
227 case "$use_python" in
229 AC_MSG_CHECKING([for python support])
230 AC_MSG_RESULT(disabled)
233 case "$use_python" in
237 AC_PATH_PROGS(PYTHON, $p)
238 if test "X$PYTHON" == "X"; then
241 AC_MSG_CHECKING([python module 'argparse'])
242 if ${PYTHON:-false} -c "$testscript"; then
243 AC_MSG_RESULT([found, using $PYTHON])
246 AC_MSG_RESULT([not found])
247 unset ac_cv_path_PYTHON
250 if test "X$PYTHON" == "X"
252 AC_MSG_CHECKING([for python support])
253 case "$use_python" in
255 AC_MSG_RESULT(disabled)
258 AC_MSG_ERROR([missing python])
264 case "$use_python" in
269 AC_PATH_PROGS(PYTHON, $use_python)
272 AC_MSG_CHECKING([python module 'argparse'])
273 if ${PYTHON:-false} -c "$testscript"; then
274 AC_MSG_RESULT([found, using $PYTHON])
277 AC_MSG_ERROR([not found])
287 if test "X$PYTHON" != "X"; then
294 AC_SUBST(PYTHON_TOOLS)
297 # Special processing of paths depending on whether --prefix,
298 # --sysconfdir or --localstatedir arguments were given. What's
299 # desired is some compatibility with the way previous versions
300 # of BIND built; they defaulted to /usr/local for most parts of
301 # the installation, but named.boot/named.conf was in /etc
302 # and named.pid was in /var/run.
304 # So ... if none of --prefix, --sysconfdir or --localstatedir are
305 # specified, set things up that way. If --prefix is given, use
306 # it for sysconfdir and localstatedir the way configure normally
307 # would. To change the prefix for everything but leave named.conf
308 # in /etc or named.pid in /var/run, then do this the usual configure way:
309 # ./configure --prefix=/somewhere --sysconfdir=/etc
310 # ./configure --prefix=/somewhere --localstatedir=/var
312 # To put named.conf and named.pid in /usr/local with everything else,
313 # set the prefix explicitly to /usr/local even though that's the default:
314 # ./configure --prefix=/usr/local
318 case "$sysconfdir" in
323 case "$localstatedir" in
332 # Make sure INSTALL uses an absolute path, else it will be wrong in all
333 # Makefiles, since they use make/rules.in and INSTALL will be adjusted by
334 # configure based on the location of the file where it is substituted.
335 # Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
336 # subdirectory of install-sh, This relative path will be wrong for all
337 # directories more than one level down from install-sh.
344 # Not all systems have dirname.
347 ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
350 ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
351 test "$ac_dir" = "$ac_prog" && ac_dir=.
352 test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
353 INSTALL="$ac_dir/$ac_prog"
358 # On these hosts, we really want to use cc, not gcc, even if it is
359 # found. The gcc that these systems have will not correctly handle
362 # However, if the user sets $CC to be something, let that override
365 if test "X$CC" = "X" ; then
371 # Use Sun's cc if it is available, but watch
372 # out for /usr/ucb/cc; it will never be the right
375 # If setting CC here fails, the AC_PROG_CC done
376 # below might still find gcc.
377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
378 for ac_dir in $PATH; do
379 test -z "$ac_dir" && ac_dir=.
385 if test -f "$ac_dir/cc"; then
406 # gcc's optimiser is broken at -02 for ultrasparc
408 if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
417 # OS dependent CC flags
420 # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
421 # -D_XOPEN_SOURCE_EXTENDED.
423 STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
424 CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
426 #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
428 STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
429 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
432 # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
434 STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
435 CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
437 # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
438 # parts of the IPv6 Advanced Socket API as a result. This is stupid
439 # as it breaks how the two halves (Basic and Advanced) of the IPv6
440 # Socket API were designed to be used but we have to live with it.
441 # Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
442 *-linux* | *-kfreebsd*-gnu*)
443 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
444 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
447 # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use.
448 # Setting this is sufficient to select the correct behavior for BIND 9.
451 STD_CDEFINES="$STD_CDEFINES -D__APPLE_USE_RFC_3542"
452 CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542"
457 # CCNOOPT defaults to -O0 on gcc and disables optimization when is last
459 if test "X$CCNOOPT" = "X" -a "X$GCC" = "Xyes"; then
465 AC_CHECK_HEADERS(fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h sys/socket.h net/route.h linux/netlink.h linux/rtnetlink.h,,,
466 [$ac_includes_default
467 #ifdef HAVE_SYS_PARAM_H
468 # include <sys/param.h>
470 #ifdef HAVE_SYS_SOCKET_H
471 # include <sys/socket.h>
478 AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
479 AC_C_FLEXIBLE_ARRAY_MEMBER
482 # Check for the existence of mmap to enable the fast format zones
487 # Older versions of HP/UX don't define seteuid() and setegid()
489 AC_CHECK_FUNCS(seteuid setresuid)
490 AC_CHECK_FUNCS(setegid setresgid)
492 # BSDI doesn't have ftello fseeko
493 AC_CHECK_FUNCS(ftello fseeko)
496 # UnixWare 7.1.1 with the feature supplement to the UDK compiler
497 # is reported to not support "static inline" (RT #1212).
499 AC_MSG_CHECKING(for static inline breakage)
501 static inline int foo1() {
505 static inline int foo2() {
511 AC_DEFINE(inline, ,[Define to empty if your compiler does not support "static inline".])])
514 AC_CHECK_TYPE(ssize_t, int)
515 AC_CHECK_TYPE(uintptr_t,unsigned long)
516 AC_CHECK_TYPE(socklen_t,
517 [AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
521 #include <sys/types.h>
522 #include <sys/socket.h>
523 int getsockname(int, struct sockaddr *, size_t *);
525 [AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
526 [AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
529 #include <sys/types.h>
530 #include <sys/socket.h>
532 AC_SUBST(ISC_SOCKADDR_LEN_T)
534 AC_MSG_CHECKING(for long long)
535 AC_TRY_COMPILE([],[long long i = 0; return (0);],
537 ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
539 ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
540 AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
543 # check for GCC noreturn attribute
545 AC_MSG_CHECKING(for GCC noreturn attribute)
546 AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));],
548 ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
549 ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"],
551 ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
552 ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST"])
553 AC_SUBST(ISC_PLATFORM_NORETURN_PRE)
554 AC_SUBST(ISC_PLATFORM_NORETURN_POST)
557 # check if we have lifconf
559 AC_MSG_CHECKING(for struct lifconf)
561 #include <sys/types.h>
562 #include <sys/socket.h>
566 struct lifconf lifconf;
567 lifconf.lifc_len = 0;
571 ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
573 ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
574 AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
577 # check if we have kqueue
579 AC_ARG_ENABLE(kqueue,
580 [ --enable-kqueue use BSD kqueue when available [[default=yes]]],
581 want_kqueue="$enableval", want_kqueue="yes")
584 AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
585 case $ac_cv_have_kqueue in
587 ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
590 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
595 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
598 AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
601 # check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
602 # so we need to try running the code, not just test its existence.
605 [ --enable-epoll use Linux epoll when available [[default=auto]]],
606 want_epoll="$enableval", want_epoll="auto")
609 AC_MSG_CHECKING(epoll support)
611 #include <sys/epoll.h>
613 if (epoll_create(1) < 0)
619 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
621 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"],
623 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
626 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
629 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
632 AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
635 # check if we support /dev/poll
637 AC_ARG_ENABLE(devpoll,
638 [ --enable-devpoll use /dev/poll when available [[default=yes]]],
639 want_devpoll="$enableval", want_devpoll="yes")
640 case $want_devpoll in
642 AC_CHECK_HEADERS(sys/devpoll.h devpoll.h,
643 ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
645 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
649 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
652 AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
655 # check if we need to #include sys/select.h explicitly
657 case $ac_cv_header_unistd_h in
659 AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
661 #include <sys/types.h> /* Ultrix */
662 #include <unistd.h>],
663 [fd_set read_set; return (0);],
665 ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
666 LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
668 case $ac_cv_header_sys_select_h in
670 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
671 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
674 AC_MSG_ERROR([need either working unistd.h or sys/select.h])
680 case $ac_cv_header_sys_select_h in
682 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
683 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
686 AC_MSG_ERROR([need either unistd.h or sys/select.h])
691 AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
692 AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
695 # Find the machine's endian flavor.
705 [ --with-geoip=PATH Build with GeoIP support (yes|no|path)],
706 use_geoip="$withval", use_geoip="no")
708 if test "$use_geoip" = "yes"
710 for d in /usr /usr/local /opt/local
712 if test -f $d/include/GeoIP.h
722 AC_MSG_CHECKING([for GeoIP support])
723 AC_MSG_RESULT([disabled])
726 if test -d "$use_geoip" -o -L "$use_geoip"
728 CFLAGS="$CFLAGS -I$use_geoip/include"
729 CPPFLAGS="$CPPFLAGS -I$use_geoip/include"
730 LIBS="$LIBS -L$use_geoip/lib"
732 netbsd*|openbsd*|solaris*)
733 LIBS="$LIBS -Wl,-rpath=$use_geoip/lib"
736 elif test "$use_geoip" = "yes"
738 AC_MSG_ERROR([GeoIP path not found])
740 AC_MSG_ERROR([GeoIP path $use_geoip does not exist])
742 AC_CHECK_HEADER(GeoIP.h, [],
743 [AC_MSG_ERROR([GeoIP header file not found])]
745 AC_SEARCH_LIBS(GeoIP_open, GeoIP, [],
746 [AC_MSG_ERROR([GeoIP library not found])]
748 AC_SEARCH_LIBS(fabsf, m, [],
749 [AC_MSG_ERROR([Math library not found])]
751 AC_DEFINE(HAVE_GEOIP, 1, Build with GeoIP support)
752 GEOIPLINKSRCS='${GEOIPLINKSRCS}'
753 GEOIPLINKOBJS='${GEOIPLINKOBJS}'
754 AC_MSG_CHECKING([for GeoIP support])
757 AC_MSG_CHECKING([for GeoIP Country IPv6 support])
761 #include <netinet/in.h>
764 GeoIP_country_name_by_ipnum_v6(NULL, in6);
768 AC_DEFINE(HAVE_GEOIP_V6, 1, Build with GeoIP Country IPv6 support)
770 [AC_MSG_RESULT([no])]
773 AC_MSG_CHECKING([for GeoIP City IPv6 support])
777 #include <GeoIPCity.h>
778 #include <netinet/in.h>
781 int i = GEOIP_CITY_EDITION_REV0_V6;
782 GeoIP_record_by_ipnum_v6(NULL, in6);
786 AC_DEFINE(HAVE_GEOIP_CITY_V6, 1, Build with GeoIP City IPv6 support)
788 [AC_MSG_RESULT([no])]
792 AC_SUBST(GEOIPLINKSRCS)
793 AC_SUBST(GEOIPLINKOBJS)
795 AC_MSG_CHECKING(for GSSAPI library)
797 [ --with-gssapi=PATH Specify path for system-supplied GSSAPI [[default=yes]]],
798 use_gssapi="$withval", use_gssapi="yes")
800 # gssapi is just the framework, we really require kerberos v5, so
801 # look for those headers (the gssapi headers must be there, too)
802 # The problem with this implementation is that it doesn't allow
803 # for the specification of gssapi and krb5 headers in different locations,
804 # which probably ought to be fixed although fixing might raise the issue of
805 # trying to build with incompatible versions of gssapi and krb5.
806 if test "$use_gssapi" = "yes"
808 # first, deal with the obvious
809 if test \( -f /usr/include/kerberosv5/krb5.h -o \
810 -f /usr/include/krb5/krb5.h -o \
811 -f /usr/include/krb5.h \) -a \
812 \( -f /usr/include/gssapi.h -o \
813 -f /usr/include/gssapi/gssapi.h \)
817 krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr"
820 if test -f $d/include/gssapi/gssapi_krb5.h -o \
823 if test -f $d/include/gssapi/gssapi.h -o \
824 -f $d/include/gssapi.h
835 case "$use_gssapi" in
837 AC_MSG_RESULT(disabled)
841 AC_MSG_ERROR([--with-gssapi must specify a path])
844 AC_MSG_RESULT(looking in $use_gssapi/lib)
845 USE_GSSAPI='-DGSSAPI'
846 saved_cppflags="$CPPFLAGS"
847 CPPFLAGS="-I$use_gssapi/include $CPPFLAGS"
848 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
849 [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"
850 gssapi_hack="#include <$ac_header>"])
852 if test "$ISC_PLATFORM_GSSAPIHEADER" = ""; then
853 AC_MSG_ERROR([gssapi.h not found])
856 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h,
857 [ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>"
858 gssapi_krb5_hack="#include <$ac_header>"])
860 AC_CHECK_HEADERS(krb5.h krb5/krb5.h kerberosv5/krb5.h,
861 [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"
862 krb5_hack="#include <$ac_header>"])
864 if test "$ISC_PLATFORM_KRB5HEADER" = ""; then
865 AC_MSG_ERROR([krb5.h not found])
869 # XXXDCL This probably doesn't work right on all systems.
870 # It will need to be worked on as problems become evident.
872 # Essentially the problems here relate to two different
873 # areas. The first area is building with either KTH
874 # or MIT Kerberos, particularly when both are present on
875 # the machine. The other is static versus dynamic linking.
877 # On the KTH vs MIT issue, Both have libkrb5 that can mess
878 # up the works if one implementation ends up trying to
879 # use the other's krb. This is unfortunately a situation
880 # that very easily arises.
882 # Dynamic linking when the dependency information is built
883 # into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
884 # all such problems go away, but when that setup is not
885 # present, because either the dynamic libraries lack
886 # dependencies or static linking is being done, then the
887 # problems start to show up.
891 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
892 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
894 "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
895 "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
896 "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
897 "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
900 # Note that this does not include $saved_libs, because
901 # on FreeBSD machines this configure script has added
902 # -L/usr/local/lib to LIBS, which can make the
903 # -lgssapi_krb5 test succeed with shared libraries even
904 # when you are trying to build with KTH in /usr/lib.
905 if test "$use_gssapi" = "/usr"
909 LIBS="-L$use_gssapi/lib $TRY_LIBS"
911 AC_MSG_CHECKING(linking as $TRY_LIBS)
913 #include <sys/types.h>
917 ] , [gss_acquire_cred(NULL, NULL, 0, NULL, 0, NULL, NULL, NULL);krb5_init_context(NULL);
918 #if defined(HAVE_GSSAPI_KRB5_H) || defined(HAVE_GSSAPI_GSSAPI_KRB5_H)
919 gsskrb5_register_acceptor_identity(NULL);
921 gssapi_linked=yes, gssapi_linked=no)
922 case $gssapi_linked in
923 yes) AC_MSG_RESULT(yes); break ;;
924 no) AC_MSG_RESULT(no) ;;
928 CPPFLAGS="$saved_cppflags"
930 case $gssapi_linked in
931 no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
935 # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib
936 # but MIT in /usr/local/lib and trying to build with KTH.
937 # /usr/local/lib can end up earlier on the link lines.
938 # Like most kludges, this one is not only inelegant it
939 # is also likely to be the wrong thing to do at least as
940 # many times as it is the right thing. Something better
943 if test "$use_gssapi" = "/usr" -a \
944 -f /usr/local/lib/libkrb5.a; then
948 case "$FIX_KTH_VS_MIT" in
950 case "$enable_static_linking" in
951 yes) gssapi_lib_suffix=".a" ;;
952 *) gssapi_lib_suffix=".so" ;;
961 sed -e s%^-l%$use_gssapi/lib/lib% \
962 -e s%$%$gssapi_lib_suffix%`
963 NEW_LIBS="$NEW_LIBS $new_lib"
966 AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
974 DST_GSSAPI_INC="-I$use_gssapi/include"
975 DNS_GSSAPI_LIBS="$LIBS"
977 AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include)
982 AC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
983 AC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
984 AC_SUBST(ISC_PLATFORM_GSSAPI_KRB5_HEADER)
985 AC_SUBST(ISC_PLATFORM_KRB5HEADER)
988 AC_SUBST(DST_GSSAPI_INC)
989 AC_SUBST(DNS_GSSAPI_LIBS)
990 DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS"
993 # Applications linking with libdns also need to link with these libraries.
996 AC_SUBST(DNS_CRYPTO_LIBS)
999 # was --with-randomdev specified?
1001 AC_MSG_CHECKING(for random device)
1002 AC_ARG_WITH(randomdev,
1003 [ --with-randomdev=PATH Specify path for random device],
1004 use_randomdev="$withval", use_randomdev="unspec")
1006 case "$use_randomdev" in
1008 case "$cross_compiling" in
1010 AC_MSG_RESULT(unspecified)
1011 AC_MSG_ERROR([ need --with-randomdev=PATH or --with-randomdev=no])
1015 devrandom=/dev/arandom
1018 devrandom=/dev/urandom
1021 AC_MSG_RESULT($devrandom)
1022 AC_CHECK_FILE($devrandom,
1023 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
1028 AC_MSG_ERROR([--with-randomdev must specify a path])
1031 AC_MSG_RESULT(disabled)
1034 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
1035 AC_MSG_RESULT(using "$use_randomdev")
1040 # Only check dsa signature generation on these platforms when performing
1044 if grep "#define PATH_RANDOMDEV " confdefs.h > /dev/null
1055 # Do we have arc4random(), etc ? arc4random_addrandom() has been removed
1056 # from OpenBSD 5.5 onwards.
1058 AC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM))
1059 AC_CHECK_FUNC(arc4random_addrandom, AC_DEFINE(HAVE_ARC4RANDOM_ADDRANDOM))
1061 sinclude(config.threads.in)dnl
1065 if test "X$GCC" = "Xyes"; then
1069 CCOPT="$CCOPT -pthread"
1070 CCNOOPT="$CCNOOPT -pthread"
1071 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
1075 CCOPT="$CCOPT -pthread"
1076 CCNOOPT="$CCNOOPT -pthread"
1079 LIBS="$LIBS -lthread"
1082 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
1089 CCOPT="$CCOPT -pthread"
1090 CCNOOPT="$CCNOOPT -pthread"
1095 CCNOOPT="$CCNOOPT -mt"
1098 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
1100 *-sco-sysv*uw*|*-*-sysv*UnixWare*)
1102 CCOPT="$CCOPT -Kthread"
1103 CCNOOPT="$CCNOOPT -Kthread"
1107 CCOPT="$CCOPT -Kpthread"
1108 CCNOOPT="$CCNOOPT -Kpthread"
1112 ALWAYS_DEFINES="-D_REENTRANT"
1113 ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
1114 THREADOPTOBJS='${THREADOPTOBJS}'
1115 THREADOPTSRCS='${THREADOPTSRCS}'
1118 # We'd like to use sigwait() too
1120 AC_CHECK_FUNC(sigwait,
1121 AC_DEFINE(HAVE_SIGWAIT),
1122 AC_CHECK_LIB(c, sigwait,
1123 AC_DEFINE(HAVE_SIGWAIT),
1124 AC_CHECK_LIB(pthread, sigwait,
1125 AC_DEFINE(HAVE_SIGWAIT),
1126 AC_CHECK_LIB(pthread, _Psigwait,
1127 AC_DEFINE(HAVE_SIGWAIT),))))
1129 AC_CHECK_FUNC(pthread_attr_getstacksize,
1130 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
1132 AC_CHECK_FUNC(pthread_attr_setstacksize,
1133 AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
1135 AC_ARG_WITH(locktype,
1136 [ --with-locktype=ARG Specify mutex lock type (adaptive or standard)],
1137 locktype="$withval", locktype="adaptive")
1141 AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
1143 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1145 #include <pthread.h>
1147 return (PTHREAD_MUTEX_ADAPTIVE_NP);
1149 [ AC_MSG_RESULT(using adaptive lock type)
1150 AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
1151 [Support for PTHREAD_MUTEX_ADAPTIVE_NP]) ],
1152 [ AC_MSG_RESULT(using standard lock type) ])
1155 AC_MSG_RESULT(using standard lock type)
1158 AC_MSG_ERROR([You must specify "adaptive" or "standard" for --with-locktype.])
1162 AC_CHECK_HEADERS(sched.h)
1166 AC_CHECK_LIB(rt, sched_yield)
1170 AC_CHECK_FUNCS(sched_yield pthread_yield pthread_yield_np)
1173 # Additional OS-specific issues related to pthreads and sigwait.
1177 # One more place to look for sigwait.
1180 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
1182 *-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
1183 *-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
1184 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1187 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1192 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
1193 # called before certain pthreads calls. This is deprecated
1196 *-bsdi3.*|*-bsdi4.0*)
1197 AC_DEFINE(NEED_PTHREAD_INIT)
1200 # LinuxThreads requires some changes to the way we
1201 # deal with signals.
1204 AC_DEFINE(HAVE_LINUXTHREADS)
1207 # Ensure the right sigwait() semantics on Solaris and make
1208 # sure we call pthread_setconcurrency.
1211 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
1212 AC_CHECK_FUNC(pthread_setconcurrency,
1213 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
1216 # UnixWare does things its own way.
1218 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1219 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
1224 # Look for sysconf to allow detection of the number of processors.
1226 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
1229 ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
1230 thread_dir=nothreads
1236 AC_SUBST(ALWAYS_DEFINES)
1237 AC_SUBST(ISC_PLATFORM_USETHREADS)
1238 AC_SUBST(THREADOPTOBJS)
1239 AC_SUBST(THREADOPTSRCS)
1240 ISC_THREAD_DIR=$thread_dir
1241 AC_SUBST(ISC_THREAD_DIR)
1243 AC_MSG_CHECKING(for libtool)
1244 AC_ARG_WITH(libtool,
1245 [ --with-libtool use GNU libtool],
1246 use_libtool="$withval", use_libtool="no")
1248 case $use_libtool in
1254 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
1255 LIBTOOL_MODE_COMPILE='--mode=compile --tag=CC'
1256 LIBTOOL_MODE_INSTALL='--mode=install --tag=CC'
1257 LIBTOOL_MODE_LINK='--mode=link --tag=CC'
1258 INSTALL_LIBRARY='${INSTALL_PROGRAM}'
1260 *) LIBTOOL_ALLOW_UNDEFINED= ;;
1263 *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
1264 *) LIBTOOL_IN_MAIN= ;;
1274 LIBTOOL_MODE_COMPILE=
1275 LIBTOOL_MODE_INSTALL=
1277 LIBTOOL_ALLOW_UNDEFINED=
1279 INSTALL_LIBRARY='${INSTALL_DATA}'
1282 AC_SUBST(INSTALL_LIBRARY)
1285 # was --enable-native-pkcs11 specified?
1286 # (note it implies both --without-openssl and --with-pkcs11)
1288 AC_ARG_ENABLE(native-pkcs11,
1289 [ --enable-native-pkcs11 use native PKCS11 for all crypto [[default=no]]],
1290 want_native_pkcs11="$enableval", want_native_pkcs11="no")
1293 # was --with-openssl specified?
1295 AC_ARG_WITH(openssl,
1296 [ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
1297 (Crypto is required for DNSSEC)],
1298 use_openssl="$withval", use_openssl="auto")
1301 # was --with-pkcs11 specified?
1304 [ --with-pkcs11[=PATH] Build with PKCS11 support [yes|no|path]
1305 (PATH is for the PKCS11 provider)],
1306 use_pkcs11="$withval", use_pkcs11="auto")
1309 # were --with-ecdsa, --with-gost, --with-aes specified
1311 AC_ARG_WITH(ecdsa, [ --with-ecdsa Crypto ECDSA],
1312 with_ecdsa="$withval", with_ecdsa="auto")
1313 AC_ARG_WITH(gost, [ --with-gost Crypto GOST [yes|no|raw|asn1].],
1314 with_gost="$withval", with_gost="auto")
1315 AC_ARG_WITH(aes, [ --with-aes Crypto AES],
1316 with_aes="$withval", with_aes="checksit")
1319 # was --enable-openssl-hash specified?
1321 AC_ARG_ENABLE(openssl-hash,
1322 [ --enable-openssl-hash use OpenSSL for hash functions [[default=no]]],
1323 want_openssl_hash="$enableval", want_openssl_hash="checksit")
1326 # Enable Source Identity Token support
1328 AC_MSG_CHECKING(for Source Identity Token support)
1330 [ --enable-sit enable source identity token [[default=no]]],
1331 enable_sit="$enableval", enable_sit="no")
1333 ISC_PLATFORM_USESIT="#undef ISC_PLATFORM_USESIT"
1335 case "$enable_sit" in
1338 ISC_PLATFORM_USESIT="#define ISC_PLATFORM_USESIT 1"
1345 AC_MSG_ERROR("enable-sit requires yes or no")
1348 AC_SUBST(ISC_PLATFORM_USESIT)
1352 # Source Identity Token algorithm choice
1354 AC_ARG_WITH(sit-alg,
1355 [ --with-sit-alg=ALG choose the algorithm for SIT [[aes|sha1|sha256]]],
1356 with_sit_alg="$withval", with_sit_alg="auto")
1358 if test "$enable_sit" = "yes"
1360 case $with_sit_alg in
1365 with_sit_alg="sha256"
1368 if test "$with_aes" != "no"
1375 if test "$with_aes" != "no"
1382 if test "with_aes" = "checksit"
1387 AC_MSG_CHECKING(for OpenSSL library)
1389 openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
1390 if test "$use_openssl" = "auto"
1392 if test "$want_native_pkcs11" = "yes"
1394 use_openssl="native_pkcs11"
1396 for d in $openssldirs
1398 if test -f $d/include/openssl/opensslv.h
1409 case "$with_gost" in
1414 AC_DEFINE(PREFER_GOSTASN1, 1,
1415 [Define if GOST private keys are encoded in ASN.1.])
1422 AC_MSG_ERROR(unknown GOST private key encoding)
1426 case "$use_openssl" in
1428 AC_MSG_RESULT(disabled because of native PKCS11)
1430 CRYPTO="-DPKCS11CRYPTO"
1431 OPENSSLGOSTLINKOBJS=""
1432 OPENSSLGOSTLINKSRS=""
1440 OPENSSLGOSTLINKOBJS=""
1441 OPENSSLGOSTLINKSRS=""
1448 OPENSSLGOSTLINKOBJS=""
1449 OPENSSLGOSTLINKSRS=""
1453 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
1454 If you don't want OpenSSL, use --without-openssl])
1457 if test "$want_native_pkcs11" = "yes"
1460 AC_MSG_ERROR([OpenSSL and native PKCS11 cannot be used together.])
1462 if test "$use_openssl" = "yes"
1464 # User did not specify a path - guess it
1465 for d in $openssldirs
1467 if test -f $d/include/openssl/opensslv.h
1473 if test "$use_openssl" = "yes"
1475 AC_MSG_RESULT(not found)
1477 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
1479 elif ! test -f "$use_openssl"/include/openssl/opensslv.h
1481 AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found])
1484 if test "$use_openssl" = "/usr"
1487 DST_OPENSSL_LIBS="-lcrypto"
1489 DST_OPENSSL_INC="-I$use_openssl/include"
1492 DST_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
1495 DST_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
1499 # Apple's ld seaches for serially for dynamic
1500 # then static libraries. This means you can't
1501 # use -L to override dynamic system libraries
1502 # with static ones when linking. Instead
1503 # we specify a absolute path.
1505 if test -f "$use_openssl/lib/libcrypto.dylib"
1507 DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
1509 DST_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a"
1513 DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
1517 AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include)
1520 saved_cflags="$CFLAGS"
1522 CFLAGS="$CFLAGS $DST_OPENSSL_INC"
1523 LIBS="$LIBS $DST_OPENSSL_LIBS"
1524 AC_MSG_CHECKING(whether linking with OpenSSL works)
1526 #include <openssl/err.h>
1532 [AC_MSG_RESULT(yes)],
1534 AC_MSG_ERROR(Could not run test program using OpenSSL from
1535 $use_openssl/lib and $use_openssl/include.
1536 Please check the argument to --with-openssl and your
1537 shared library configuration (e.g., LD_LIBRARY_PATH).)],
1538 [AC_MSG_RESULT(assuming it does work on target platform)])
1540 AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
1542 #include <openssl/err.h>],
1543 [ DSO_METHOD_dlfcn(); ],
1544 [AC_MSG_RESULT(no)],
1547 #include <openssl/err.h>
1548 ],[ DSO_METHOD_dlfcn(); ],
1550 DST_OPENSSL_LIBS="$DST_OPENSSL_LIBS -ldl"
1552 [AC_MSG_RESULT(unknown)
1553 AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
1554 [AC_MSG_RESULT(assuming it does work on target platform)])
1556 [AC_MSG_RESULT(assuming it does work on target platform)]
1559 AC_ARG_ENABLE(openssl-version-check,
1560 [AC_HELP_STRING([--enable-openssl-version-check],
1561 [check OpenSSL version @<:@default=yes@:>@])])
1562 case "$enable_openssl_version_check" in
1564 AC_MSG_CHECKING(OpenSSL library version)
1567 #include <openssl/opensslv.h>
1569 if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
1570 OPENSSL_VERSION_NUMBER < 0x00908000L) ||
1571 OPENSSL_VERSION_NUMBER >= 0x0090804fL)
1573 printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
1574 OPENSSL_VERSION_NUMBER);
1575 printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n"
1576 "Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n");
1580 [AC_MSG_RESULT(ok)],
1581 [AC_MSG_RESULT(not compatible)
1584 [AC_MSG_RESULT(assuming target platform has compatible version)])
1587 AC_MSG_RESULT(Skipped OpenSSL version check)
1591 AC_MSG_CHECKING(for OpenSSL DSA support)
1592 if test -f $use_openssl/include/openssl/dsa.h
1594 AC_DEFINE(HAVE_OPENSSL_DSA)
1600 AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512)
1602 AC_MSG_CHECKING(for OpenSSL ECDSA support)
1605 #include <openssl/ecdsa.h>
1606 #include <openssl/objects.h>
1608 EC_KEY *ec256, *ec384;
1610 #if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384)
1613 ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
1614 ec384 = EC_KEY_new_by_curve_name(NID_secp384r1);
1615 if (ec256 == NULL || ec384 == NULL)
1624 [AC_MSG_RESULT(using --with-ecdsa)])
1625 case "$with_ecdsa" in
1627 case "$have_ecdsa" in
1628 no) AC_MSG_ERROR([ecdsa not supported]) ;;
1629 *) have_ecdsa=yes ;;
1635 case "$have_ecdsa" in
1637 *) AC_MSG_ERROR([need --with-ecdsa=[[yes or no]]]) ;;
1644 AC_DEFINE(HAVE_OPENSSL_ECDSA, 1,
1645 [Define if your OpenSSL version supports ECDSA.])
1651 AC_MSG_CHECKING(for OpenSSL GOST support)
1653 case "$use_pkcs11" in
1657 if $use_threads; then
1663 #include <openssl/conf.h>
1664 #include <openssl/engine.h>
1666 #if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
1671 OPENSSL_config(NULL);
1673 e = ENGINE_by_id("gost");
1676 if (ENGINE_init(e) <= 0)
1688 [AC_MSG_RESULT(using --with-gost)])
1689 case "$with_gost" in
1691 case "$have_gost" in
1692 no) AC_MSG_ERROR([gost not supported]) ;;
1699 case "$have_gost" in
1701 *) AC_MSG_ERROR([need --with-gost=[[yes, no, raw or asn1]]]) ;;
1708 OPENSSLGOSTLINKOBJS='${OPENSSLGOSTLINKOBJS}'
1709 OPENSSLGOSTLINKSRCS='${OPENSSLGOSTLINKSRCS}'
1710 AC_DEFINE(HAVE_OPENSSL_GOST, 1,
1711 [Define if your OpenSSL version supports GOST.])
1718 AC_MSG_CHECKING(for OpenSSL AES support)
1720 #include <openssl/evp.h>
1722 EVP_CIPHER *aes128, *aes192, *aes256;
1724 aes128 = EVP_aes_128_ecb();
1725 aes192 = EVP_aes_192_ecb();
1726 aes256 = EVP_aes_256_ecb();
1727 if (aes128 == NULL || aes192 == NULL || aes256 == NULL)
1734 [AC_CHECK_FUNC(AES_encrypt,
1737 [AC_MSG_RESULT(no)])],
1738 [AC_MSG_RESULT(using --with-aes)])
1742 if test "$with_aes" = "yes"
1746 AC_DEFINE(HAVE_OPENSSL_EVP_AES, 1,
1747 [Define if your OpenSSL version supports EVP AES])
1748 ISC_OPENSSL_INC="$DST_OPENSSL_INC"
1749 ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS"
1752 AC_DEFINE(HAVE_OPENSSL_AES, 1,
1753 [Define if your OpenSSL version supports AES])
1754 ISC_OPENSSL_INC="$DST_OPENSSL_INC"
1755 ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS"
1763 CFLAGS="$saved_cflags"
1765 OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
1766 OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
1772 # This would include the system openssl path (and linker options to use
1773 # it as needed) if it is found.
1776 AC_SUBST(DST_OPENSSL_INC)
1777 AC_SUBST(OPENSSLGOSTLINKOBJS)
1778 AC_SUBST(OPENSSLGOSTLINKSRCS)
1779 AC_SUBST(OPENSSLLINKOBJS)
1780 AC_SUBST(OPENSSLLINKSRCS)
1781 AC_SUBST(OPENSSL_ECDSA)
1782 AC_SUBST(OPENSSL_GOST)
1784 DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DST_OPENSSL_LIBS"
1786 ISC_PLATFORM_WANTAES="#undef ISC_PLATFORM_WANTAES"
1787 if test "$with_aes" = "yes"
1789 if test "X$CRYPTO" = "X"
1794 if test "$with_aes" = "yes"
1796 ISC_PLATFORM_WANTAES="#define ISC_PLATFORM_WANTAES 1"
1798 AC_SUBST(ISC_PLATFORM_WANTAES)
1801 # Choose SIT algorithm
1804 if test "$enable_sit" = "yes"
1806 AC_MSG_CHECKING(for the Algorithm for SIT)
1807 if test "$with_sit_alg" = "auto"
1809 if test "$with_aes" = "yes"
1813 with_sit_alg="sha256"
1817 case $with_sit_alg in
1819 if test "$enable_sit" != "yes"
1821 AC_MSG_ERROR("with-sit-alg requires enable-sit");
1824 if test "$CRYPTO" = "-DOPENSSL"
1826 if test "$want_openssl_hash" = "checksit"
1828 want_openssl_hash="yes"
1831 AC_DEFINE(HMAC_SHA1_SIT, 1,
1832 [Use HMAC-SHA1 for Source Identity Token generation])
1835 if test "$enable_sit" != "yes"
1837 AC_MSG_ERROR("with-sit-alg requires enable-sit");
1839 AC_MSG_RESULT(sha256)
1840 if test "$CRYPTO" = "-DOPENSSL"
1842 if test "$want_openssl_hash" = "checksit"
1844 want_openssl_hash="yes"
1847 AC_DEFINE(HMAC_SHA256_SIT, 1,
1848 [Use HMAC-SHA256 for Source Identity Token generation])
1851 if test "$enable_sit" != "yes"
1853 AC_MSG_ERROR("with-sit-alg requires enable-sit");
1856 if test "$with_aes" != "yes"
1858 AC_MSG_ERROR("SIT wants to use unavailable AES");
1860 AC_DEFINE(AES_SIT, 1,
1861 [Use AES for Source Identity Token generation])
1864 if test "$want_openssl_hash" = "checksit"
1866 want_openssl_hash="no"
1870 # Use OpenSSL for hash functions
1873 AC_MSG_CHECKING(for using OpenSSL for hash functions)
1874 ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH"
1875 case $want_openssl_hash in
1877 if test "$CRYPTO" != "-DOPENSSL"
1879 AC_MSG_ERROR([No OpenSSL for hash functions])
1882 ISC_PLATFORM_OPENSSLHASH="#define ISC_PLATFORM_OPENSSLHASH 1"
1883 ISC_OPENSSL_INC="$DST_OPENSSL_INC"
1884 ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS"
1885 saved_cflags="$CFLAGS"
1887 CFLAGS="$CFLAGS $ISC_OPENSSL_INC"
1888 LIBS="$LIBS $ISC_OPENSSL_LIBS"
1889 AC_MSG_CHECKING([HMAC_Init() return type])
1891 #include <openssl/hmac.h>],[
1893 int n = HMAC_Init(&ctx, NULL, 0, NULL);
1894 n += HMAC_Update(&ctx, NULL, 0);
1895 n += HMAC_Final(&ctx, NULL, NULL);],[
1897 AC_DEFINE(HMAC_RETURN_INT, 1, [HMAC_*() return ints])],[
1898 AC_MSG_RESULT(void)])
1899 CFLAGS="$saved_cflags"
1906 AC_SUBST(ISC_PLATFORM_OPENSSLHASH)
1907 AC_SUBST(ISC_OPENSSL_INC)
1908 AC_SUBST(ISC_OPENSSL_LIBS)
1911 # PKCS11 (aka crypto hardware) support (--with moved just after openssl)
1913 AC_MSG_CHECKING(for PKCS11 support)
1915 if test "$use_pkcs11" = "auto"
1917 if test "$want_native_pkcs11" = "yes"
1925 case "$use_pkcs11" in
1935 ISC_PK11_RESULT_C=""
1936 ISC_PK11_RESULT_O=""
1937 ISC_ISCPK11_API_C=""
1938 ISC_ISCPK11_API_O=""
1942 if ! $use_threads; then
1943 AC_MSG_ERROR([PKCS11 requires thread support])
1945 if test "$CRYPTO" = "-DOPENSSL"
1947 AC_MSG_CHECKING(for OpenSSL with PKCS11 support)
1949 saved_cflags="$CFLAGS"
1952 CFLAGS="$CFLAGS $DST_OPENSSL_INC"
1953 LIBS="$LIBS $DST_OPENSSL_LIBS"
1955 #include <openssl/conf.h>
1956 #include <openssl/engine.h>
1960 OPENSSL_config(NULL);
1961 e = ENGINE_by_id("pkcs11");
1964 if (ENGINE_init(e) <= 0)
1970 PKCS11_TEST=pkcs11ssl
1971 PKCS11_ENGINE='-DPKCS11_ENGINE="\"pkcs11\""'],
1974 PKCS11_ENGINE='-DPKCS11_ENGINE=NULL'],
1975 [AC_MSG_RESULT(cross compile, defaulting to no)
1977 PKCS11_ENGINE='-DPKCS11_ENGINE=NULL'])
1979 CFLAGS="$saved_cflags"
1983 PKCS11_ENGINE='-DPKCS11_ENGINE=NULL'
1986 USE_PKCS11='-DUSE_PKCS11'
1988 AC_CHECK_FUNC(getpassphrase, AC_DEFINE(HAVE_GETPASSPHRASE),)
1990 ISC_PK11_O="pk11.$O"
1991 ISC_PK11_API_C="pk11_api.c"
1992 ISC_PK11_API_O="pk11_api.$O"
1993 ISC_PK11_RESULT_C="pk11_result.c"
1994 ISC_PK11_RESULT_O="pk11_result.$O"
1995 ISC_ISCPK11_API_C="unix/pk11_api.c"
1996 ISC_ISCPK11_API_O="unix/pk11_api.$O"
1999 AC_SUBST(USE_PKCS11)
2000 AC_SUBST(PKCS11_TOOLS)
2001 AC_SUBST(PKCS11_ENGINE)
2002 AC_SUBST(ISC_PK11_C)
2003 AC_SUBST(ISC_PK11_O)
2004 AC_SUBST(ISC_PK11_API_C)
2005 AC_SUBST(ISC_PK11_API_O)
2006 AC_SUBST(ISC_PK11_RESULT_C)
2007 AC_SUBST(ISC_PK11_RESULT_O)
2008 AC_SUBST(ISC_ISCPK11_API_C)
2009 AC_SUBST(ISC_ISCPK11_API_O)
2011 AC_MSG_CHECKING(for PKCS11 tools)
2012 case "$use_pkcs11" in
2014 PKCS11_PROVIDER="undefined"
2015 AC_MSG_RESULT(disabled)
2018 PKCS11_PROVIDER="undefined"
2019 AC_MSG_RESULT(enabled)
2022 PKCS11_PROVIDER="$use_pkcs11"
2023 AC_MSG_RESULT([enabled, PKCS11 provider is $PKCS11_PROVIDER])
2027 AC_SUBST(PKCS11_PROVIDER)
2031 AC_MSG_CHECKING(for native PKCS11)
2033 case "$want_native_pkcs11" in
2035 AC_MSG_RESULT(using native PKCS11 crypto)
2036 PKCS11LINKOBJS='${PKCS11LINKOBJS}'
2037 PKCS11LINKSRCS='${PKCS11LINKSRCS}'
2039 AC_MSG_CHECKING(for PKCS11 ECDSA)
2040 case "$with_ecdsa" in
2042 AC_MSG_RESULT(disabled)
2045 AC_MSG_RESULT(enabled)
2047 AC_DEFINE(HAVE_PKCS11_ECDSA, 1,
2048 [Define if your PKCS11 provider supports ECDSA.])
2051 AC_MSG_CHECKING(for PKCS11 GOST)
2052 case "$with_gost" in
2054 AC_MSG_RESULT(enabled)
2056 AC_DEFINE(HAVE_PKCS11_GOST, 1,
2057 [Define if your PKCS11 provider supports GOST.])
2060 AC_MSG_RESULT(disabled)
2065 AC_MSG_RESULT(disabled)
2069 AC_SUBST(PKCS11LINKOBJS)
2070 AC_SUBST(PKCS11LINKSRCS)
2072 AC_SUBST(PKCS11_ECDSA)
2073 AC_SUBST(PKCS11_GOST)
2074 AC_SUBST(PKCS11_TEST)
2076 # for PKCS11 benchmarks
2079 AC_CHECK_FUNC(clock_gettime,have_clock_gt=yes,)
2080 if test "$have_clock_gt" = "no"; then
2081 AC_CHECK_LIB(rt,clock_gettime,have_clock_gt=rt,)
2084 if test "$have_clock_gt" != "no"; then
2085 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if clock_gettime is available.])
2088 if test "$have_clock_gt" = "rt"; then
2093 # was --with-libxml2 specified?
2095 AC_MSG_CHECKING(for libxml2 library)
2096 AC_ARG_WITH(libxml2,
2097 [ --with-libxml2[=PATH] build with libxml2 library [yes|no|path]],
2098 use_libxml2="$withval", use_libxml2="auto")
2100 case "$use_libxml2" in
2105 case X`(xml2-config --version) 2>/dev/null` in
2107 libxml2_libs=`xml2-config --libs`
2108 libxml2_cflags=`xml2-config --cflags`
2117 if test -f "$use_libxml2/bin/xml2-config" ; then
2118 libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
2119 libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
2124 if test "X$libxml2_libs" != "X"
2126 CFLAGS="$CFLAGS $libxml2_cflags"
2127 LIBS="$LIBS $libxml2_libs"
2129 # Sanity check xml2-config output.
2131 AC_TRY_LINK([#include <libxml/xmlwriter.h>],
2132 [return(xmlTextWriterStartElement(NULL, NULL));],
2134 AC_MSG_ERROR(xml2-config returns badness))
2135 AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
2141 # was --with-libjson specified?
2143 AC_MSG_CHECKING(for json library)
2144 AC_ARG_WITH(libjson,
2145 [ --with-libjson[=PATH] build with libjson0 library [yes|no|path]],
2146 use_libjson="$withval", use_libjson="auto")
2149 case "$use_libjson" in
2154 for d in /usr /usr/local /opt/local
2156 if test -f "${d}/include/json/json.h"
2158 libjson_cflags="-I ${d}/include/json"
2159 if test ${d} != /usr
2161 LIBS="$LIBS -L${d}/lib"
2164 elif test -f "${d}/include/json-c/json.h"
2166 libjson_cflags="-I ${d}/include/json-c"
2167 if test ${d} != /usr
2169 LIBS="$LIBS -L${d}/lib"
2176 if test -f "${use_libjson}/include/json/json.h"
2178 libjson_cflags="-I${use_libjson}/include/json"
2179 LIBS="$LIBS -L${use_libjson}/lib"
2181 elif test -f "${use_libjson}/include/json-c/json.h"
2183 libjson_cflags="-I${use_libjson}/include/json-c"
2184 LIBS="$LIBS -L${use_libjson}/lib"
2187 AC_MSG_ERROR([$use_libjson/include/json{,-c}/json.h not found.])
2192 if test "X${have_libjson}" != "X"
2195 AC_SEARCH_LIBS([json_object_new_int64], [json json-c], [],
2196 [AC_MSG_ERROR([found libjson include but not library.])
2198 elif test "X$use_libjson" = Xyes
2200 AC_MSG_ERROR([include/json{,-c}/json.h not found.])
2205 if test "X${have_libjson}" != "X"
2207 CFLAGS="$CFLAGS $libjson_cflags"
2208 AC_DEFINE(HAVE_JSON, 1, [Define if libjson was found])
2212 # In solaris 10, SMF can manage named service
2214 AC_CHECK_LIB(scf, smf_enable_instance)
2217 # flockfile is usually provided by pthreads, but we may want to use it
2218 # even if compiled with --disable-threads. getc_unlocked might also not
2221 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
2222 AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
2225 # Indicate what the final decision was regarding threads.
2227 AC_MSG_CHECKING(whether to build with threads)
2228 if $use_threads; then
2235 # End of pthreads stuff.
2241 AC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
2242 want_largefile="yes", want_largefile="no")
2243 case $want_largefile in
2245 ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
2252 # Additional compiler settings.
2256 IRIX_DNSSEC_WARNINGS_HACK=""
2258 if test "X$GCC" = "Xyes"; then
2259 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
2260 AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
2261 SAVE_CFLAGS="$CFLAGS"
2262 CFLAGS="$CFLAGS -fno-strict-aliasing"
2263 AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
2264 CFLAGS="$SAVE_CFLAGS"
2265 if test "$FNOSTRICTALIASING" = "yes"; then
2267 STD_CWARNINGS="$STD_CWARNINGS -fno-strict-aliasing"
2272 # turn off delete null pointer checks
2274 AC_MSG_CHECKING(if "$CC" supports -fno-delete-null-pointer-checks)
2275 SAVE_CFLAGS="$CFLAGS"
2276 CFLAGS="$CFLAGS -fno-delete-null-pointer-checks"
2277 AC_TRY_COMPILE(,, [FNODELETENULLPOINTERCHECKS=yes],
2278 [FNODELETENULLPOINTERCHECKS=no])
2279 CFLAGS="$SAVE_CFLAGS"
2280 if test "$FNODELETENULLPOINTERCHECKS" = "yes"; then
2282 STD_CWARNINGS="$STD_CWARNINGS -fno-delete-null-pointer-checks"
2288 CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
2289 BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
2292 if test "X$enable_warn_shadow" = Xyes; then
2293 STD_CWARNINGS="$STD_CWARNINGS -Wshadow"
2295 if test "X$enable_warn_error" = Xyes; then
2296 STD_CWARNINGS="$STD_CWARNINGS -Werror"
2303 CCNOOPT="$CCNOOPT -std"
2308 # The version of the C compiler that constantly warns about
2309 # 'const' as well as alignment issues is unfortunately not
2310 # able to be discerned via the version of the operating
2311 # system, nor does cc have a version flag.
2312 case "`$CC +W 123 2>&1`" in
2317 # Turn off the pointlessly noisy warnings.
2318 STD_CWARNINGS="+w1 +W 474,530,2193,2236"
2321 CCOPT="$CCOPT -Ae -z"
2322 CCNOOPT="$CCNOOPT -Ae -z"
2323 CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
2324 BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
2325 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
2328 STD_CWARNINGS="-fullwarn -woff 1209"
2330 # Silence more than 250 instances of
2331 # "prototyped function redeclared without prototype"
2332 # and 11 instances of
2333 # "variable ... was set but never used"
2334 # from lib/dns/sec/openssl.
2336 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
2341 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
2349 AC_SUBST(MKDEPCFLAGS)
2351 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
2356 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
2359 # -lxnet buys us one big porting headache... standards, gotta love 'em.
2361 # AC_CHECK_LIB(xnet, socket, ,
2362 # AC_CHECK_LIB(socket, socket)
2365 # Use this for now, instead:
2373 AC_CHECK_LIB(socket, socket)
2374 AC_CHECK_LIB(nsl, inet_addr)
2379 # Work around Solaris's select() limitations.
2382 *-solaris2.[[89]]|*-solaris2.1?)
2383 AC_DEFINE(FD_SETSIZE, 65536,
2384 [Solaris hack to get select_large_fdset.])
2391 AC_MSG_CHECKING(whether to use purify)
2393 [ --with-purify[=PATH] use Rational purify],
2394 use_purify="$withval", use_purify="no")
2396 case "$use_purify" in
2400 AC_PATH_PROG(purify_path, purify, purify)
2403 purify_path="$use_purify"
2407 case "$use_purify" in
2413 if test -f $purify_path || test $purify_path = purify; then
2414 AC_MSG_RESULT($purify_path)
2415 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
2416 PURIFY="$purify_path $PURIFYFLAGS"
2418 AC_MSG_ERROR([$purify_path not found.
2420 Please choose the proper path with the following command:
2422 configure --with-purify=PATH
2431 # Google/Great Performance Tools CPU Profiler
2433 AC_MSG_CHECKING(whether to use gperftools profiler)
2434 AC_ARG_WITH(gperftools-profiler,
2435 [ --with-gperftools-profiler use gperftools CPU profiler],
2436 use_profiler="$withval", use_profiler="no")
2438 case $use_profiler in
2441 AC_DEFINE([HAVE_GPERFTOOLS_PROFILER], 1,
2442 [Define to use gperftools CPU profiler.])
2443 LIBS="$LIBS -lprofiler"
2451 # enable/disable dumping stack backtrace. Also check if the system supports
2452 # glibc-compatible backtrace() function.
2454 AC_ARG_ENABLE(backtrace,
2455 [ --enable-backtrace log stack backtrace on abort [[default=yes]]],
2456 want_backtrace="$enableval", want_backtrace="yes")
2457 case $want_backtrace in
2459 ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1"
2460 AC_TRY_LINK([#include <execinfo.h>],
2461 [return (backtrace((void **)0, 0));],
2462 [AC_DEFINE([HAVE_LIBCTRACE], [], [if system have backtrace function])],)
2465 ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE"
2468 AC_SUBST(ISC_PLATFORM_USEBACKTRACE)
2470 AC_ARG_ENABLE(symtable,
2471 [ --enable-symtable use internal symbol table for backtrace
2472 [[all|minimal(default)|none]]],
2473 want_symtable="$enableval", want_symtable="minimal")
2474 case $want_symtable in
2475 yes|all|minimal) # "yes" is a hidden value equivalent to "minimal"
2476 if test "$PERL" = ""
2478 AC_MSG_ERROR([Internal symbol table requires perl but no perl is found.
2479 Install perl or explicitly disable the feature by --disable-symtable.])
2481 if test "$use_libtool" = "yes"; then
2482 AC_MSG_WARN([Internal symbol table does not work with libtool. Disabling symbol table.])
2484 # we generate the internal symbol table only for those systems
2485 # known to work to avoid unexpected build failure. Also, warn
2486 # about unsupported systems when the feature is enabled
2489 freebsd*|netbsd*|openbsd*|linux*|solaris*|darwin*)
2490 MKSYMTBL_PROGRAM="$PERL"
2491 if test $want_symtable = all; then
2492 ALWAYS_MAKE_SYMTABLE="yes"
2496 if test $want_symtable = yes -o $want_symtable = all
2498 AC_MSG_WARN([this system is not known to generate internal symbol table safely; disabling it])
2506 AC_SUBST(MKSYMTBL_PROGRAM)
2507 AC_SUBST(ALWAYS_MAKE_SYMTABLE)
2510 # File name extension for static archive files, for those few places
2511 # where they are treated differently from dynamic ones.
2518 AC_SUBST(LIBTOOL_MKDEP_SED)
2519 AC_SUBST(LIBTOOL_MODE_COMPILE)
2520 AC_SUBST(LIBTOOL_MODE_INSTALL)
2521 AC_SUBST(LIBTOOL_MODE_LINK)
2522 AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
2523 AC_SUBST(LIBTOOL_IN_MAIN)
2525 BIND9_CO_RULE=".c.$O:"
2526 AC_SUBST(BIND9_CO_RULE)
2529 # Here begins a very long section to determine the system's networking
2530 # capabilities. The order of the tests is significant.
2537 [ --enable-ipv6 use IPv6 [default=autodetect]])
2539 case "$enable_ipv6" in
2541 AC_DEFINE(WANT_IPV6)
2548 # We do the IPv6 compilation checking after libtool so that we can put
2549 # the right suffix on the files.
2551 AC_MSG_CHECKING(for IPv6 structures)
2553 #include <sys/types.h>
2554 #include <sys/socket.h>
2555 #include <netinet/in.h>],
2556 [struct sockaddr_in6 sin6; return (0);],
2563 # See whether IPv6 support is provided via a Kame add-on.
2564 # This is done before other IPv6 linking tests to LIBS is properly set.
2566 AC_MSG_CHECKING(for Kame IPv6 support)
2568 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
2569 use_kame="$withval", use_kame="no")
2575 kame_path=/usr/local/v6
2578 kame_path="$use_kame"
2587 if test -f $kame_path/lib/libinet6.a; then
2588 AC_MSG_RESULT($kame_path/lib/libinet6.a)
2589 LIBS="-L$kame_path/lib -linet6 $LIBS"
2591 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
2593 Please choose the proper path with the following command:
2595 configure --with-kame=PATH
2602 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
2603 # Including it on Kame-using platforms is very bad, though, because
2604 # Kame uses #error against direct inclusion. So include it on only
2605 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
2606 # This is done before the in6_pktinfo check because that's what
2607 # netinet6/in6.h is needed for.
2612 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
2613 LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
2614 isc_netinet6in6_hack="#include <netinet6/in6.h>"
2617 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
2618 LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
2619 isc_netinet6in6_hack=""
2625 # This is similar to the netinet6/in6.h issue.
2628 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
2630 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
2631 LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
2632 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
2633 isc_netinetin6_hack="#include <netinet/in6.h>"
2636 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
2637 LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
2638 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
2639 isc_netinetin6_hack=""
2644 # Now delve deeper into the suitability of the IPv6 support.
2646 case "$found_ipv6" in
2648 ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
2649 LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
2651 AC_MSG_CHECKING(for in6_addr)
2653 #include <sys/types.h>
2654 #include <sys/socket.h>
2655 #include <netinet/in.h>
2656 $isc_netinetin6_hack
2657 $isc_netinet6in6_hack
2659 [struct in6_addr in6; return (0);],
2661 ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
2662 LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
2663 isc_in_addr6_hack=""],
2665 ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
2666 LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
2667 isc_in_addr6_hack="#define in6_addr in_addr6"])
2669 AC_MSG_CHECKING(for in6addr_any)
2671 #include <sys/types.h>
2672 #include <sys/socket.h>
2673 #include <netinet/in.h>
2674 $isc_netinetin6_hack
2675 $isc_netinet6in6_hack
2678 [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
2680 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
2681 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
2683 ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
2684 LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
2686 AC_MSG_CHECKING(for in6addr_loopback)
2688 #include <sys/types.h>
2689 #include <sys/socket.h>
2690 #include <netinet/in.h>
2691 $isc_netinetin6_hack
2692 $isc_netinet6in6_hack
2695 [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
2697 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
2698 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
2700 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
2701 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
2703 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
2705 #include <sys/types.h>
2706 #include <sys/socket.h>
2707 #include <netinet/in.h>
2708 $isc_netinetin6_hack
2709 $isc_netinet6in6_hack
2711 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
2713 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
2714 result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
2716 ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
2717 result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
2718 LWRES_HAVE_SIN6_SCOPE_ID="$result"
2720 AC_MSG_CHECKING(for in6_pktinfo)
2722 #include <sys/types.h>
2723 #include <sys/socket.h>
2724 #include <netinet/in.h>
2725 $isc_netinetin6_hack
2726 $isc_netinet6in6_hack
2728 [struct in6_pktinfo xyzzy; return (0);],
2730 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
2731 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
2732 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
2735 ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
2736 LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
2737 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
2738 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
2739 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
2740 LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
2741 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
2743 ISC_IPV6_O="ipv6.$O"
2744 ISC_ISCIPV6_O="unix/ipv6.$O"
2749 AC_MSG_CHECKING(for struct sockaddr_storage)
2751 #include <sys/types.h>
2752 #include <sys/socket.h>
2753 $isc_netinetin6_hack
2754 $isc_netinet6in6_hack
2756 [struct sockaddr_storage storage; return (0);],
2758 ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"],
2760 ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
2762 AC_SUBST(ISC_PLATFORM_HAVEIPV6)
2763 AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
2764 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
2765 AC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
2766 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
2767 AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
2768 AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
2769 AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
2770 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
2771 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
2772 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
2773 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
2774 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
2775 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
2776 AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
2777 AC_SUBST(ISC_IPV6_H)
2778 AC_SUBST(ISC_IPV6_O)
2779 AC_SUBST(ISC_ISCIPV6_O)
2780 AC_SUBST(ISC_IPV6_C)
2781 AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
2782 AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
2784 AC_MSG_CHECKING([for struct if_laddrreq])
2786 #include <sys/types.h>
2787 #include <net/if6.h>
2788 ],[ struct if_laddrreq a; ],
2790 ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
2792 ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
2793 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
2795 AC_MSG_CHECKING([for struct if_laddrconf])
2797 #include <sys/types.h>
2798 #include <net/if6.h>
2799 ],[ struct if_laddrconf a; ],
2801 ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
2803 ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
2804 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
2807 # Check for network functions that are often missing. We do this
2808 # after the libtool checking, so we can put the right suffix on
2809 # the files. It also needs to come after checking for a Kame add-on,
2810 # which provides some (all?) of the desired functions.
2813 AC_MSG_CHECKING([for inet_ntop with IPv6 support])
2815 #include <sys/types.h>
2816 #include <sys/socket.h>
2817 #include <netinet/in.h>
2818 #include <arpa/inet.h>
2820 char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
2822 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
2825 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
2826 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
2827 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
2828 [AC_MSG_RESULT(assuming inet_ntop not needed)
2829 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"])
2832 # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
2833 # addresses with less than four octets, like "1.2.3". Also leading
2834 # zeros should also be rejected.
2836 AC_MSG_CHECKING([for working inet_pton with IPv6 support])
2838 #include <sys/types.h>
2839 #include <sys/socket.h>
2840 #include <netinet/in.h>
2841 #include <arpa/inet.h>
2842 main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
2843 inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
2844 (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
2846 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
2848 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
2849 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
2850 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
2851 [AC_MSG_RESULT(assuming inet_pton needed)
2852 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
2853 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
2854 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
2856 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
2857 AC_SUBST(ISC_PLATFORM_NEEDPTON)
2860 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
2864 # Turn on 4.4BSD style sa_len support.
2865 AC_DEFINE(_SOCKADDR_LEN)
2869 AC_MSG_CHECKING(for sa_len in struct sockaddr)
2871 #include <sys/types.h>
2872 #include <sys/socket.h>],
2873 [struct sockaddr sa; sa.sa_len = 0; return (0);],
2875 ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"
2876 LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"],
2878 ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"
2879 LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"])
2880 AC_SUBST(ISC_PLATFORM_HAVESALEN)
2881 AC_SUBST(LWRES_PLATFORM_HAVESALEN)
2884 # Look for a 4.4BSD or 4.3BSD struct msghdr
2886 AC_MSG_CHECKING(for struct msghdr flavor)
2888 #include <sys/types.h>
2889 #include <sys/socket.h>],
2890 [struct msghdr msg; msg.msg_flags = 0; return (0);],
2891 [AC_MSG_RESULT(4.4BSD)
2892 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
2893 [AC_MSG_RESULT(4.3BSD)
2894 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
2895 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
2898 # Look for in_port_t.
2900 AC_MSG_CHECKING(for type in_port_t)
2902 #include <sys/types.h>
2903 #include <netinet/in.h>],
2904 [in_port_t port = 25; return (0);],
2906 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
2908 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
2909 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
2912 # Check for addrinfo
2914 AC_MSG_CHECKING(for struct addrinfo)
2916 #include <netdb.h>],
2917 [struct addrinfo a; return (0);],
2919 ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"
2920 ISC_IRS_NEEDADDRINFO="#undef ISC_IRS_NEEDADDRINFO"
2921 AC_DEFINE(HAVE_ADDRINFO)],
2923 ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"
2924 ISC_IRS_NEEDADDRINFO="#define ISC_IRS_NEEDADDRINFO 1"])
2925 AC_SUBST(ISC_LWRES_NEEDADDRINFO)
2926 AC_SUBST(ISC_IRS_NEEDADDRINFO)
2929 # Check for rrsetinfo
2931 AC_MSG_CHECKING(for struct rrsetinfo)
2933 #include <netdb.h>],
2934 [struct rrsetinfo r; return (0);],
2936 ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
2938 ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
2939 AC_SUBST(ISC_LWRES_NEEDRRSETINFO)
2941 AC_MSG_CHECKING(for int sethostent)
2943 #include <netdb.h>],
2944 [int i = sethostent(0); return(0);],
2946 ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"],
2948 ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"])
2949 AC_SUBST(ISC_LWRES_SETHOSTENTINT)
2951 AC_MSG_CHECKING(for int endhostent)
2953 #include <netdb.h>],
2954 [int i = endhostent(); return(0);],
2956 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
2958 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
2959 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
2961 AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
2964 struct netent *getnetbyaddr(in_addr_t, int);],
2967 ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"],
2969 ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"])
2970 AC_SUBST(ISC_LWRES_GETNETBYADDRINADDR)
2972 AC_MSG_CHECKING(for int setnetent)
2974 #include <netdb.h>],
2975 [int i = setnetent(0); return(0);],
2977 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
2979 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
2980 AC_SUBST(ISC_LWRES_SETNETENTINT)
2982 AC_MSG_CHECKING(for int endnetent)
2984 #include <netdb.h>],
2985 [int i = endnetent(); return(0);],
2987 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
2989 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
2990 AC_SUBST(ISC_LWRES_ENDNETENTINT)
2992 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
2995 struct hostent *gethostbyaddr(const void *, size_t, int);],
2998 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
3000 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
3001 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
3003 AC_MSG_CHECKING(for h_errno in netdb.h)
3005 #include <netdb.h>],
3006 [h_errno = 1; return(0);],
3008 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
3010 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
3011 AC_SUBST(ISC_LWRES_NEEDHERRNO)
3014 # Sadly, the definitions of system-supplied getnameinfo(3) vary. Try to catch
3015 # known variations here:
3017 AC_MSG_CHECKING(for getnameinfo prototype definitions)
3019 #include <sys/types.h>
3020 #include <sys/socket.h>
3022 int getnameinfo(const struct sockaddr *, socklen_t, char *,
3023 socklen_t, char *, socklen_t, unsigned int);],
3025 [AC_MSG_RESULT(socklen_t for buflen; u_int for flags)
3026 AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t,
3027 [Define to the sockaddr length type used by getnameinfo(3).])
3028 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t,
3029 [Define to the buffer length type used by getnameinfo(3).])
3030 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int,
3031 [Define to the flags type used by getnameinfo(3).])],
3033 #include <sys/types.h>
3034 #include <sys/socket.h>
3036 int getnameinfo(const struct sockaddr *, socklen_t, char *,
3037 size_t, char *, size_t, int);],
3039 [AC_MSG_RESULT(size_t for buflen; int for flags)
3040 AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t)
3041 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
3042 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
3044 #include <sys/types.h>
3045 #include <sys/socket.h>
3047 int getnameinfo(const struct sockaddr *, size_t, char *,
3048 size_t, char *, size_t, int);],
3050 [AC_MSG_RESULT(size_t for buflen; int for flags)
3051 AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, size_t)
3052 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
3053 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
3054 [AC_MSG_RESULT(not match any subspecies; assume standard definition)
3055 AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t)
3056 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
3057 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])])
3060 # ...and same for gai_strerror().
3062 AC_MSG_CHECKING(for gai_strerror prototype definitions)
3064 #include <sys/types.h>
3065 #include <sys/socket.h>
3067 char *gai_strerror(int ecode);],
3069 [AC_MSG_RESULT(returning char *)
3070 AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [char *],
3071 [return type of gai_strerror])],
3072 [AC_MSG_RESULT(not match any subspecies; assume standard definition)
3073 AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [const char *])])
3075 AC_CHECK_FUNC(getipnodebyname,
3076 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
3077 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
3078 AC_CHECK_FUNC(getnameinfo,
3079 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
3080 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
3081 AC_CHECK_FUNC(getaddrinfo,
3082 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
3083 AC_DEFINE(HAVE_GETADDRINFO)],
3084 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
3085 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
3086 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
3087 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
3088 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
3089 AC_SUBST(ISC_IRS_GETNAMEINFOSOCKLEN)
3091 AC_ARG_ENABLE(getifaddrs,
3092 [ --enable-getifaddrs enable the use of getifaddrs() [[yes|no]].],
3093 want_getifaddrs="$enableval", want_getifaddrs="yes")
3096 # This interface iteration code for getifaddrs() will fall back to using
3097 # /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6
3100 case $want_getifaddrs in
3102 AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required")
3103 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
3106 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
3113 # Look for a sysctl call to get the list of network interfaces.
3115 case $ac_cv_header_sys_sysctl_h in
3117 AC_MSG_CHECKING(for interface list sysctl)
3118 AC_EGREP_CPP(found_rt_iflist, [
3119 #include <sys/param.h>
3120 #include <sys/sysctl.h>
3121 #include <sys/socket.h>
3122 #ifdef NET_RT_IFLIST
3127 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
3128 [AC_MSG_RESULT(no)])
3133 # Check for some other useful functions that are not ever-present.
3136 # We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC
3137 # because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77
3138 # reportedly defines strsep() without declaring it in <string.h> when
3139 # -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and
3140 # AC_CHECK_FUNC() incorrectly succeeds because it declares
3141 # the function itself.
3142 AC_MSG_CHECKING(for correctly declared strsep())
3143 AC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");],
3144 [AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
3145 [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
3146 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
3148 AC_CHECK_FUNC(memmove,
3149 [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
3150 [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
3151 AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
3153 AC_CHECK_FUNC(strtoul,
3154 [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
3155 LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
3157 [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
3158 LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
3159 GENRANDOMLIB='${ISCLIBS}'])
3160 AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
3161 AC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
3162 AC_SUBST(GENRANDOMLIB)
3164 AC_CHECK_FUNC(strlcpy,
3165 [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"
3166 LWRES_PLATFORM_NEEDSTRLCPY="#undef LWRES_PLATFORM_NEEDSTRLCPY"],
3167 [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"
3168 LWRES_PLATFORM_NEEDSTRLCPY="#define LWRES_PLATFORM_NEEDSTRLCPY 1"])
3169 AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
3170 AC_SUBST(LWRES_PLATFORM_NEEDSTRLCPY)
3172 AC_CHECK_FUNC(strlcat,
3173 [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
3174 [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
3175 AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
3177 AC_CHECK_FUNC(strcasestr,
3178 [ISC_PLATFORM_NEEDSTRCASESTR="#undef ISC_PLATFORM_NEEDSTRCASESTR"],
3179 [ISC_PLATFORM_NEEDSTRCASESTR="#define ISC_PLATFORM_NEEDSTRCASESTR 1"])
3180 AC_SUBST(ISC_PLATFORM_NEEDSTRCASESTR)
3182 AC_SUBST(READLINE_LIB)
3183 AC_ARG_WITH(readline,
3184 [ --with-readline[=LIBSPEC] specify readline library [default -lreadline]],
3185 readline="$withval", readline="-lreadline")
3189 if test "x$readline" = "xyes"
3195 AC_CHECK_FUNCS(readline)
3196 if test "$ac_cv_func_readline" = "yes"
3198 READLINE_LIB="$readline"
3207 AC_MSG_CHECKING(sprintf)
3211 [ char buf[2]; return(*sprintf(buf,"x"));],
3213 ISC_PRINT_OBJS="print.$O"
3214 ISC_PRINT_SRCS="print.c"
3215 ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
3216 LWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF"
3218 [ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"
3219 LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"]
3221 AC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
3222 AC_SUBST(LWRES_PLATFORM_NEEDSPRINTF)
3224 AC_CHECK_FUNC(vsnprintf,
3225 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
3226 LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
3227 [ISC_PRINT_OBJS="print.$O"
3228 ISC_PRINT_SRCS="print.c"
3229 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
3230 LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"])
3231 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
3232 AC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF)
3233 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
3234 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
3236 AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
3238 AC_SUBST(ISC_EXTRA_OBJS)
3239 AC_SUBST(ISC_EXTRA_SRCS)
3242 # Use our own SPNEGO implementation?
3244 AC_ARG_ENABLE(isc-spnego,
3245 [ --disable-isc-spnego use SPNEGO from GSSAPI library])
3247 if test -n "$USE_GSSAPI"
3249 case "$enable_isc_spnego" in
3251 USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
3252 DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
3253 DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c"
3254 AC_MSG_RESULT(using SPNEGO from lib/dns)
3257 AC_MSG_RESULT(using SPNEGO from GSSAPI library)
3262 AC_SUBST(USE_ISC_SPNEGO)
3264 AC_SUBST(DST_EXTRA_OBJS)
3265 AC_SUBST(DST_EXTRA_SRCS)
3267 # Determine the printf format characters to use when printing
3268 # values of type isc_int64_t. This will normally be "ll", but where
3269 # the compiler treats "long long" as a alias for "long" and printf
3270 # doesn't know about "long long" use "l". Hopefully the sprintf
3271 # will produce a inconsistent result in the later case. If the compiler
3272 # fails due to seeing "%lld" we fall back to "l".
3274 # Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
3275 # %ld even for (long long)/
3277 # Win32 uses "%I64d", but that's defined elsewhere since we don't use
3278 # configure on Win32.
3280 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
3284 long long int j = 0;
3287 sprintf(buf, "%lld", j);
3288 exit((sizeof(long long int) != sizeof(long int))? 0 :
3289 (strcmp(buf, "0") != 0));
3293 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
3294 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
3296 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
3297 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
3298 [AC_MSG_RESULT(assuming target platform uses ll)
3299 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
3300 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
3301 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
3302 AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
3307 # Note it is very recommended to *not* disable chroot(),
3308 # this is only because chroot() was made obsolete by Posix.
3309 AC_ARG_ENABLE(chroot,
3310 [ --disable-chroot disable chroot])
3311 case "$enable_chroot" in
3313 AC_CHECK_FUNCS(chroot)
3318 AC_ARG_ENABLE(linux-caps,
3319 [ --disable-linux-caps disable linux capabilities])
3320 case "$enable_linux_caps" in
3322 AC_CHECK_HEADERS(linux/types.h)
3323 AC_CHECK_HEADERS([sys/capability.h])
3324 AC_CHECK_HEADERS([linux/capability.h], [], [],
3325 [#ifdef HAVE_LINUX_TYPES_H
3326 #include <linux/types.h>
3329 AC_CHECK_LIB(cap, cap_set_proc)
3334 AC_CHECK_HEADERS(sys/prctl.h)
3336 AC_CHECK_HEADERS(sys/un.h,
3337 ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
3339 ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
3341 AC_SUBST(ISC_PLATFORM_HAVESYSUNH)
3345 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
3346 [Define if connect does not honour the permission on the UNIX domain socket.])
3349 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
3350 [Define if connect does not honour the permission on the UNIX domain socket.])
3357 AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
3359 AC_MSG_CHECKING(for optarg declaration)
3364 [AC_MSG_RESULT(yes)],
3366 GEN_NEED_OPTARG="-DNEED_OPTARG=1"
3367 AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
3370 # BSD/OS, and perhaps some others, don't define rlim_t.
3372 AC_MSG_CHECKING(for type rlim_t)
3374 #include <sys/types.h>
3375 #include <sys/time.h>
3376 #include <sys/resource.h>],
3377 [rlim_t rl = 19671212; return (0);],
3379 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
3382 AC_MSG_CHECKING(type of rlim_cur)
3384 #include <sys/types.h>
3385 #include <sys/time.h>
3386 #include <sys/resource.h>
3387 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
3389 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
3392 #include <sys/types.h>
3393 #include <sys/time.h>
3394 #include <sys/resource.h>
3395 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
3396 [AC_MSG_RESULT(long int)
3397 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
3400 #include <sys/types.h>
3401 #include <sys/time.h>
3402 #include <sys/resource.h>
3403 main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
3404 [AC_MSG_RESULT(long long int)
3405 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
3406 [AC_MSG_ERROR([unable to determine sizeof rlim_cur])
3407 ],[AC_MSG_ERROR(this cannot happen)])
3408 ],[AC_MSG_ERROR(this cannot happen)])
3410 AC_ARG_WITH(rlimtype, , rlimtype="$withval", rlimtype="long long int")
3411 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE $rlimtype"
3412 AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming $rlimtype)])
3414 AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
3417 # Older HP-UX doesn't have gettune
3421 AC_CHECK_HEADERS(sys/dyntune.h)
3429 # Compaq TruCluster requires more code for handling cluster IP aliases
3433 AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
3434 AC_CHECK_FUNC(clua_getaliasaddress,
3435 AC_DEFINE(HAVE_TRUCLUSTER, 1,
3436 [Define if running under Compaq TruCluster]))
3443 # Some hosts need msg_namelen to match the size of the socket structure.
3444 # Some hosts don't set msg_namelen appropriately on return from recvmsg().
3448 AC_DEFINE(BROKEN_RECVMSG, 1,
3449 [Define if recvmsg() does not meet all of the BSD socket API specifications.])
3454 # Microsoft has their own way of handling shared libraries that requires
3455 # additional qualifiers on extern variables. Unix systems don't need it.
3457 AC_SUBST(ISC_PLATFORM_USEDECLSPEC)
3458 ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
3459 AC_SUBST(LWRES_PLATFORM_USEDECLSPEC)
3460 LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC"
3461 AC_SUBST(IRS_PLATFORM_USEDECLSPEC)
3462 IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC"
3465 # Random remaining OS-specific issues involving compiler warnings.
3466 # XXXDCL print messages to indicate some compensation is being done?
3468 AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
3469 ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
3473 hack_shutup_pthreadonceinit=yes
3476 hack_shutup_sputaux=yes
3479 hack_shutup_sigwait=yes
3480 hack_shutup_sputaux=yes
3483 hack_shutup_stdargcast=yes
3486 hack_shutup_pthreadonceinit=yes
3488 *-solaris2.1[[0-9]])
3489 AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
3493 case "$hack_shutup_pthreadonceinit" in
3496 # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
3498 ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
3502 case "$hack_shutup_sigwait" in
3505 # Shut up a -Wmissing-prototypes warning for sigwait().
3507 AC_DEFINE(SHUTUP_SIGWAIT)
3511 case "$hack_shutup_sputaux" in
3514 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
3516 AC_DEFINE(SHUTUP_SPUTAUX)
3520 case "$hack_shutup_stdargcast" in
3523 # Shut up a -Wcast-qual warning from va_start().
3525 AC_DEFINE(SHUTUP_STDARG_CAST)
3529 AC_CHECK_HEADERS(strings.h,
3530 ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
3532 ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH"
3534 AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
3537 # Check for if_nametoindex() for IPv6 scoped addresses support
3539 AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
3540 ac_cv_have_if_nametoindex=no)
3541 case $ac_cv_have_if_nametoindex in
3545 AC_CHECK_LIB(ipv6, if_nametoindex,
3546 ac_cv_have_if_nametoindex=yes
3547 LIBS="-lipv6 $LIBS",)
3551 case $ac_cv_have_if_nametoindex in
3553 ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
3554 AC_DEFINE(HAVE_IF_NAMETOINDEX, 1,
3555 [Define to 1 if you have the if_nametoindex function.])
3559 ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
3562 AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
3564 AC_CHECK_FUNCS(nanosleep usleep)
3567 # Machine architecture dependent features
3569 AC_ARG_ENABLE(atomic,
3570 [ --enable-atomic enable machine specific atomic operations
3571 [[default=autodetect]]],
3572 enable_atomic="$enableval",
3573 enable_atomic="autodetect")
3574 case "$enable_atomic" in
3578 if test "X$GCC" = "Xyes"; then
3579 AC_MSG_CHECKING([if asm("isc"); works])
3581 main() { asm("ics"); exit(0); }
3586 saved_cflags="$CFLAGS"
3587 CFLAGS="$CFLAGS -Wa,-many"
3589 main() { asm("ics"); exit(0); }
3591 [AC_MSG_RESULT([yes, required -Wa,-many])
3593 [AC_MSG_RESULT([no, use_atomic disabled])
3594 CFLAGS="$saved_cflags"
3596 [AC_MSG_RESULT([cross compile, assume yes])
3597 CFLAGS="$saved_cflags"
3616 ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
3617 if test "$use_atomic" = "yes"; then
3618 AC_MSG_CHECKING([architecture type for atomic operations])
3619 have_atomic=yes # set default
3622 # XXX: some old x86 architectures actually do not support
3623 # (some of) these operations. Do we need stricter checks?
3624 AC_CHECK_SIZEOF([void *])
3625 if test $ac_cv_sizeof_void_p = 8; then
3633 AC_CHECK_SIZEOF([void *])
3634 if test $ac_cv_sizeof_void_p = 8; then
3644 powerpc-*|powerpc64-*)
3647 mips-*|mipsel-*|mips64-*|mips64el-*)
3658 AC_MSG_RESULT($arch)
3661 if test "$have_atomic" = "yes"; then
3662 AC_MSG_CHECKING([compiler support for inline assembly code])
3665 # Check whether the compiler supports the assembly syntax we provide.
3666 if test "X$GCC" = "Xyes"; then
3667 # GCC's ASM extension always works
3669 if test $arch = "x86_64"; then
3670 # We can share the same code for gcc with x86_32
3673 if test $arch = "powerpc"; then
3675 # The MacOS (and maybe others) uses "r0" for register
3676 # zero. Under linux/ibm it is "0" for register 0.
3677 # Probe to see if we have a MacOS style assembler.
3679 AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
3681 __asm__ volatile ("li r0, 0x0\n"::);
3685 ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
3686 ], [AC_MSG_RESULT(no)])
3691 # Tru64 compiler has its own syntax for inline
3695 #error "unexpected compiler"
3707 ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
3710 ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
3717 # See if the generic __asm function works. If not,
3718 # we need to disable the atomic operations.
3722 [compiler="standard"
3723 ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
3724 [compiler="not supported (atomic operations disabled)"
3730 AC_MSG_RESULT($compiler)
3733 if test "$have_atomic" = "yes"; then
3734 ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
3735 ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
3736 ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
3738 ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
3739 ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
3740 ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
3743 if test "$have_xaddq" = "yes"; then
3744 ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1"
3746 ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
3749 AC_SUBST(ISC_PLATFORM_HAVEXADD)
3750 AC_SUBST(ISC_PLATFORM_HAVEXADDQ)
3751 AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
3752 AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
3754 AC_SUBST(ISC_PLATFORM_USEGCCASM)
3755 AC_SUBST(ISC_PLATFORM_USEOSFASM)
3756 AC_SUBST(ISC_PLATFORM_USESTDASM)
3757 AC_SUBST(ISC_PLATFORM_USEMACASM)
3760 AC_SUBST(ISC_ARCH_DIR)
3763 # Activate "rrset-order fixed" or not?
3765 AC_ARG_ENABLE(fixed-rrset,
3766 [ --enable-fixed-rrset enable fixed rrset ordering [[default=no]]],
3767 enable_fixed="$enableval",
3769 case "$enable_fixed" in
3771 AC_DEFINE(DNS_RDATASET_FIXED, 1,
3772 [Define to enable "rrset-order fixed" syntax.])
3781 # Enable response policy rewriting using NS IP addresses
3783 AC_ARG_ENABLE(rpz-nsip,
3784 [ --disable-rpz-nsip disable rpz-nsip rules [[default=enabled]]],
3785 enable_nsip="$enableval",
3787 case "$enable_nsip" in
3789 AC_DEFINE(ENABLE_RPZ_NSIP, 1,
3790 [Define to enable rpz-nsip rules.])
3799 # Enable response policy rewriting using NS name
3801 AC_ARG_ENABLE(rpz-nsdname,
3802 [ --disable-rpz-nsdname disable rpz-nsdname rules [[default=enabled]]],
3803 enable_nsdname="$enableval",
3804 enable_nsdname="yes")
3805 case "$enable_nsdname" in
3807 AC_DEFINE(ENABLE_RPZ_NSDNAME, 1,
3808 [Define to enable rpz-nsdname rules.])
3817 # Activate "filter-aaaa-on-v4/v6" or not?
3819 AC_ARG_ENABLE(filter-aaaa,
3820 [ --enable-filter-aaaa enable filtering of AAAA records [[default=no]]],
3821 enable_filter="$enableval",
3823 case "$enable_filter" in
3825 AC_DEFINE(ALLOW_FILTER_AAAA, 1,
3826 [Define to enable the "filter-aaaa-on-v4" and "filter-aaaa-on-v6" options.])
3835 # The following sets up how non-blocking i/o is established.
3836 # Sunos, cygwin and solaris 2.x (x<5) require special handling.
3839 *-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
3840 *-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
3841 *-solaris2.[[01234]])
3842 AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
3843 AC_DEFINE(USE_FIONBIO_IOCTL, 1,
3844 [Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
3846 *) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
3847 [Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
3851 # Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
3852 # This prevents the source address being set.
3855 *-solaris2.[[012345]]|*-solaris2.5.1)
3856 AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
3857 [Define if you cannot bind() before connect() for TCP sockets.])
3861 # The following sections deal with tools used for formatting
3862 # the documentation. They are all optional, unless you are
3863 # a developer editing the documentation source.
3870 AC_PATH_PROGS(LATEX, latex, latex)
3873 AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
3880 AC_PATH_PROGS(W3M, w3m, w3m)
3884 # Look for xsltproc (libxslt)
3887 AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
3891 # Look for xmllint (libxml2)
3894 AC_PATH_PROG(XMLLINT, xmllint, xmllint)
3901 AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
3905 # Subroutine for searching for an ordinary file (e.g., a stylesheet)
3906 # in a number of directories:
3908 # NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
3910 # If the file FILENAME is found in one of the DIRECTORIES, the shell
3911 # variable VARIABLE is defined to its absolute pathname. Otherwise,
3912 # it is set to FILENAME, with no directory prefix (that's not terribly
3913 # useful, but looks less confusing in substitutions than leaving it
3914 # empty). The variable VARIABLE will be substituted into output files.
3917 AC_DEFUN(NOM_PATH_FILE, [
3919 AC_MSG_CHECKING(for $2)
3930 if test "X[$]$1" = "X"
3932 AC_MSG_RESULT("not found");
3939 # Look for Docbook-XSL stylesheets. Location probably varies by system.
3940 # If it's not explicitly specified, guess where it might be found, based on
3941 # where SGML stuff lives on some systems (FreeBSD is the only one we're sure
3942 # of at the moment).
3944 AC_MSG_CHECKING(for Docbook-XSL path)
3945 AC_ARG_WITH(docbook-xsl,
3946 [ --with-docbook-xsl=PATH specify path for Docbook-XSL stylesheets],
3947 docbook_path="$withval", docbook_path="auto")
3948 case "$docbook_path" in
3951 docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook /usr/share/xsl/docbook /opt/local/share/xsl/docbook-xsl"
3954 docbook_xsl_trees="$withval"
3955 AC_MSG_RESULT($docbook_xsl_trees)
3960 # Look for stylesheets we need.
3963 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees)
3964 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees)
3965 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees)
3966 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, html/chunk.xsl, $docbook_xsl_trees)
3967 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, xhtml/chunk.xsl, $docbook_xsl_trees)
3968 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees)
3969 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees)
3970 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees)
3971 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees)
3974 # Same dance for db2latex
3977 db2latex_xsl_trees="/usr/local/share/db2latex/xsl /usr/pkg/share/xsl/db2latex"
3980 # Look for stylesheets we need.
3983 NOM_PATH_FILE(XSLT_DB2LATEX_STYLE, docbook.xsl, $db2latex_xsl_trees)
3986 # Look for "admonition" image directory. Can't use NOM_PATH_FILE()
3987 # because it's a directory, so just do the same things, inline.
3990 AC_MSG_CHECKING(for db2latex xsl figures)
3991 for d in $db2latex_xsl_trees
3993 if test -d $d/figures
3995 XSLT_DB2LATEX_ADMONITIONS=$d/figures
3996 AC_MSG_RESULT($d/figures)
4000 if test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
4002 AC_MSG_RESULT(not found)
4003 XSLT_DB2LATEX_ADMONITIONS=db2latex/xsl/figures
4005 AC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
4011 [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]],
4012 use_idn="$withval", use_idn="no")
4015 if test X$prefix = XNONE ; then
4030 AC_ARG_WITH(libiconv,
4031 [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]],
4032 use_libiconv="$withval", use_libiconv="no")
4033 case "$use_libiconv" in
4035 if test X$prefix = XNONE ; then
4036 iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
4038 iconvlib="-L$prefix/lib -R$prefix/lib -liconv"
4045 iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
4050 [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]],
4051 iconvlib="$withval")
4062 [ --with-idnlib=ARG specify libidnkit],
4063 idnlib="$withval", idnlib="no")
4064 if test "$idnlib" = yes; then
4065 AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
4069 if test "$use_idn" != no; then
4070 AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.])
4071 STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include"
4072 if test "$idnlib" != no; then
4073 IDNLIBS="$idnlib $iconvlib"
4075 IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib"
4081 # Check whether to build Automated Test Framework unit tests
4084 [ --with-atf=ARG support Automated Test Framework],
4085 atf="$withval", atf="no")
4086 if test "$atf" = yes; then
4090 AC_CONFIG_COMMANDS([atf-config],
4092 mkdir -p unit/atf-src;
4096 *) srcdir="../../$srcdir";;
4098 ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" --enable-tools --disable-shared MISSING=: --prefix $atfdir;
4100 [atfdir=`pwd`/unit/atf])
4101 AC_MSG_RESULT(building ATF from bind9/unit/atf-src)
4105 if test "$atf" != no; then
4106 AC_DEFINE(ATF_TEST, 1, [define if ATF unit tests are to be built.])
4107 STD_CINCLUDES="$STD_CINCLUDES -I$atf/include"
4109 ATFLIBS="-L$atf/lib -latf-c"
4116 AC_CHECK_HEADERS(locale.h)
4117 AC_CHECK_FUNCS(setlocale)
4120 # was --with-tuning specified?
4123 [ --with-tuning=ARG Specify server tuning (large or default)],
4124 use_tuning="$withval", use_tuning="no")
4126 case "$use_tuning" in
4128 if ! $use_threads; then
4129 AC_MSG_ERROR([Large-system tuning requires threads.])
4131 AC_DEFINE(TUNE_LARGE, 1, [Define to use large-system tuning.])
4132 AC_MSG_RESULT(using large-system tuning)
4135 AC_MSG_RESULT(using default tuning)
4138 AC_MSG_ERROR([You must specify "large" or "default" for --with-tuning.])
4145 AC_SUBST(BIND9_TOP_BUILDDIR)
4146 BIND9_TOP_BUILDDIR=`pwd`
4148 AC_SUBST(BIND9_ISC_BUILDINCLUDE)
4149 AC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
4150 AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
4151 AC_SUBST(BIND9_DNS_BUILDINCLUDE)
4152 AC_SUBST(BIND9_LWRES_BUILDINCLUDE)
4153 AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
4154 AC_SUBST(BIND9_IRS_BUILDINCLUDE)
4155 if test "X$srcdir" != "X"; then
4156 BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
4157 BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
4158 BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
4159 BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
4160 BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
4161 BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
4162 BIND9_IRS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/irs/include"
4164 BIND9_ISC_BUILDINCLUDE=""
4165 BIND9_ISCCC_BUILDINCLUDE=""
4166 BIND9_ISCCFG_BUILDINCLUDE=""
4167 BIND9_DNS_BUILDINCLUDE=""
4168 BIND9_LWRES_BUILDINCLUDE=""
4169 BIND9_BIND9_BUILDINCLUDE=""
4170 BIND9_IRS_BUILDINCLUDE=""
4173 AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
4174 BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
4176 AC_SUBST_FILE(BIND9_MAKE_RULES)
4177 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
4180 BIND9_PRODUCT="PRODUCT=\"${PRODUCT}\""
4181 AC_SUBST(BIND9_PRODUCT)
4182 BIND9_DESCRIPTION="DESCRIPTION=\"${DESCRIPTION}\""
4183 AC_SUBST(BIND9_DESCRIPTION)
4184 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}"
4185 AC_SUBST(BIND9_VERSION)
4186 BIND9_MAJOR="MAJOR=${MAJORVER}.${MINORVER}"
4187 AC_SUBST(BIND9_MAJOR)
4188 BIND9_VERSIONSTRING="${PRODUCT} ${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}${DESCRIPTION:+ }${DESCRIPTION}"
4189 AC_SUBST(BIND9_VERSIONSTRING)
4191 BIND9_SRCID="SRCID=unset"
4192 if test -f "${srcdir}/srcid"; then
4194 BIND9_SRCID="SRCID=$SRCID"
4195 elif test -d "${srcdir}/.git"; then
4196 BIND9_SRCID="SRCID="`(cd "${srcdir}";git rev-parse --short HEAD)`
4199 AC_SUBST(BIND9_SRCID)
4201 if test -z "$ac_configure_args"; then
4202 BIND9_CONFIGARGS="defaults"
4204 for a in $ac_configure_args
4206 BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
4209 BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
4210 BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
4211 AC_SUBST(BIND9_CONFIGARGS)
4213 AC_SUBST_FILE(LIBISC_API)
4214 LIBISC_API="$srcdir/lib/isc/api"
4216 AC_SUBST_FILE(LIBISCCC_API)
4217 LIBISCCC_API="$srcdir/lib/isccc/api"
4219 AC_SUBST_FILE(LIBISCCFG_API)
4220 LIBISCCFG_API="$srcdir/lib/isccfg/api"
4222 AC_SUBST_FILE(LIBDNS_API)
4223 LIBDNS_API="$srcdir/lib/dns/api"
4225 AC_SUBST_FILE(LIBDNS_MAPAPI)
4226 LIBDNS_MAPAPI="$srcdir/lib/dns/mapapi"
4228 AC_SUBST_FILE(LIBBIND9_API)
4229 LIBBIND9_API="$srcdir/lib/bind9/api"
4231 AC_SUBST_FILE(LIBLWRES_API)
4232 LIBLWRES_API="$srcdir/lib/lwres/api"
4234 AC_SUBST_FILE(LIBIRS_API)
4235 LIBIRS_API="$srcdir/lib/irs/api"
4238 # Configure any DLZ drivers.
4240 # If config.dlz.in selects one or more DLZ drivers, it will set
4241 # CONTRIB_DLZ to a non-empty value, which will be our clue to
4242 # build DLZ drivers in contrib.
4244 # This section has to come after the libtool stuff because it needs to
4245 # know how to name the driver object files.
4249 DLZ_DRIVER_INCLUDES=""
4256 # Configure support for building a shared library object
4258 # Even when libtool is available it can't always be relied upon
4259 # to build an object that can be dlopen()'ed, but this is necessary
4260 # for building the dlzexternal system test, so we'll try it the
4261 # old-fashioned way.
4270 [ --with-dlopen=ARG support dynamically loadable DLZ drivers],
4271 dlopen="$withval", dlopen="yes")
4274 *-sunos*) dlopen="no"
4278 if test "$dlopen" = "yes"; then
4279 AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
4280 if test "$have_dl" = "yes"; then
4283 AC_CHECK_FUNCS(dlopen dlclose dlsym,,dlopen=no)
4286 if test "$dlopen" = "yes"; then
4291 if test "$have_dl" = "yes"
4293 if test "$use_libtool" = "yes"; then
4294 SO_LDFLAGS="-Xcompiler -shared"
4297 SO_LDFLAGS="-shared"
4301 SO_LDFLAGS="-shared"
4305 *-freebsd*|*-openbsd*|*-netbsd*)
4307 SO_LDFLAGS="-Bshareable -x"
4312 SO_LDFLAGS="-G -z text"
4318 SO_LDFLAGS="-b +vnocompatwarnings"
4326 if test "X$GCC" = "Xyes"; then
4330 if test "$use_libtool" = "yes"; then
4331 SO_LDFLAGS="-Xcompiler -shared"
4334 SO_LDFLAGS="-shared"
4340 # If we still don't know how to make shared objects, don't make any.
4341 if test -n "$SO_LD"; then
4342 SO_TARGETS="\${SO_TARGETS}"
4343 AC_DEFINE(ISC_DLZ_DLOPEN, 1,
4344 [Define to allow building of objects for dlopen().])
4350 AC_SUBST(SO_LDFLAGS)
4352 AC_SUBST(SO_TARGETS)
4354 sinclude(contrib/dlz/config.dlz.in)
4355 AC_MSG_CHECKING(contributed DLZ drivers)
4357 if test -n "$CONTRIB_DLZ"
4360 DLZ_DRIVER_RULES=contrib/dlz/drivers/rules
4361 AC_CONFIG_FILES([$DLZ_DRIVER_RULES])
4364 DLZ_DRIVER_RULES=/dev/null
4367 AC_SUBST(CONTRIB_DLZ)
4368 AC_SUBST(DLZ_DRIVER_INCLUDES)
4369 AC_SUBST(DLZ_DRIVER_LIBS)
4370 AC_SUBST(DLZ_DRIVER_SRCS)
4371 AC_SUBST(DLZ_DRIVER_OBJS)
4372 AC_SUBST(DLZ_SYSTEM_TEST)
4373 AC_SUBST_FILE(DLZ_DRIVER_RULES)
4375 if test "$cross_compiling" = "yes"; then
4376 if test -z "$BUILD_CC"; then
4377 AC_MSG_ERROR([BUILD_CC not set])
4379 BUILD_CFLAGS="$BUILD_CFLAGS"
4380 BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
4381 BUILD_LDFLAGS="$BUILD_LDFLAGS"
4382 BUILD_LIBS="$BUILD_LIBS"
4385 BUILD_CFLAGS="$CFLAGS"
4386 BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
4387 BUILD_LDFLAGS="$LDFLAGS"
4392 for e in $BUILD_LDFLAGS ; do
4397 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4398 NEWFLAGS="$NEWFLAGS $e $ee"
4401 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4402 NEWFLAGS="$NEWFLAGS $e $ee"
4405 ee=`echo $e | sed -e 's%^-L%-R%'`
4406 NEWFLAGS="$NEWFLAGS $e $ee"
4409 NEWFLAGS="$NEWFLAGS $e"
4414 NEWFLAGS="$NEWFLAGS $e"
4418 BUILD_LDFLAGS="$NEWFLAGS"
4421 for e in $DNS_GSSAPI_LIBS ; do
4426 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4427 NEWFLAGS="$NEWFLAGS $e $ee"
4430 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4431 NEWFLAGS="$NEWFLAGS $e $ee"
4434 ee=`echo $e | sed -e 's%^-L%-R%'`
4435 NEWFLAGS="$NEWFLAGS $e $ee"
4438 NEWFLAGS="$NEWFLAGS $e"
4443 NEWFLAGS="$NEWFLAGS $e"
4447 DNS_GSSAPI_LIBS="$NEWFLAGS"
4450 for e in $ISC_OPENSSL_LIBS ; do
4455 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4456 NEWFLAGS="$NEWFLAGS $e $ee"
4459 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4460 NEWFLAGS="$NEWFLAGS $e $ee"
4463 ee=`echo $e | sed -e 's%^-L%-R%'`
4464 NEWFLAGS="$NEWFLAGS $e $ee"
4467 NEWFLAGS="$NEWFLAGS $e"
4472 NEWFLAGS="$NEWFLAGS $e"
4476 ISC_OPENSSL_LIBS="$NEWFLAGS"
4479 for e in $DNS_CRYPTO_LIBS ; do
4484 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4485 NEWFLAGS="$NEWFLAGS $e $ee"
4488 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
4489 NEWFLAGS="$NEWFLAGS $e $ee"
4492 ee=`echo $e | sed -e 's%^-L%-R%'`
4493 NEWFLAGS="$NEWFLAGS $e $ee"
4496 NEWFLAGS="$NEWFLAGS $e"
4501 NEWFLAGS="$NEWFLAGS $e"
4505 DNS_CRYPTO_LIBS="$NEWFLAGS"
4508 AC_SUBST(BUILD_CFLAGS)
4509 AC_SUBST(BUILD_CPPFLAGS)
4510 AC_SUBST(BUILD_LDFLAGS)
4511 AC_SUBST(BUILD_LIBS)
4514 # Commands to run at the end of config.status.
4515 # Don't just put these into configure, it won't work right if somebody
4516 # runs config.status directly (which autoconf allows).
4521 [chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter])
4524 # Files to configure. These are listed here because we used to
4525 # specify them as arguments to AC_OUTPUT. It's (now) ok to move these
4526 # elsewhere if there's a good reason for doing so.
4535 bin/confgen/Makefile
4536 bin/confgen/unix/Makefile
4541 bin/named/unix/Makefile
4542 bin/nsupdate/Makefile
4545 bin/python/dnssec-checkds.py
4546 bin/python/dnssec-coverage.py
4549 bin/tests/atomic/Makefile
4550 bin/tests/db/Makefile
4551 bin/tests/dst/Makefile
4552 bin/tests/dst/Kdh.+002+18602.key
4553 bin/tests/dst/Kdh.+002+18602.private
4554 bin/tests/dst/Kdh.+002+48957.key
4555 bin/tests/dst/Kdh.+002+48957.private
4556 bin/tests/dst/Ktest.+001+00002.key
4557 bin/tests/dst/Ktest.+001+54622.key
4558 bin/tests/dst/Ktest.+001+54622.private
4559 bin/tests/dst/Ktest.+003+23616.key
4560 bin/tests/dst/Ktest.+003+23616.private
4561 bin/tests/dst/Ktest.+003+49667.key
4562 bin/tests/dst/dst_2_data
4563 bin/tests/dst/t2_data_1
4564 bin/tests/dst/t2_data_2
4565 bin/tests/dst/t2_dsasig
4566 bin/tests/dst/t2_rsasig
4567 bin/tests/hashes/Makefile
4568 bin/tests/headerdep_test.sh
4569 bin/tests/master/Makefile
4570 bin/tests/mem/Makefile
4571 bin/tests/names/Makefile
4572 bin/tests/net/Makefile
4573 bin/tests/pkcs11/Makefile
4574 bin/tests/pkcs11/benchmarks/Makefile
4575 bin/tests/rbt/Makefile
4576 bin/tests/resolver/Makefile
4577 bin/tests/sockaddr/Makefile
4578 bin/tests/system/Makefile
4579 bin/tests/system/conf.sh
4580 bin/tests/system/builtin/Makefile
4581 bin/tests/system/dlz/prereq.sh
4582 bin/tests/system/dlzexternal/Makefile
4583 bin/tests/system/dlzexternal/ns1/named.conf
4584 bin/tests/system/dlzredir/prereq.sh
4585 bin/tests/system/filter-aaaa/Makefile
4586 bin/tests/system/geoip/Makefile
4587 bin/tests/system/inline/checkdsa.sh
4588 bin/tests/system/lwresd/Makefile
4589 bin/tests/system/sit/prereq.sh
4590 bin/tests/system/rpz/Makefile
4591 bin/tests/system/rsabigexponent/Makefile
4592 bin/tests/system/tkey/Makefile
4593 bin/tests/system/tsiggss/Makefile
4594 bin/tests/tasks/Makefile
4595 bin/tests/timers/Makefile
4596 bin/tests/virtual-time/Makefile
4597 bin/tests/virtual-time/conf.sh
4599 contrib/scripts/check-secure-delegation.pl
4600 contrib/scripts/zone-edit.sh
4603 doc/doxygen/Doxyfile
4604 doc/doxygen/Makefile
4605 doc/doxygen/doxygen-input-filter
4608 doc/xsl/isc-docbook-chunk.xsl
4609 doc/xsl/isc-docbook-html.xsl
4610 doc/xsl/isc-docbook-latex.xsl
4611 doc/xsl/isc-manpage.xsl
4612 doc/xsl/isc-notes-html.xsl
4613 doc/xsl/isc-notes-latex.xsl
4617 lib/bind9/include/Makefile
4618 lib/bind9/include/bind9/Makefile
4620 lib/dns/include/Makefile
4621 lib/dns/include/dns/Makefile
4622 lib/dns/include/dst/Makefile
4623 lib/dns/tests/Makefile
4625 lib/irs/include/Makefile
4626 lib/irs/include/irs/Makefile
4627 lib/irs/include/irs/netdb.h
4628 lib/irs/include/irs/platform.h
4629 lib/isc/$arch/Makefile
4630 lib/isc/$arch/include/Makefile
4631 lib/isc/$arch/include/isc/Makefile
4632 lib/isc/$thread_dir/Makefile
4633 lib/isc/$thread_dir/include/Makefile
4634 lib/isc/$thread_dir/include/isc/Makefile
4636 lib/isc/include/Makefile
4637 lib/isc/include/isc/Makefile
4638 lib/isc/include/isc/platform.h
4639 lib/isc/include/pk11/Makefile
4640 lib/isc/include/pkcs11/Makefile
4641 lib/isc/tests/Makefile
4642 lib/isc/nls/Makefile
4643 lib/isc/unix/Makefile
4644 lib/isc/unix/include/Makefile
4645 lib/isc/unix/include/isc/Makefile
4646 lib/isc/unix/include/pkcs11/Makefile
4648 lib/isccc/include/Makefile
4649 lib/isccc/include/isccc/Makefile
4651 lib/isccfg/include/Makefile
4652 lib/isccfg/include/isccfg/Makefile
4654 lib/lwres/include/Makefile
4655 lib/lwres/include/lwres/Makefile
4656 lib/lwres/include/lwres/netdb.h
4657 lib/lwres/include/lwres/platform.h
4658 lib/lwres/man/Makefile
4659 lib/lwres/tests/Makefile
4660 lib/lwres/unix/Makefile
4661 lib/lwres/unix/include/Makefile
4662 lib/lwres/unix/include/lwres/Makefile
4664 lib/tests/include/Makefile
4665 lib/tests/include/tests/Makefile
4666 lib/samples/Makefile
4667 lib/samples/Makefile-postinstall
4679 # Now that the Makefiles exist we can ensure that everything is rebuilt.
4681 AC_ARG_WITH(make-clean,
4682 [ --with-make-clean run "make clean" at end of configure [[yes|no]]],
4683 make_clean="$withval", make_clean="yes")
4684 case "$make_clean" in
4690 AC_ARG_ENABLE(full-report,
4691 [ --enable-full-report report values of all configure options])
4693 echo "========================================================================"
4694 echo "Configuration summary:"
4695 echo "------------------------------------------------------------------------"
4696 echo "Optional features enabled:"
4697 if $use_threads; then
4698 echo " Multiprocessing support (--enable-threads)"
4699 if test "$enable_full_report" = "yes" -o "$locktype" = "standard"; then
4700 echo " Mutex lock type: $locktype"
4703 test "$use_tuning" = "large" && echo " Large-system tuning (--with-tuning)"
4704 test "$use_geoip" = "no" || echo " GeoIP access control (--with-geoip)"
4705 test "$use_gssapi" = "no" || echo " GSS-API (--with-gssapi)"
4706 if test "$enable_sit" != "no"; then
4707 echo " Source Identity Token support (--enable-sit)"
4708 if test "$enable_full_report" = "yes" -o "$with_sit_alg" != "aes"; then
4709 echo " Algorithm: $with_sit_alg"
4713 # these lines are only printed if run with --enable-full-report
4714 if test "$enable_full_report" = "yes"; then
4715 test "$enable_ipv6" = "no" -o "$found_ipv6" = "no" || \
4716 echo " IPv6 support (--enable-ipv6)"
4717 test "X$CRYPTO" = "X" -o "$want_native_pkcs11" = "yes" || \
4718 echo " OpenSSL cryptography/DNSSEC (--with-openssl)"
4719 test "X$PYTHON" = "X" || echo " Python tools (--with-python)"
4720 test "X$libxml2_libs" = "X" || echo " XML statistics (--with-libxml2)"
4721 test "X$have_libjson" = "X" || echo " JSON statistics (--with-libjson)"
4724 if test "$use_pkcs11" != "no"; then
4725 if test "$want_native_pkcs11" = "yes"; then
4726 echo " Native PKCS#11/Cryptoki support (--enable-native-pkcs11)"
4728 echo " PKCS#11/Cryptoki support using OpenSSL (--with-pkcs11)"
4730 echo " Provider library: $PKCS11_PROVIDER"
4732 if test "$OPENSSL_GOST" = "yes" -o "$PKCS11_GOST" = "yes"; then
4733 echo " GOST algorithm support (encoding: $gosttype) (--with-gost)"
4735 test "$OPENSSL_ECDSA" = "yes" -o "$PKCS11_ECDSA" = "yes" && \
4736 echo " ECDSA algorithm support (--with-ecdsa)"
4737 test "$enable_fixed" = "yes" && \
4738 echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)"
4739 test "$enable_filter" = "yes" && \
4740 echo " AAAA filtering (--enable-filter-aaaa)"
4741 test "$enable_seccomp" = yes && \
4742 echo " Use libseccomp system call filtering (--enable-seccomp)"
4743 test "$want_backtrace" = "yes" && \
4744 echo " Print backtrace on crash (--enable-backtrace)"
4745 test "$want_symtable" = "minimal" && \
4746 echo " Use symbol table for backtrace, named only (--enable-symtable)"
4747 test "$want_symtable" = "yes" -o "$want_symtable" = "all" && \
4748 echo " Use symbol table for backtrace, all binaries (--enable-symtable=all)"
4749 test "$use_libtool" = "no" || echo " Use GNU libtool (--with-libtool)"
4750 test "$atf" = "no" || echo " Automated Testing Framework (--with-atf)"
4752 echo " Dynamically loadable zone (DLZ) drivers:"
4753 test "$use_dlz_bdb" = "no" || \
4754 echo " Berkeley DB (--with-dlz-bdb)"
4755 test "$use_dlz_ldap" = "no" || \
4756 echo " LDAP (--with-dlz-ldap)"
4757 test "$use_dlz_mysql" = "no" || \
4758 echo " MySQL (--with-dlz-mysql)"
4759 test "$use_dlz_odbc" = "no" || \
4760 echo " ODBC (--with-dlz-odbc)"
4761 test "$use_dlz_postgres" = "no" || \
4762 echo " Postgres (--with-dlz-postgres)"
4763 test "$use_dlz_filesystem" = "no" || \
4764 echo " Filesystem (--with-dlz-filesystem)"
4765 test "$use_dlz_stub" = "no" || \
4766 echo " Stub (--with-dlz-stub)"
4767 test "$use_dlz_bdb $use_dlz_ldap $use_dlz_mysql $use_dlz_odbc $use_dlz_postgres $use_dlz_filesystem $use_dlz_stub" = "no no no no no no no" && echo " None"
4770 echo "Features disabled or unavailable on this platform:"
4771 $use_threads || echo " Multiprocessing support (--enable-threads)"
4772 test "$enable_ipv6" = "no" -o "$found_ipv6" = "no" && \
4773 echo " IPv6 support (--enable-ipv6)"
4774 test "$use_tuning" = "large" || echo " Large-system tuning (--with-tuning)"
4776 test "$use_geoip" = "no" && echo " GeoIP access control (--with-geoip)"
4777 test "$use_gssapi" = "no" && echo " GSS-API (--with-gssapi)"
4778 test "$enable_sit" = "no" && echo " Source Identity Token support (--enable-sit)"
4780 test "$enable_fixed" = "yes" || \
4781 echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)"
4783 if test "X$CRYPTO" = "X" -o "$want_native_pkcs11" = "yes"
4785 echo " OpenSSL cryptography/DNSSEC (--with-openssl)"
4786 elif test "$use_pkcs11" = "no"; then
4787 echo " PKCS#11/Cryptoki support (--with-pkcs11)"
4789 test "$want_native_pkcs11" = "yes" ||
4790 echo " Native PKCS#11/Cryptoki support (--enable-native-pkcs11)"
4791 test "X$CRYPTO" = "X" -o "$OPENSSL_GOST" = "yes" -o "$PKCS11_GOST" = "yes" || \
4792 echo " GOST algorithm support (--with-gost)"
4793 test "X$CRYPTO" = "X" -o "$OPENSSL_ECDSA" = "yes" -o "$PKCS11_ECDSA" = "yes" || \
4794 echo " ECDSA algorithm support (--with-ecdsa)"
4796 test "$enable_seccomp" = yes || \
4797 echo " Use libseccomp system call filtering (--enable-seccomp)"
4798 test "$want_backtrace" = "yes" || \
4799 echo " Print backtrace on crash (--enable-backtrace)"
4800 test "$use_libtool" = "yes" || echo " Use GNU libtool (--with-libtool)"
4801 test "$atf" = "no" && echo " Automated Testing Framework (--with-atf)"
4803 test "X$PYTHON" = "X" && echo " Python tools (--with-python)"
4804 test "X$libxml2_libs" = "X" && echo " XML statistics (--with-libxml2)"
4805 test "X$have_libjson" = "X" && echo " JSON statistics (--with-libjson)"
4807 if test "X$ac_unrecognized_opts" != "X"; then
4809 echo "Unrecognized options:"
4810 echo " $ac_unrecognized_opts"
4812 echo "========================================================================"
4814 if test "X$CRYPTO" = "X"; then
4816 BIND 9 is being built without cryptography support. This means it will
4817 not have DNSSEC support. Use --with-openssl, or --with-pkcs11 and
4818 --enable-native-pkcs11 to enable cryptography.
4822 if test "X$OPENSSL_WARNING" != "X"; then
4824 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
4825 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
4827 WARNING Your OpenSSL crypto library may be vulnerable to WARNING
4828 WARNING one or more of the the following known security WARNING
4829 WARNING flaws: WARNING
4831 WARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
4832 WARNING CVE-2006-2940. WARNING
4834 WARNING It is recommended that you upgrade to OpenSSL WARNING
4835 WARNING version 0.9.8d/0.9.7l (or greater). WARNING
4837 WARNING You can disable this warning by specifying: WARNING
4839 WARNING --disable-openssl-version-check WARNING
4841 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
4842 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
4846 # Tell Emacs to edit this file in shell mode.