1 # Copyright (C) 2004-2014 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.
18 esyscmd([sed -e 's/^/# /' -e '/Portions of this code/,$d' COPYRIGHT])dnl
21 AC_REVISION($Revision: 1.533 $)
23 AC_INIT(lib/dns/name.c)
26 AC_CONFIG_HEADER(config.h)
27 AC_CONFIG_MACRO_DIR([libtool.m4])
38 # Just set the maximum command line length for sunos as it otherwise
39 # takes a exceptionally long time to work it out. Required for libtool.
41 lt_cv_sys_max_cmd_len=4096;
49 AC_SUBST(STD_CINCLUDES)
50 AC_SUBST(STD_CDEFINES)
51 AC_SUBST(STD_CWARNINGS)
55 # Warn if the user specified libbind, which is now deprecated
56 AC_ARG_ENABLE(libbind, [ --enable-libbind deprecated])
58 case "$enable_libbind" in
60 AC_MSG_ERROR(['libbind' is no longer part of the BIND 9 distribution.
61 It is available from http://www.isc.org as a separate download.])
67 AC_ARG_ENABLE(developer, [ --enable-developer enable developer build settings])
68 case "$enable_developer" in
70 STD_CDEFINES="$STD_CDEFINES -DISC_LIST_CHECKINIT=1"
71 test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes
72 test "${with_atf+set}" = set || with_atf=yes
73 test "${enable_filter_aaaa+set}" = set || enable_filter_aaaa=yes
74 test "${enable_rrl+set}" = set || enable_rrl=yes
75 test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes
78 test "${enable_exportlib+set}" = set || enable_exportlib=yes
81 test "${enable_exportlib+set}" = set || enable_exportlib=yes
84 test "${enable_symtable+set}" = set || enable_symtable=all
88 # Make very sure that these are the first files processed by
89 # config.status, since we use the processed output as the input for
90 # AC_SUBST_FILE() substitutions in other files.
92 AC_CONFIG_FILES([make/rules make/includes])
99 # The POSIX ln(1) program. Non-POSIX systems may substitute
100 # "copy" or something.
107 ar program not found. Please fix your PATH to include the directory in
108 which ar resides, or set AR in the environment with the full path to ar.
117 AC_PATH_PROGS(ETAGS, etags emacs-etags)
120 # Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
121 # GNU emacs etags, and it requires the -L flag.
123 if test "X$ETAGS" != "X"; then
124 AC_MSG_CHECKING(for Exuberant Ctags etags)
125 if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
135 # Perl is optional; it is used only by some of the system test scripts.
136 # Note: the backtrace feature (see below) uses perl to build the symbol table,
137 # but it still compiles without perl, in which case an empty table will be used.
139 AC_PATH_PROGS(PERL, perl5 perl)
143 # Python is also optional; it is used by the tools in bin/python.
144 # If python is unavailable, we simply don't build those.
147 [ --with-python=PATH Specify path to python interpreter],
148 use_python="$withval", use_python="unspec")
150 case "$use_python" in
152 AC_MSG_RESULT(disabled)
155 case "$use_python" in
157 AC_PATH_PROGS(PYTHON, python)
160 AC_PATH_PROGS(PYTHON, $use_python)
163 if test "X$PYTHON" == "X"
165 case "$use_python" in
167 AC_MSG_RESULT(disabled)
170 AC_MSG_ERROR([missing python])
175 testscript='try: import argparse
177 AC_MSG_CHECKING([python module 'argparse'])
178 if $PYTHON -c "$testscript"; then
179 AC_MSG_RESULT([found, using $PYTHON])
181 case "$use_python" in
186 AC_MSG_RESULT([not found, python disabled])
189 AC_MSG_RESULT([no found])
190 AC_MSG_ERROR([python 'argparse' module not supported])
200 if test "X$PYTHON" != "X"; then
207 AC_SUBST(PYTHON_TOOLS)
210 # Special processing of paths depending on whether --prefix,
211 # --sysconfdir or --localstatedir arguments were given. What's
212 # desired is some compatibility with the way previous versions
213 # of BIND built; they defaulted to /usr/local for most parts of
214 # the installation, but named.boot/named.conf was in /etc
215 # and named.pid was in /var/run.
217 # So ... if none of --prefix, --sysconfdir or --localstatedir are
218 # specified, set things up that way. If --prefix is given, use
219 # it for sysconfdir and localstatedir the way configure normally
220 # would. To change the prefix for everything but leave named.conf
221 # in /etc or named.pid in /var/run, then do this the usual configure way:
222 # ./configure --prefix=/somewhere --sysconfdir=/etc
223 # ./configure --prefix=/somewhere --localstatedir=/var
225 # To put named.conf and named.pid in /usr/local with everything else,
226 # set the prefix explicitly to /usr/local even though that's the default:
227 # ./configure --prefix=/usr/local
231 case "$sysconfdir" in
236 case "$localstatedir" in
245 # Make sure INSTALL uses an absolute path, else it will be wrong in all
246 # Makefiles, since they use make/rules.in and INSTALL will be adjusted by
247 # configure based on the location of the file where it is substituted.
248 # Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
249 # subdirectory of install-sh, This relative path will be wrong for all
250 # directories more than one level down from install-sh.
257 # Not all systems have dirname.
260 ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
263 ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
264 test "$ac_dir" = "$ac_prog" && ac_dir=.
265 test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
266 INSTALL="$ac_dir/$ac_prog"
271 # On these hosts, we really want to use cc, not gcc, even if it is
272 # found. The gcc that these systems have will not correctly handle
275 # However, if the user sets $CC to be something, let that override
278 if test "X$CC" = "X" ; then
284 # Use Sun's cc if it is available, but watch
285 # out for /usr/ucb/cc; it will never be the right
288 # If setting CC here fails, the AC_PROG_CC done
289 # below might still find gcc.
290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
291 for ac_dir in $PATH; do
292 test -z "$ac_dir" && ac_dir=.
298 if test -f "$ac_dir/cc"; then
319 # gcc's optimiser is broken at -02 for ultrasparc
321 if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
330 # OS dependent CC flags
333 # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
334 # -D_XOPEN_SOURCE_EXTENDED.
336 STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
337 CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
339 #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
341 STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
342 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
345 # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
347 STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
348 CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
350 # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
351 # parts of the IPv6 Advanced Socket API as a result. This is stupid
352 # as it breaks how the two halves (Basic and Advanced) of the IPv6
353 # Socket API were designed to be used but we have to live with it.
354 # Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
355 *-linux* | *-kfreebsd*-gnu)
356 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
357 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
360 # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use.
361 # Setting this is sufficient to select the correct behavior for BIND 9.
364 STD_CDEFINES="$STD_CDEFINES -D__APPLE_USE_RFC_3542"
365 CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542"
370 # CCNOOPT defaults to -O0 on gcc and disables optimization when is last
372 if test "X$CCNOOPT" = "X" -a "X$GCC" = "Xyes"; then
378 AC_CHECK_HEADERS(fcntl.h regex.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h,,,
379 [$ac_includes_default
380 #ifdef HAVE_SYS_PARAM_H
381 # include <sys/param.h>
388 AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
389 AC_C_FLEXIBLE_ARRAY_MEMBER
392 # Older versions of HP/UX don't define seteuid() and setegid()
394 AC_CHECK_FUNCS(seteuid setresuid)
395 AC_CHECK_FUNCS(setegid setresgid)
398 # UnixWare 7.1.1 with the feature supplement to the UDK compiler
399 # is reported to not support "static inline" (RT #1212).
401 AC_MSG_CHECKING(for static inline breakage)
403 static inline int foo1() {
407 static inline int foo2() {
413 AC_DEFINE(inline, ,[Define to empty if your compiler does not support "static inline".])])
416 AC_CHECK_TYPE(ssize_t, int)
417 AC_CHECK_TYPE(uintptr_t,unsigned long)
418 AC_CHECK_TYPE(socklen_t,
419 [AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
423 #include <sys/types.h>
424 #include <sys/socket.h>
425 int getsockname(int, struct sockaddr *, size_t *);
427 [AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
428 [AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
431 #include <sys/types.h>
432 #include <sys/socket.h>
434 AC_SUBST(ISC_SOCKADDR_LEN_T)
436 AC_MSG_CHECKING(for long long)
437 AC_TRY_COMPILE([],[long long i = 0; return (0);],
439 ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
441 ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
442 AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
445 # check for GCC noreturn attribute
447 AC_MSG_CHECKING(for GCC noreturn attribute)
448 AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));],
450 ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
451 ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"],
453 ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
454 ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST"])
455 AC_SUBST(ISC_PLATFORM_NORETURN_PRE)
456 AC_SUBST(ISC_PLATFORM_NORETURN_POST)
459 # check if we have lifconf
461 AC_MSG_CHECKING(for struct lifconf)
463 #include <sys/types.h>
464 #include <sys/socket.h>
468 struct lifconf lifconf;
469 lifconf.lifc_len = 0;
473 ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
475 ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
476 AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
479 # check if we want the new statistics
481 AC_ARG_ENABLE(newstats,
482 [ --enable-newstats use the new statistics])
483 case "$enable_newstats" in
485 AC_DEFINE(NEWSTATS, 1, [Use the new XML schema for statistics])
492 # check if we want DNS RRL
495 [ --enable-rrl use DNS Response Rate Limiting])
496 case "$enable_rrl" in
498 AC_DEFINE(USE_RRL, 1, [Enable DNS Response Rate Limiting])
499 RRLLINKOBJS='${RRLOBJS}'
500 RRLLINKSRCS='${RRLSRCS}'
507 AC_SUBST(RRLLINKOBJS)
508 AC_SUBST(RRLLINKSRCS)
511 # check if we have kqueue
513 AC_ARG_ENABLE(kqueue,
514 [ --enable-kqueue use BSD kqueue when available [[default=yes]]],
515 want_kqueue="$enableval", want_kqueue="yes")
518 AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
519 case $ac_cv_have_kqueue in
521 ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
524 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
529 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
532 AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
535 # check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
536 # so we need to try running the code, not just test its existence.
539 [ --enable-epoll use Linux epoll when available [[default=auto]]],
540 want_epoll="$enableval", want_epoll="auto")
543 AC_MSG_CHECKING(epoll support)
545 #include <sys/epoll.h>
547 if (epoll_create(1) < 0)
553 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
555 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"],
557 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
560 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
563 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
566 AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
569 # check if we support /dev/poll
571 AC_ARG_ENABLE(devpoll,
572 [ --enable-devpoll use /dev/poll when available [[default=yes]]],
573 want_devpoll="$enableval", want_devpoll="yes")
574 case $want_devpoll in
576 AC_CHECK_HEADERS(sys/devpoll.h devpoll.h,
577 ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
579 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
583 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
586 AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
589 # check if we need to #include sys/select.h explicitly
591 case $ac_cv_header_unistd_h in
593 AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
595 #include <sys/types.h> /* Ultrix */
596 #include <unistd.h>],
597 [fd_set read_set; return (0);],
599 ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
600 LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
602 case $ac_cv_header_sys_select_h in
604 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
605 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
608 AC_MSG_ERROR([need either working unistd.h or sys/select.h])
614 case $ac_cv_header_sys_select_h in
616 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
617 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
620 AC_MSG_ERROR([need either unistd.h or sys/select.h])
625 AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
626 AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
629 # Find the machine's endian flavor.
634 # was --with-openssl specified?
637 AC_MSG_CHECKING(for OpenSSL library)
639 [ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
640 (Required for DNSSEC)],
641 use_openssl="$withval", use_openssl="auto")
643 openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
644 if test "$use_openssl" = "auto"
646 for d in $openssldirs
648 if test -f $d/include/openssl/opensslv.h
657 case "$use_openssl" in
662 OPENSSLGOSTLINKOBJS=""
663 OPENSSLGOSTLINKSRS=""
670 OPENSSLGOSTLINKOBJS=""
671 OPENSSLGOSTLINKSRS=""
675 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
676 If you don't want OpenSSL, use --without-openssl])
679 if test "$use_openssl" = "yes"
681 # User did not specify a path - guess it
682 for d in $openssldirs
684 if test -f $d/include/openssl/opensslv.h
690 if test "$use_openssl" = "yes"
692 AC_MSG_RESULT(not found)
694 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
696 elif ! test -f "$use_openssl"/include/openssl/opensslv.h
698 AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found])
700 USE_OPENSSL='-DOPENSSL'
701 if test "$use_openssl" = "/usr"
704 DNS_OPENSSL_LIBS="-lcrypto"
706 DST_OPENSSL_INC="-I$use_openssl/include"
709 DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
712 DNS_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
716 # Apple's ld seaches for serially for dynamic
717 # then static libraries. This means you can't
718 # use -L to override dynamic system libraries
719 # with static ones when linking. Instead
720 # we specify a absolute path.
722 if test -f "$use_openssl/lib/libcrypto.dylib"
724 DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
726 DNS_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a"
730 DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
734 AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include)
736 saved_cflags="$CFLAGS"
738 CFLAGS="$CFLAGS $DST_OPENSSL_INC"
739 LIBS="$LIBS $DNS_OPENSSL_LIBS"
740 AC_MSG_CHECKING(whether linking with OpenSSL works)
742 #include <openssl/err.h>
748 [AC_MSG_RESULT(yes)],
750 AC_MSG_ERROR(Could not run test program using OpenSSL from
751 $use_openssl/lib and $use_openssl/include.
752 Please check the argument to --with-openssl and your
753 shared library configuration (e.g., LD_LIBRARY_PATH).)],
754 [AC_MSG_RESULT(assuming it does work on target platform)])
756 AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
758 #include <openssl/err.h>],
759 [ DSO_METHOD_dlfcn(); ],
763 #include <openssl/err.h>
764 ],[ DSO_METHOD_dlfcn(); ],
766 DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl"
768 [AC_MSG_RESULT(unknown)
769 AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
770 [AC_MSG_RESULT(assuming it does work on target platform)])
772 [AC_MSG_RESULT(assuming it does work on target platform)]
775 AC_ARG_ENABLE(openssl-version-check,
776 [AC_HELP_STRING([--enable-openssl-version-check],
777 [Check OpenSSL Version @<:@default=yes@:>@])])
778 case "$enable_openssl_version_check" in
780 AC_MSG_CHECKING(OpenSSL library version)
783 #include <openssl/opensslv.h>
785 if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
786 OPENSSL_VERSION_NUMBER < 0x00908000L) ||
787 OPENSSL_VERSION_NUMBER >= 0x0090804fL)
789 printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
790 OPENSSL_VERSION_NUMBER);
791 printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n"
792 "Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n");
797 [AC_MSG_RESULT(not compatible)
800 [AC_MSG_RESULT(assuming target platform has compatible version)])
803 AC_MSG_RESULT(Skipped OpenSSL version check)
807 AC_MSG_CHECKING(for OpenSSL DSA support)
808 if test -f $use_openssl/include/openssl/dsa.h
810 AC_DEFINE(HAVE_OPENSSL_DSA)
816 AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512)
818 AC_MSG_CHECKING(for OpenSSL ECDSA support)
822 #include <openssl/ecdsa.h>
823 #include <openssl/objects.h>
825 EC_KEY *ec256, *ec384;
827 #if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384)
830 ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
831 ec384 = EC_KEY_new_by_curve_name(NID_secp384r1);
832 if (ec256 == NULL || ec384 == NULL)
841 [AC_MSG_RESULT(using --with-ecdsa)])
842 AC_ARG_WITH(ecdsa, [ --with-ecdsa OpenSSL ECDSA],
843 with_ecdsa="$withval", with_ecdsa="auto")
844 case "$with_ecdsa" in
846 case "$have_ecdsa" in
847 no) AC_MSG_ERROR([ecdsa not supported]) ;;
854 case "$have_ecdsa" in
856 *) AC_MSG_ERROR([need --with-ecdsa=[[yes or no]]]) ;;
863 AC_DEFINE(HAVE_OPENSSL_ECDSA, 1,
864 [Define if your OpenSSL version supports ECDSA.])
870 AC_MSG_CHECKING(for OpenSSL GOST support)
873 #include <openssl/conf.h>
874 #include <openssl/engine.h>
876 #if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
881 OPENSSL_config(NULL);
883 e = ENGINE_by_id("gost");
886 if (ENGINE_init(e) <= 0)
898 [AC_MSG_RESULT(using --with-gost)])
899 AC_ARG_WITH(gost, [ --with-gost OpenSSL GOST],
900 with_gost="$withval", with_gost="auto")
904 no) AC_MSG_ERROR([gost not supported]) ;;
913 *) AC_MSG_ERROR([need --with-gost=[[yes or no]]]) ;;
920 OPENSSLGOSTLINKOBJS='${OPENSSLGOSTLINKOBJS}'
921 OPENSSLGOSTLINKSRCS='${OPENSSLGOSTLINKSRCS}'
922 AC_DEFINE(HAVE_OPENSSL_GOST, 1,
923 [Define if your OpenSSL version supports GOST.])
928 CFLAGS="$saved_cflags"
930 OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
931 OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
937 # This would include the system openssl path (and linker options to use
938 # it as needed) if it is found.
941 AC_SUBST(USE_OPENSSL)
942 AC_SUBST(DST_OPENSSL_INC)
943 AC_SUBST(OPENSSLGOSTLINKOBJS)
944 AC_SUBST(OPENSSLGOSTLINKSRCS)
945 AC_SUBST(OPENSSLLINKOBJS)
946 AC_SUBST(OPENSSLLINKSRCS)
947 AC_SUBST(OPENSSL_ECDSA)
948 AC_SUBST(OPENSSL_GOST)
950 DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
953 # Use OpenSSL for hash functions
956 AC_ARG_ENABLE(openssl-hash,
957 [ --enable-openssl-hash use OpenSSL for hash functions [[default=no]]],
958 want_openssl_hash="$enableval", want_openssl_hash="no")
959 case $want_openssl_hash in
961 if test "$USE_OPENSSL" = ""
963 AC_MSG_ERROR([No OpenSSL for hash functions])
965 ISC_PLATFORM_OPENSSLHASH="#define ISC_PLATFORM_OPENSSLHASH 1"
966 ISC_OPENSSL_INC="$DST_OPENSSL_INC"
969 ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH"
973 AC_SUBST(ISC_PLATFORM_OPENSSLHASH)
974 AC_SUBST(ISC_OPENSSL_INC)
977 # PKCS11 (aka crypto hardware) support
979 # This works only with the right OpenSSL with PKCS11 engine!
982 AC_MSG_CHECKING(for PKCS11 support)
984 [ --with-pkcs11[=PATH] Build with PKCS11 support [yes|no|path]
985 (PATH is for the PKCS11 provider)],
986 use_pkcs11="$withval", use_pkcs11="no")
988 case "$use_pkcs11" in
990 AC_MSG_RESULT(disabled)
995 AC_MSG_RESULT(using OpenSSL with PKCS11 support)
996 USE_PKCS11='-DUSE_PKCS11'
1000 AC_SUBST(USE_PKCS11)
1001 AC_SUBST(PKCS11_TOOLS)
1003 AC_MSG_CHECKING(for PKCS11 tools)
1004 case "$use_pkcs11" in
1006 AC_MSG_RESULT(disabled)
1007 PKCS11_PROVIDER="undefined"
1010 AC_MSG_RESULT(PKCS11 provider is "$use_pkcs11")
1011 PKCS11_PROVIDER="$use_pkcs11"
1014 AC_SUBST(PKCS11_PROVIDER)
1016 AC_MSG_CHECKING(for GSSAPI library)
1018 [ --with-gssapi=PATH Specify path for system-supplied GSSAPI [[default=yes]]],
1019 use_gssapi="$withval", use_gssapi="yes")
1021 # gssapi is just the framework, we really require kerberos v5, so
1022 # look for those headers (the gssapi headers must be there, too)
1023 # The problem with this implementation is that it doesn't allow
1024 # for the specification of gssapi and krb5 headers in different locations,
1025 # which probably ought to be fixed although fixing might raise the issue of
1026 # trying to build with incompatible versions of gssapi and krb5.
1027 if test "$use_gssapi" = "yes"
1029 # first, deal with the obvious
1030 if test \( -f /usr/include/kerberosv5/krb5.h -o \
1031 -f /usr/include/krb5/krb5.h -o \
1032 -f /usr/include/krb5.h \) -a \
1033 \( -f /usr/include/gssapi.h -o \
1034 -f /usr/include/gssapi/gssapi.h \)
1038 krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr"
1041 if test -f $d/include/gssapi/gssapi_krb5.h -o \
1042 -f $d/include/krb5.h
1044 if test -f $d/include/gssapi/gssapi.h -o \
1045 -f $d/include/gssapi.h
1056 case "$use_gssapi" in
1058 AC_MSG_RESULT(disabled)
1062 AC_MSG_ERROR([--with-gssapi must specify a path])
1065 AC_MSG_RESULT(looking in $use_gssapi/lib)
1066 USE_GSSAPI='-DGSSAPI'
1067 saved_cppflags="$CPPFLAGS"
1068 CPPFLAGS="-I$use_gssapi/include $CPPFLAGS"
1069 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
1070 [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
1072 if test "$ISC_PLATFORM_GSSAPIHEADER" = ""; then
1073 AC_MSG_ERROR([gssapi.h not found])
1076 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h,
1077 [ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>"])
1079 AC_CHECK_HEADERS(krb5.h krb5/krb5.h kerberosv5/krb5.h,
1080 [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"])
1082 if test "$ISC_PLATFORM_KRB5HEADER" = ""; then
1083 AC_MSG_ERROR([krb5.h not found])
1086 CPPFLAGS="$saved_cppflags"
1089 # XXXDCL This probably doesn't work right on all systems.
1090 # It will need to be worked on as problems become evident.
1092 # Essentially the problems here relate to two different
1093 # areas. The first area is building with either KTH
1094 # or MIT Kerberos, particularly when both are present on
1095 # the machine. The other is static versus dynamic linking.
1097 # On the KTH vs MIT issue, Both have libkrb5 that can mess
1098 # up the works if one implementation ends up trying to
1099 # use the other's krb. This is unfortunately a situation
1100 # that very easily arises.
1102 # Dynamic linking when the dependency information is built
1103 # into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
1104 # all such problems go away, but when that setup is not
1105 # present, because either the dynamic libraries lack
1106 # dependencies or static linking is being done, then the
1107 # problems start to show up.
1111 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
1112 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
1114 "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
1115 "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
1116 "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
1119 # Note that this does not include $saved_libs, because
1120 # on FreeBSD machines this configure script has added
1121 # -L/usr/local/lib to LIBS, which can make the
1122 # -lgssapi_krb5 test succeed with shared libraries even
1123 # when you are trying to build with KTH in /usr/lib.
1124 if test "$use_gssapi" = "/usr"
1128 LIBS="-L$use_gssapi/lib $TRY_LIBS"
1130 AC_MSG_CHECKING(linking as $TRY_LIBS)
1131 AC_TRY_LINK( , [gss_acquire_cred();krb5_init_context()],
1132 gssapi_linked=yes, gssapi_linked=no)
1133 case $gssapi_linked in
1134 yes) AC_MSG_RESULT(yes); break ;;
1135 no) AC_MSG_RESULT(no) ;;
1139 case $gssapi_linked in
1140 no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
1144 # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib
1145 # but MIT in /usr/local/lib and trying to build with KTH.
1146 # /usr/local/lib can end up earlier on the link lines.
1147 # Like most kludges, this one is not only inelegant it
1148 # is also likely to be the wrong thing to do at least as
1149 # many times as it is the right thing. Something better
1152 if test "$use_gssapi" = "/usr" -a \
1153 -f /usr/local/lib/libkrb5.a; then
1157 case "$FIX_KTH_VS_MIT" in
1159 case "$enable_static_linking" in
1160 yes) gssapi_lib_suffix=".a" ;;
1161 *) gssapi_lib_suffix=".so" ;;
1164 for lib in $LIBS; do
1169 new_lib=`echo $lib |
1170 sed -e s%^-l%$use_gssapi/lib/lib% \
1171 -e s%$%$gssapi_lib_suffix%`
1172 NEW_LIBS="$NEW_LIBS $new_lib"
1175 AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
1183 DST_GSSAPI_INC="-I$use_gssapi/include"
1184 DNS_GSSAPI_LIBS="$LIBS"
1186 AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include)
1191 AC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
1192 AC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
1193 AC_SUBST(ISC_PLATFORM_GSSAPI_KRB5_HEADER)
1194 AC_SUBST(ISC_PLATFORM_KRB5HEADER)
1196 AC_SUBST(USE_GSSAPI)
1197 AC_SUBST(DST_GSSAPI_INC)
1198 AC_SUBST(DNS_GSSAPI_LIBS)
1199 DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS"
1202 # Applications linking with libdns also need to link with these libraries.
1205 AC_SUBST(DNS_CRYPTO_LIBS)
1208 # was --with-randomdev specified?
1210 AC_MSG_CHECKING(for random device)
1211 AC_ARG_WITH(randomdev,
1212 [ --with-randomdev=PATH Specify path for random device],
1213 use_randomdev="$withval", use_randomdev="unspec")
1215 case "$use_randomdev" in
1217 case "$cross_compiling" in
1219 AC_MSG_RESULT(unspecified)
1220 AC_MSG_ERROR([ need --with-randomdev=PATH or --with-randomdev=no])
1224 devrandom=/dev/arandom
1227 devrandom=/dev/random
1230 AC_MSG_RESULT($devrandom)
1231 AC_CHECK_FILE($devrandom,
1232 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
1237 AC_MSG_ERROR([--with-randomdev must specify a path])
1240 AC_MSG_RESULT(disabled)
1243 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
1244 AC_MSG_RESULT(using "$use_randomdev")
1249 # Do we have arc4random() ?
1251 AC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM))
1253 sinclude(config.threads.in)dnl
1257 if test "X$GCC" = "Xyes"; then
1261 CCOPT="$CCOPT -pthread"
1262 CCNOOPT="$CCNOOPT -pthread"
1263 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
1267 CCOPT="$CCOPT -pthread"
1268 CCNOOPT="$CCNOOPT -pthread"
1271 LIBS="$LIBS -lthread"
1274 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
1281 CCOPT="$CCOPT -pthread"
1282 CCNOOPT="$CCNOOPT -pthread"
1287 CCNOOPT="$CCNOOPT -mt"
1290 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
1292 *-sco-sysv*uw*|*-*-sysv*UnixWare*)
1294 CCOPT="$CCOPT -Kthread"
1295 CCNOOPT="$CCNOOPT -Kthread"
1299 CCOPT="$CCOPT -Kpthread"
1300 CCNOOPT="$CCNOOPT -Kpthread"
1304 ALWAYS_DEFINES="-D_REENTRANT"
1305 ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
1306 THREADOPTOBJS='${THREADOPTOBJS}'
1307 THREADOPTSRCS='${THREADOPTSRCS}'
1310 # We'd like to use sigwait() too
1312 AC_CHECK_FUNC(sigwait,
1313 AC_DEFINE(HAVE_SIGWAIT),
1314 AC_CHECK_LIB(c, sigwait,
1315 AC_DEFINE(HAVE_SIGWAIT),
1316 AC_CHECK_LIB(pthread, sigwait,
1317 AC_DEFINE(HAVE_SIGWAIT),
1318 AC_CHECK_LIB(pthread, _Psigwait,
1319 AC_DEFINE(HAVE_SIGWAIT),))))
1321 AC_CHECK_FUNC(pthread_attr_getstacksize,
1322 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
1324 AC_CHECK_FUNC(pthread_attr_setstacksize,
1325 AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
1327 AC_CHECK_HEADERS(sched.h)
1331 AC_CHECK_LIB(rt, sched_yield)
1335 AC_CHECK_FUNCS(sched_yield pthread_yield pthread_yield_np)
1338 # Additional OS-specific issues related to pthreads and sigwait.
1342 # One more place to look for sigwait.
1345 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
1347 *-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
1348 *-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
1349 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1352 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1357 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
1358 # called before certain pthreads calls. This is deprecated
1361 *-bsdi3.*|*-bsdi4.0*)
1362 AC_DEFINE(NEED_PTHREAD_INIT)
1365 # LinuxThreads requires some changes to the way we
1366 # deal with signals.
1369 AC_DEFINE(HAVE_LINUXTHREADS)
1372 # Ensure the right sigwait() semantics on Solaris and make
1373 # sure we call pthread_setconcurrency.
1376 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
1377 AC_CHECK_FUNC(pthread_setconcurrency,
1378 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
1381 # UnixWare does things its own way.
1383 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1384 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
1389 # Look for sysconf to allow detection of the number of processors.
1391 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
1394 ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
1395 thread_dir=nothreads
1401 AC_SUBST(ALWAYS_DEFINES)
1402 AC_SUBST(ISC_PLATFORM_USETHREADS)
1403 AC_SUBST(THREADOPTOBJS)
1404 AC_SUBST(THREADOPTSRCS)
1405 ISC_THREAD_DIR=$thread_dir
1406 AC_SUBST(ISC_THREAD_DIR)
1409 # was --with-libxml2 specified?
1411 AC_MSG_CHECKING(for libxml2 library)
1412 AC_ARG_WITH(libxml2,
1413 [ --with-libxml2[=PATH] Build with libxml2 library [yes|no|path]],
1414 use_libxml2="$withval", use_libxml2="auto")
1416 case "$use_libxml2" in
1421 case X`(xml2-config --version) 2>/dev/null` in
1423 libxml2_libs=`xml2-config --libs`
1424 libxml2_cflags=`xml2-config --cflags`
1433 if test -f "$use_libxml2/bin/xml2-config" ; then
1434 libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
1435 libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
1440 if test "X$libxml2_libs" != "X"
1443 CFLAGS="$CFLAGS $libxml2_cflags"
1444 LIBS="$LIBS $libxml2_libs"
1445 AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
1451 # In solaris 10, SMF can manage named service
1453 AC_CHECK_LIB(scf, smf_enable_instance)
1456 # flockfile is usually provided by pthreads, but we may want to use it
1457 # even if compiled with --disable-threads. getc_unlocked might also not
1460 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
1461 AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
1464 # Indicate what the final decision was regarding threads.
1466 AC_MSG_CHECKING(whether to build with threads)
1467 if $use_threads; then
1474 # End of pthreads stuff.
1480 AC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
1481 want_largefile="yes", want_largefile="no")
1482 case $want_largefile in
1484 ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1491 # Additional compiler settings.
1495 IRIX_DNSSEC_WARNINGS_HACK=""
1497 if test "X$GCC" = "Xyes"; then
1498 AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
1500 CFLAGS="$CFLAGS -fno-strict-aliasing"
1501 AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
1503 if test "$FNOSTRICTALIASING" = "yes"; then
1505 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
1508 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
1512 LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1520 CCNOOPT="$CCNOOPT -std"
1525 # The version of the C compiler that constantly warns about
1526 # 'const' as well as alignment issues is unfortunately not
1527 # able to be discerned via the version of the operating
1528 # system, nor does cc have a version flag.
1529 case "`$CC +W 123 2>&1`" in
1534 # Turn off the pointlessly noisy warnings.
1535 STD_CWARNINGS="+w1 +W 474,530,2193,2236"
1538 CCOPT="$CCOPT -Ae -z"
1539 CCNOOPT="$CCNOOPT -Ae -z"
1540 LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1541 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
1544 STD_CWARNINGS="-fullwarn -woff 1209"
1546 # Silence more than 250 instances of
1547 # "prototyped function redeclared without prototype"
1548 # and 11 instances of
1549 # "variable ... was set but never used"
1550 # from lib/dns/sec/openssl.
1552 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
1557 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1565 AC_SUBST(MKDEPCFLAGS)
1567 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
1572 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
1575 # -lxnet buys us one big porting headache... standards, gotta love 'em.
1577 # AC_CHECK_LIB(xnet, socket, ,
1578 # AC_CHECK_LIB(socket, socket)
1581 # Use this for now, instead:
1589 AC_CHECK_LIB(socket, socket)
1590 AC_CHECK_LIB(nsl, inet_addr)
1595 # Work around Solaris's select() limitations.
1598 *-solaris2.[[89]]|*-solaris2.1?)
1599 AC_DEFINE(FD_SETSIZE, 65536,
1600 [Solaris hack to get select_large_fdset.])
1607 AC_MSG_CHECKING(whether to use purify)
1609 [ --with-purify[=PATH] use Rational purify],
1610 use_purify="$withval", use_purify="no")
1612 case "$use_purify" in
1616 AC_PATH_PROG(purify_path, purify, purify)
1619 purify_path="$use_purify"
1623 case "$use_purify" in
1629 if test -f $purify_path || test $purify_path = purify; then
1630 AC_MSG_RESULT($purify_path)
1631 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
1632 PURIFY="$purify_path $PURIFYFLAGS"
1634 AC_MSG_ERROR([$purify_path not found.
1636 Please choose the proper path with the following command:
1638 configure --with-purify=PATH
1647 AC_ARG_WITH(libtool,
1648 [ --with-libtool use GNU libtool],
1649 use_libtool="$withval", use_libtool="no")
1651 case $use_libtool in
1656 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
1657 LIBTOOL_MODE_COMPILE='--mode=compile --tag=CC'
1658 LIBTOOL_MODE_INSTALL='--mode=install --tag=CC'
1659 LIBTOOL_MODE_LINK='--mode=link --tag=CC'
1661 *) LIBTOOL_ALLOW_UNDEFINED= ;;
1664 *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
1665 *) LIBTOOL_IN_MAIN= ;;
1674 LIBTOOL_MODE_COMPILE=
1675 LIBTOOL_MODE_INSTALL=
1677 LIBTOOL_ALLOW_UNDEFINED=
1683 # enable/disable dumping stack backtrace. Also check if the system supports
1684 # glibc-compatible backtrace() function.
1686 AC_ARG_ENABLE(backtrace,
1687 [ --enable-backtrace log stack backtrace on abort [[default=yes]]],
1688 want_backtrace="$enableval", want_backtrace="yes")
1689 case $want_backtrace in
1691 ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1"
1692 AC_TRY_LINK([#include <execinfo.h>],
1693 [return (backtrace((void **)0, 0));],
1694 [AC_DEFINE([HAVE_LIBCTRACE], [], [if system have backtrace function])],)
1697 ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE"
1700 AC_SUBST(ISC_PLATFORM_USEBACKTRACE)
1702 AC_ARG_ENABLE(symtable,
1703 [ --enable-symtable use internal symbol table for backtrace
1704 [[all|minimal(default)|none]]],
1705 want_symtable="$enableval", want_symtable="minimal")
1706 case $want_symtable in
1707 yes|all|minimal) # "yes" is a hidden value equivalent to "minimal"
1708 if test "$PERL" = ""
1710 AC_MSG_ERROR([Internal symbol table requires perl but no perl is found.
1711 Install perl or explicitly disable the feature by --disable-symtable.])
1713 if test "$use_libtool" = "yes"; then
1714 AC_MSG_WARN([Internal symbol table does not work with libtool. Disabling symbol table.])
1716 # we generate the internal symbol table only for those systems
1717 # known to work to avoid unexpected build failure. Also, warn
1718 # about unsupported systems when the feature is enabled
1721 freebsd*|netbsd*|openbsd*|linux*|solaris*|darwin*)
1722 MKSYMTBL_PROGRAM="$PERL"
1723 if test $want_symtable = all; then
1724 ALWAYS_MAKE_SYMTABLE="yes"
1728 if test $want_symtable = yes -o $want_symtable = all
1730 AC_MSG_WARN([this system is not known to generate internal symbol table safely; disabling it])
1738 AC_SUBST(MKSYMTBL_PROGRAM)
1739 AC_SUBST(ALWAYS_MAKE_SYMTABLE)
1742 # File name extension for static archive files, for those few places
1743 # where they are treated differently from dynamic ones.
1750 AC_SUBST(LIBTOOL_MKDEP_SED)
1751 AC_SUBST(LIBTOOL_MODE_COMPILE)
1752 AC_SUBST(LIBTOOL_MODE_INSTALL)
1753 AC_SUBST(LIBTOOL_MODE_LINK)
1754 AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
1755 AC_SUBST(LIBTOOL_IN_MAIN)
1758 # build exportable DNS library?
1760 AC_ARG_ENABLE(exportlib,
1761 [ --enable-exportlib build exportable library (GNU make required)
1763 case "$enable_exportlib" in
1766 for x in gmake gnumake make; do
1767 if $x --version 2>/dev/null | grep GNU > /dev/null; then
1772 if test -z "$gmake"; then
1773 AC_MSG_ERROR([exportlib requires GNU make. Install it or disable the feature.])
1775 LIBEXPORT=lib/export
1777 BIND9_CO_RULE="%.$O: \${srcdir}/%.c"
1780 BIND9_CO_RULE=".c.$O:"
1783 AC_SUBST(BIND9_CO_RULE)
1785 AC_ARG_WITH(export-libdir,
1786 [ --with-export-libdir[=PATH]
1787 installation directory for the export library
1788 [[EPREFIX/lib/bind9]]],
1789 export_libdir="$withval",)
1790 if test -z "$export_libdir"; then
1791 export_libdir="\${exec_prefix}/lib/bind9/"
1793 AC_SUBST(export_libdir)
1795 AC_ARG_WITH(export-includedir,
1796 [ --with-export-includedir[=PATH]
1797 installation directory for the header files of the
1798 export library [[PREFIX/include/bind9]]],
1799 export_includedir="$withval",)
1800 if test -z "$export_includedir"; then
1801 export_includedir="\${prefix}/include/bind9/"
1803 AC_SUBST(export_includedir)
1806 # Here begins a very long section to determine the system's networking
1807 # capabilities. The order of the tests is significant.
1814 [ --enable-ipv6 use IPv6 [default=autodetect]])
1816 case "$enable_ipv6" in
1818 AC_DEFINE(WANT_IPV6)
1825 # We do the IPv6 compilation checking after libtool so that we can put
1826 # the right suffix on the files.
1828 AC_MSG_CHECKING(for IPv6 structures)
1830 #include <sys/types.h>
1831 #include <sys/socket.h>
1832 #include <netinet/in.h>],
1833 [struct sockaddr_in6 sin6; return (0);],
1840 # See whether IPv6 support is provided via a Kame add-on.
1841 # This is done before other IPv6 linking tests to LIBS is properly set.
1843 AC_MSG_CHECKING(for Kame IPv6 support)
1845 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
1846 use_kame="$withval", use_kame="no")
1852 kame_path=/usr/local/v6
1855 kame_path="$use_kame"
1864 if test -f $kame_path/lib/libinet6.a; then
1865 AC_MSG_RESULT($kame_path/lib/libinet6.a)
1866 LIBS="-L$kame_path/lib -linet6 $LIBS"
1868 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
1870 Please choose the proper path with the following command:
1872 configure --with-kame=PATH
1879 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
1880 # Including it on Kame-using platforms is very bad, though, because
1881 # Kame uses #error against direct inclusion. So include it on only
1882 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
1883 # This is done before the in6_pktinfo check because that's what
1884 # netinet6/in6.h is needed for.
1889 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
1890 LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
1891 isc_netinet6in6_hack="#include <netinet6/in6.h>"
1894 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
1895 LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
1896 isc_netinet6in6_hack=""
1902 # This is similar to the netinet6/in6.h issue.
1905 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1907 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
1908 LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
1909 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
1910 isc_netinetin6_hack="#include <netinet/in6.h>"
1913 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
1914 LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
1915 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
1916 isc_netinetin6_hack=""
1921 # Now delve deeper into the suitability of the IPv6 support.
1923 case "$found_ipv6" in
1925 ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
1926 LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
1928 AC_MSG_CHECKING(for in6_addr)
1930 #include <sys/types.h>
1931 #include <sys/socket.h>
1932 #include <netinet/in.h>
1933 $isc_netinetin6_hack
1934 $isc_netinet6in6_hack
1936 [struct in6_addr in6; return (0);],
1938 ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
1939 LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
1940 isc_in_addr6_hack=""],
1942 ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
1943 LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
1944 isc_in_addr6_hack="#define in6_addr in_addr6"])
1946 AC_MSG_CHECKING(for in6addr_any)
1948 #include <sys/types.h>
1949 #include <sys/socket.h>
1950 #include <netinet/in.h>
1951 $isc_netinetin6_hack
1952 $isc_netinet6in6_hack
1955 [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
1957 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
1958 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
1960 ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
1961 LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
1963 AC_MSG_CHECKING(for in6addr_loopback)
1965 #include <sys/types.h>
1966 #include <sys/socket.h>
1967 #include <netinet/in.h>
1968 $isc_netinetin6_hack
1969 $isc_netinet6in6_hack
1972 [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
1974 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
1975 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
1977 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
1978 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
1980 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
1982 #include <sys/types.h>
1983 #include <sys/socket.h>
1984 #include <netinet/in.h>
1985 $isc_netinetin6_hack
1986 $isc_netinet6in6_hack
1988 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
1990 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
1991 result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
1993 ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
1994 result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
1995 LWRES_HAVE_SIN6_SCOPE_ID="$result"
1997 AC_MSG_CHECKING(for in6_pktinfo)
1999 #include <sys/types.h>
2000 #include <sys/socket.h>
2001 #include <netinet/in.h>
2002 $isc_netinetin6_hack
2003 $isc_netinet6in6_hack
2005 [struct in6_pktinfo xyzzy; return (0);],
2007 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
2008 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
2009 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
2012 ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
2013 LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
2014 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
2015 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
2016 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
2017 LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
2018 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
2020 ISC_IPV6_O="ipv6.$O"
2021 ISC_ISCIPV6_O="unix/ipv6.$O"
2026 AC_SUBST(ISC_PLATFORM_HAVEIPV6)
2027 AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
2028 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
2029 AC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
2030 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
2031 AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
2032 AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
2033 AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
2034 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
2035 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
2036 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
2037 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
2038 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
2039 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
2040 AC_SUBST(ISC_IPV6_H)
2041 AC_SUBST(ISC_IPV6_O)
2042 AC_SUBST(ISC_ISCIPV6_O)
2043 AC_SUBST(ISC_IPV6_C)
2044 AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
2045 AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
2047 AC_MSG_CHECKING([for struct if_laddrreq])
2049 #include <sys/types.h>
2050 #include <net/if6.h>
2051 ],[ struct if_laddrreq a; ],
2053 ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
2055 ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
2056 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
2058 AC_MSG_CHECKING([for struct if_laddrconf])
2060 #include <sys/types.h>
2061 #include <net/if6.h>
2062 ],[ struct if_laddrconf a; ],
2064 ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
2066 ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
2067 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
2070 # Check for network functions that are often missing. We do this
2071 # after the libtool checking, so we can put the right suffix on
2072 # the files. It also needs to come after checking for a Kame add-on,
2073 # which provides some (all?) of the desired functions.
2076 AC_MSG_CHECKING([for inet_ntop with IPv6 support])
2078 #include <sys/types.h>
2079 #include <sys/socket.h>
2080 #include <netinet/in.h>
2081 #include <arpa/inet.h>
2083 char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
2085 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
2088 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
2089 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
2090 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
2091 [AC_MSG_RESULT(assuming inet_ntop not needed)
2092 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"])
2095 # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
2096 # addresses with less than four octets, like "1.2.3". Also leading
2097 # zeros should also be rejected.
2099 AC_MSG_CHECKING([for working inet_pton with IPv6 support])
2101 #include <sys/types.h>
2102 #include <sys/socket.h>
2103 #include <netinet/in.h>
2104 #include <arpa/inet.h>
2105 main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
2106 inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
2107 (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
2109 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
2111 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
2112 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
2113 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
2114 [AC_MSG_RESULT(assuming inet_pton needed)
2115 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
2116 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
2117 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
2119 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
2120 AC_SUBST(ISC_PLATFORM_NEEDPTON)
2123 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
2127 # Turn on 4.4BSD style sa_len support.
2128 AC_DEFINE(_SOCKADDR_LEN)
2132 AC_MSG_CHECKING(for sa_len in struct sockaddr)
2134 #include <sys/types.h>
2135 #include <sys/socket.h>],
2136 [struct sockaddr sa; sa.sa_len = 0; return (0);],
2138 ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"
2139 LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"],
2141 ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"
2142 LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"])
2143 AC_SUBST(ISC_PLATFORM_HAVESALEN)
2144 AC_SUBST(LWRES_PLATFORM_HAVESALEN)
2147 # Look for a 4.4BSD or 4.3BSD struct msghdr
2149 AC_MSG_CHECKING(for struct msghdr flavor)
2151 #include <sys/types.h>
2152 #include <sys/socket.h>],
2153 [struct msghdr msg; msg.msg_flags = 0; return (0);],
2154 [AC_MSG_RESULT(4.4BSD)
2155 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
2156 [AC_MSG_RESULT(4.3BSD)
2157 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
2158 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
2161 # Look for in_port_t.
2163 AC_MSG_CHECKING(for type in_port_t)
2165 #include <sys/types.h>
2166 #include <netinet/in.h>],
2167 [in_port_t port = 25; return (0);],
2169 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
2171 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
2172 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
2175 # Check for addrinfo
2177 AC_MSG_CHECKING(for struct addrinfo)
2179 #include <netdb.h>],
2180 [struct addrinfo a; return (0);],
2182 ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"
2183 ISC_IRS_NEEDADDRINFO="#undef ISC_IRS_NEEDADDRINFO"
2184 AC_DEFINE(HAVE_ADDRINFO)],
2186 ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"
2187 ISC_IRS_NEEDADDRINFO="#define ISC_IRS_NEEDADDRINFO 1"])
2188 AC_SUBST(ISC_LWRES_NEEDADDRINFO)
2189 AC_SUBST(ISC_IRS_NEEDADDRINFO)
2192 # Check for rrsetinfo
2194 AC_MSG_CHECKING(for struct rrsetinfo)
2196 #include <netdb.h>],
2197 [struct rrsetinfo r; return (0);],
2199 ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
2201 ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
2202 AC_SUBST(ISC_LWRES_NEEDRRSETINFO)
2204 AC_MSG_CHECKING(for int sethostent)
2206 #include <netdb.h>],
2207 [int i = sethostent(0); return(0);],
2209 ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"],
2211 ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"])
2212 AC_SUBST(ISC_LWRES_SETHOSTENTINT)
2214 AC_MSG_CHECKING(for int endhostent)
2216 #include <netdb.h>],
2217 [int i = endhostent(); return(0);],
2219 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
2221 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
2222 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
2224 AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
2227 struct netent *getnetbyaddr(in_addr_t, int);],
2230 ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"],
2232 ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"])
2233 AC_SUBST(ISC_LWRES_GETNETBYADDRINADDR)
2235 AC_MSG_CHECKING(for int setnetent)
2237 #include <netdb.h>],
2238 [int i = setnetent(0); return(0);],
2240 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
2242 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
2243 AC_SUBST(ISC_LWRES_SETNETENTINT)
2245 AC_MSG_CHECKING(for int endnetent)
2247 #include <netdb.h>],
2248 [int i = endnetent(); return(0);],
2250 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
2252 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
2253 AC_SUBST(ISC_LWRES_ENDNETENTINT)
2255 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
2258 struct hostent *gethostbyaddr(const void *, size_t, int);],
2261 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
2263 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
2264 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
2266 AC_MSG_CHECKING(for h_errno in netdb.h)
2268 #include <netdb.h>],
2269 [h_errno = 1; return(0);],
2271 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
2273 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
2274 AC_SUBST(ISC_LWRES_NEEDHERRNO)
2277 # Sadly, the definitions of system-supplied getnameinfo(3) vary. Try to catch
2278 # known variations here:
2280 AC_MSG_CHECKING(for getnameinfo prototype definitions)
2282 #include <sys/types.h>
2283 #include <sys/socket.h>
2285 int getnameinfo(const struct sockaddr *, socklen_t, char *,
2286 socklen_t, char *, socklen_t, unsigned int);],
2288 [AC_MSG_RESULT(socklen_t for buflen; u_int for flags)
2289 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t,
2290 [Define to the buffer length type used by getnameinfo(3).])
2291 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int,
2292 [Define to the flags type used by getnameinfo(3).])],
2294 #include <sys/types.h>
2295 #include <sys/socket.h>
2297 int getnameinfo(const struct sockaddr *, socklen_t, char *,
2298 size_t, char *, size_t, int);],
2300 [AC_MSG_RESULT(size_t for buflen; int for flags)
2301 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
2302 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
2303 [AC_MSG_RESULT(not match any subspecies; assume standard definition)
2304 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
2305 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])
2308 # ...and same for gai_strerror().
2310 AC_MSG_CHECKING(for gai_strerror prototype definitions)
2312 #include <sys/types.h>
2313 #include <sys/socket.h>
2315 char *gai_strerror(int ecode);],
2317 [AC_MSG_RESULT(returning char *)
2318 AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [char *],
2319 [return type of gai_strerror])],
2320 [AC_MSG_RESULT(not match any subspecies; assume standard definition)
2321 AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [const char *])])
2323 AC_CHECK_FUNC(getipnodebyname,
2324 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
2325 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
2326 AC_CHECK_FUNC(getnameinfo,
2327 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
2328 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
2329 AC_CHECK_FUNC(getaddrinfo,
2330 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
2331 AC_DEFINE(HAVE_GETADDRINFO)],
2332 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
2333 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
2334 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
2335 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
2336 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
2337 AC_SUBST(ISC_IRS_GETNAMEINFOSOCKLEN)
2339 AC_ARG_ENABLE(getifaddrs,
2340 [ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no]].],
2341 want_getifaddrs="$enableval", want_getifaddrs="yes")
2344 # This interface iteration code for getifaddrs() will fall back to using
2345 # /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6
2348 case $want_getifaddrs in
2350 AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required")
2351 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
2354 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
2361 # Look for a sysctl call to get the list of network interfaces.
2363 case $ac_cv_header_sys_sysctl_h in
2365 AC_MSG_CHECKING(for interface list sysctl)
2366 AC_EGREP_CPP(found_rt_iflist, [
2367 #include <sys/param.h>
2368 #include <sys/sysctl.h>
2369 #include <sys/socket.h>
2370 #ifdef NET_RT_IFLIST
2375 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
2376 [AC_MSG_RESULT(no)])
2381 # Check for some other useful functions that are not ever-present.
2384 # We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC
2385 # because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77
2386 # reportedly defines strsep() without declaring it in <string.h> when
2387 # -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and
2388 # AC_CHECK_FUNC() incorrectly succeeds because it declares
2389 # the function itself.
2390 AC_MSG_CHECKING(for correctly declared strsep())
2391 AC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");],
2392 [AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
2393 [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
2394 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
2396 AC_CHECK_FUNC(memmove,
2397 [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
2398 [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
2399 AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
2401 AC_CHECK_FUNC(strtoul,
2402 [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
2403 LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
2405 [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
2406 LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
2407 GENRANDOMLIB='${ISCLIBS}'])
2408 AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
2409 AC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
2410 AC_SUBST(GENRANDOMLIB)
2412 AC_CHECK_FUNC(strlcpy,
2413 [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
2414 [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
2415 AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
2417 AC_CHECK_FUNC(strlcat,
2418 [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
2419 [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
2420 AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
2422 AC_CHECK_FUNC(strcasestr,
2423 [ISC_PLATFORM_NEEDSTRCASESTR="#undef ISC_PLATFORM_NEEDSTRCASESTR"],
2424 [ISC_PLATFORM_NEEDSTRCASESTR="#define ISC_PLATFORM_NEEDSTRCASESTR 1"])
2425 AC_SUBST(ISC_PLATFORM_NEEDSTRCASESTR)
2427 AC_SUBST(READLINE_LIB)
2428 AC_ARG_WITH(readline,
2429 [ --with-readline[=LIBSPEC] specify readline library [default -lreadline]],
2430 readline="$withval", readline="-lreadline")
2434 if test "x$readline" = "xyes"
2440 AC_CHECK_FUNCS(readline)
2441 if test "$ac_cv_func_readline" = "yes"
2443 READLINE_LIB="$readline"
2451 AC_MSG_CHECKING(sprintf)
2455 [ char buf[2]; return(*sprintf(buf,"x"));],
2457 ISC_PRINT_OBJS="print.$O"
2458 ISC_PRINT_SRCS="print.c"
2459 ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
2460 LWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF"
2462 [ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"
2463 LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"]
2465 AC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
2466 AC_SUBST(LWRES_PLATFORM_NEEDSPRINTF)
2468 AC_CHECK_FUNC(vsnprintf,
2469 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
2470 LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
2471 [ISC_PRINT_OBJS="print.$O"
2472 ISC_PRINT_SRCS="print.c"
2473 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
2474 LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"])
2475 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
2476 AC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF)
2477 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
2478 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
2480 AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
2482 AC_SUBST(ISC_EXTRA_OBJS)
2483 AC_SUBST(ISC_EXTRA_SRCS)
2486 # Use our own SPNEGO implementation?
2488 AC_ARG_ENABLE(isc-spnego,
2489 [ --disable-isc-spnego use SPNEGO from GSSAPI library])
2491 if test -n "$USE_GSSAPI"
2493 case "$enable_isc_spnego" in
2495 USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
2496 DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
2497 DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c"
2498 AC_MSG_RESULT(using SPNEGO from lib/dns)
2501 AC_MSG_RESULT(using SPNEGO from GSSAPI library)
2506 AC_SUBST(USE_ISC_SPNEGO)
2508 AC_SUBST(DST_EXTRA_OBJS)
2509 AC_SUBST(DST_EXTRA_SRCS)
2511 # Determine the printf format characters to use when printing
2512 # values of type isc_int64_t. This will normally be "ll", but where
2513 # the compiler treats "long long" as a alias for "long" and printf
2514 # doesn't know about "long long" use "l". Hopefully the sprintf
2515 # will produce a inconsistent result in the later case. If the compiler
2516 # fails due to seeing "%lld" we fall back to "l".
2518 # Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
2519 # %ld even for (long long)/
2521 # Win32 uses "%I64d", but that's defined elsewhere since we don't use
2522 # configure on Win32.
2524 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
2528 long long int j = 0;
2531 sprintf(buf, "%lld", j);
2532 exit((sizeof(long long int) != sizeof(long int))? 0 :
2533 (strcmp(buf, "0") != 0));
2537 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
2538 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
2540 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
2541 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
2542 [AC_MSG_RESULT(assuming target platform uses ll)
2543 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
2544 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
2545 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
2546 AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
2551 # Note it is very recommended to *not* disable chroot(),
2552 # this is only because chroot() was made obsolete by Posix.
2553 AC_ARG_ENABLE(chroot,
2554 [ --disable-chroot disable chroot])
2555 case "$enable_chroot" in
2557 AC_CHECK_FUNCS(chroot)
2562 AC_ARG_ENABLE(linux-caps,
2563 [ --disable-linux-caps disable linux capabilities])
2564 case "$enable_linux_caps" in
2566 AC_CHECK_HEADERS(linux/types.h)
2567 AC_CHECK_HEADERS([sys/capability.h])
2568 AC_CHECK_HEADERS([linux/capability.h], [], [],
2569 [#ifdef HAVE_LINUX_TYPES_H
2570 #include <linux/types.h>
2573 AC_CHECK_LIB(cap, cap_set_proc)
2578 AC_CHECK_HEADERS(sys/prctl.h)
2580 AC_CHECK_HEADERS(sys/un.h,
2581 ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
2583 ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
2585 AC_SUBST(ISC_PLATFORM_HAVESYSUNH)
2589 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2590 [Define if connect does not honour the permission on the UNIX domain socket.])
2593 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2594 [Define if connect does not honour the permission on the UNIX domain socket.])
2601 AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
2603 AC_MSG_CHECKING(for optarg declaration)
2608 [AC_MSG_RESULT(yes)],
2610 GEN_NEED_OPTARG="-DNEED_OPTARG=1"
2611 AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
2614 # BSD/OS, and perhaps some others, don't define rlim_t.
2616 AC_MSG_CHECKING(for type rlim_t)
2618 #include <sys/types.h>
2619 #include <sys/time.h>
2620 #include <sys/resource.h>],
2621 [rlim_t rl = 19671212; return (0);],
2623 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
2626 AC_MSG_CHECKING(type of rlim_cur)
2628 #include <sys/types.h>
2629 #include <sys/time.h>
2630 #include <sys/resource.h>
2631 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
2633 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
2636 #include <sys/types.h>
2637 #include <sys/time.h>
2638 #include <sys/resource.h>
2639 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
2640 [AC_MSG_RESULT(long int)
2641 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
2644 #include <sys/types.h>
2645 #include <sys/time.h>
2646 #include <sys/resource.h>
2647 main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
2648 [AC_MSG_RESULT(long long int)
2649 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
2650 [AC_MSG_ERROR([unable to determine sizeof rlim_cur])
2651 ],[AC_MSG_ERROR(this cannot happen)])
2652 ],[AC_MSG_ERROR(this cannot happen)])
2654 AC_ARG_WITH(rlimtype, , rlimtype="$withval", rlimtype="long long int")
2655 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE $rlimtype"
2656 AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming $rlimtype)])
2658 AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
2661 # Older HP-UX doesn't have gettune
2665 AC_CHECK_HEADERS(sys/dyntune.h)
2673 # Compaq TruCluster requires more code for handling cluster IP aliases
2677 AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
2678 AC_CHECK_FUNC(clua_getaliasaddress,
2679 AC_DEFINE(HAVE_TRUCLUSTER, 1,
2680 [Define if running under Compaq TruCluster]))
2687 # Some hosts need msg_namelen to match the size of the socket structure.
2688 # Some hosts don't set msg_namelen appropriately on return from recvmsg().
2692 AC_DEFINE(BROKEN_RECVMSG, 1,
2693 [Define if recvmsg() does not meet all of the BSD socket API specifications.])
2698 # Microsoft has their own way of handling shared libraries that requires
2699 # additional qualifiers on extern variables. Unix systems don't need it.
2701 AC_SUBST(ISC_PLATFORM_USEDECLSPEC)
2702 ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
2703 AC_SUBST(LWRES_PLATFORM_USEDECLSPEC)
2704 LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC"
2705 AC_SUBST(IRS_PLATFORM_USEDECLSPEC)
2706 IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC"
2709 # Random remaining OS-specific issues involving compiler warnings.
2710 # XXXDCL print messages to indicate some compensation is being done?
2712 AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
2713 ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
2717 hack_shutup_pthreadonceinit=yes
2720 hack_shutup_sputaux=yes
2723 hack_shutup_sigwait=yes
2724 hack_shutup_sputaux=yes
2727 hack_shutup_stdargcast=yes
2730 hack_shutup_pthreadonceinit=yes
2732 *-solaris2.1[[0-9]])
2733 AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
2737 case "$hack_shutup_pthreadonceinit" in
2740 # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
2742 ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
2746 case "$hack_shutup_sigwait" in
2749 # Shut up a -Wmissing-prototypes warning for sigwait().
2751 AC_DEFINE(SHUTUP_SIGWAIT)
2755 case "$hack_shutup_sputaux" in
2758 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
2760 AC_DEFINE(SHUTUP_SPUTAUX)
2764 case "$hack_shutup_stdargcast" in
2767 # Shut up a -Wcast-qual warning from va_start().
2769 AC_DEFINE(SHUTUP_STDARG_CAST)
2773 AC_CHECK_HEADERS(strings.h,
2774 ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
2776 ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH"
2778 AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
2781 # Check for if_nametoindex() for IPv6 scoped addresses support
2783 AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
2784 ac_cv_have_if_nametoindex=no)
2785 case $ac_cv_have_if_nametoindex in
2789 AC_CHECK_LIB(ipv6, if_nametoindex,
2790 ac_cv_have_if_nametoindex=yes
2791 LIBS="-lipv6 $LIBS",)
2795 case $ac_cv_have_if_nametoindex in
2797 ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
2800 ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
2803 AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
2805 AC_CHECK_FUNCS(nanosleep usleep)
2808 # Machine architecture dependent features
2810 AC_ARG_ENABLE(atomic,
2811 [ --enable-atomic enable machine specific atomic operations
2812 [[default=autodetect]]],
2813 enable_atomic="$enableval",
2814 enable_atomic="autodetect")
2815 case "$enable_atomic" in
2819 if test "X$GCC" = "Xyes"; then
2820 AC_MSG_CHECKING([if asm("isc"); works])
2822 main() { asm("ics"); exit(0); }
2827 saved_cflags="$CFLAGS"
2828 CFLAGS="$CFLAGS -Wa,-many"
2830 main() { asm("ics"); exit(0); }
2832 [AC_MSG_RESULT([yes, required -Wa,-many])
2834 [AC_MSG_RESULT([no, use_atomic disabled])
2835 CFLAGS="$saved_cflags"
2837 [AC_MSG_RESULT([cross compile, assume yes])
2838 CFLAGS="$saved_cflags"
2857 ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
2858 if test "$use_atomic" = "yes"; then
2859 AC_MSG_CHECKING([architecture type for atomic operations])
2860 have_atomic=yes # set default
2863 # XXX: some old x86 architectures actually do not support
2864 # (some of) these operations. Do we need stricter checks?
2865 AC_CHECK_SIZEOF([void *])
2866 if test $ac_cv_sizeof_void_p = 8; then
2874 AC_CHECK_SIZEOF([void *])
2875 if test $ac_cv_sizeof_void_p = 8; then
2885 powerpc-*|powerpc64-*)
2888 mips-*|mipsel-*|mips64-*|mips64el-*)
2899 AC_MSG_RESULT($arch)
2902 if test "$have_atomic" = "yes"; then
2903 AC_MSG_CHECKING([compiler support for inline assembly code])
2906 # Check whether the compiler supports the assembly syntax we provide.
2907 if test "X$GCC" = "Xyes"; then
2908 # GCC's ASM extension always works
2910 if test $arch = "x86_64"; then
2911 # We can share the same code for gcc with x86_32
2914 if test $arch = "powerpc"; then
2916 # The MacOS (and maybe others) uses "r0" for register
2917 # zero. Under linux/ibm it is "0" for register 0.
2918 # Probe to see if we have a MacOS style assembler.
2920 AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
2922 __asm__ volatile ("li r0, 0x0\n"::);
2926 ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
2927 ], [AC_MSG_RESULT(no)])
2932 # Tru64 compiler has its own syntax for inline
2936 #error "unexpected compiler"
2948 ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
2951 ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
2958 # See if the generic __asm function works. If not,
2959 # we need to disable the atomic operations.
2963 [compiler="standard"
2964 ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
2965 [compiler="not supported (atomic operations disabled)"
2971 AC_MSG_RESULT($compiler)
2974 if test "$have_atomic" = "yes"; then
2975 ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
2976 ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
2977 ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
2979 ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
2980 ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
2981 ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
2984 if test "$have_xaddq" = "yes"; then
2985 ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1"
2987 ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
2990 AC_SUBST(ISC_PLATFORM_HAVEXADD)
2991 AC_SUBST(ISC_PLATFORM_HAVEXADDQ)
2992 AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
2993 AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
2995 AC_SUBST(ISC_PLATFORM_USEGCCASM)
2996 AC_SUBST(ISC_PLATFORM_USEOSFASM)
2997 AC_SUBST(ISC_PLATFORM_USESTDASM)
2998 AC_SUBST(ISC_PLATFORM_USEMACASM)
3001 AC_SUBST(ISC_ARCH_DIR)
3004 # Activate "rrset-order fixed" or not?
3006 AC_ARG_ENABLE(fixed-rrset,
3007 [ --enable-fixed-rrset enable fixed rrset ordering
3009 enable_fixed="$enableval",
3011 case "$enable_fixed" in
3013 AC_DEFINE(DNS_RDATASET_FIXED, 1,
3014 [Define to enable "rrset-order fixed" syntax.])
3023 # Enable response policy rewriting using NS IP addresses
3025 AC_ARG_ENABLE(rpz-nsip,
3026 [ --disable-rpz-nsip disable rpz-nsip rules [[default=enabled]]],
3027 enable_nsip="$enableval",
3029 case "$enable_nsip" in
3031 AC_DEFINE(ENABLE_RPZ_NSIP, 1,
3032 [Define to enable rpz-nsip rules.])
3041 # Enable response policy rewriting using NS name
3043 AC_ARG_ENABLE(rpz-nsdname,
3044 [ --disable-rpz-nsdname disable rpz-nsdname rules [[default=enabled]]],
3045 enable_nsdname="$enableval",
3046 enable_nsdname="yes")
3047 case "$enable_nsdname" in
3049 AC_DEFINE(ENABLE_RPZ_NSDNAME, 1,
3050 [Define to enable rpz-nsdname rules.])
3059 # Activate "filter-aaaa-on-v4" or not?
3061 AC_ARG_ENABLE(filter-aaaa,
3062 [ --enable-filter-aaaa enable filtering of AAAA records over IPv4
3064 enable_filter="$enableval",
3066 case "$enable_filter" in
3068 AC_DEFINE(ALLOW_FILTER_AAAA_ON_V4, 1,
3069 [Define to enable the "filter-aaaa-on-v4" option.])
3078 # The following sets up how non-blocking i/o is established.
3079 # Sunos, cygwin and solaris 2.x (x<5) require special handling.
3082 *-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
3083 *-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
3084 *-solaris2.[[01234]])
3085 AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
3086 AC_DEFINE(USE_FIONBIO_IOCTL, 1,
3087 [Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
3089 *) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
3090 [Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
3094 # Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
3095 # This prevents the source address being set.
3098 *-solaris2.[[012345]]|*-solaris2.5.1)
3099 AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
3100 [Define if you cannot bind() before connect() for TCP sockets.])
3104 # The following sections deal with tools used for formatting
3105 # the documentation. They are all optional, unless you are
3106 # a developer editing the documentation source.
3113 AC_PATH_PROGS(LATEX, latex, latex)
3116 AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
3123 AC_PATH_PROGS(W3M, w3m, w3m)
3127 # Look for xsltproc (libxslt)
3130 AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
3134 # Look for xmllint (libxml2)
3137 AC_PATH_PROG(XMLLINT, xmllint, xmllint)
3144 AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
3148 # Subroutine for searching for an ordinary file (e.g., a stylesheet)
3149 # in a number of directories:
3151 # NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
3153 # If the file FILENAME is found in one of the DIRECTORIES, the shell
3154 # variable VARIABLE is defined to its absolute pathname. Otherwise,
3155 # it is set to FILENAME, with no directory prefix (that's not terribly
3156 # useful, but looks less confusing in substitutions than leaving it
3157 # empty). The variable VARIABLE will be substituted into output files.
3160 AC_DEFUN(NOM_PATH_FILE, [
3162 AC_MSG_CHECKING(for $2)
3173 if test "X[$]$1" = "X"
3175 AC_MSG_RESULT("not found");
3182 # Look for Docbook-XSL stylesheets. Location probably varies by system.
3183 # If it's not explicitly specified, guess where it might be found, based on
3184 # where SGML stuff lives on some systems (FreeBSD is the only one we're sure
3185 # of at the moment).
3187 AC_MSG_CHECKING(for Docbook-XSL path)
3188 AC_ARG_WITH(docbook-xsl,
3189 [ --with-docbook-xsl=PATH Specify path for Docbook-XSL stylesheets],
3190 docbook_path="$withval", docbook_path="auto")
3191 case "$docbook_path" in
3194 docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook /usr/share/xsl/docbook /opt/local/share/xsl/docbook-xsl"
3197 docbook_xsl_trees="$withval"
3198 AC_MSG_RESULT($docbook_xsl_trees)
3203 # Look for stylesheets we need.
3206 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees)
3207 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees)
3208 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees)
3209 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, html/chunk.xsl, $docbook_xsl_trees)
3210 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, xhtml/chunk.xsl, $docbook_xsl_trees)
3211 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees)
3212 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees)
3213 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees)
3214 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees)
3217 # Same dance for db2latex
3219 # No idea where this lives except on FreeBSD.
3222 db2latex_xsl_trees="/usr/local/share"
3225 # Look for stylesheets we need.
3228 NOM_PATH_FILE(XSLT_DB2LATEX_STYLE, db2latex/xsl/docbook.xsl, $db2latex_xsl_trees)
3231 # Look for "admonition" image directory. Can't use NOM_PATH_FILE()
3232 # because it's a directory, so just do the same things, inline.
3235 AC_MSG_CHECKING(for db2latex/xsl/figures)
3236 for d in $db2latex_xsl_trees
3238 dd=$d/db2latex/xsl/figures
3241 XSLT_DB2LATEX_ADMONITIONS=$dd
3246 if test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
3248 AC_MSG_RESULT(not found)
3249 XSLT_DB2LATEX_ADMONITIONS=db2latex/xsl/figures
3251 AC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
3257 [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]],
3258 use_idn="$withval", use_idn="no")
3261 if test X$prefix = XNONE ; then
3276 AC_ARG_WITH(libiconv,
3277 [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]],
3278 use_libiconv="$withval", use_libiconv="no")
3279 case "$use_libiconv" in
3281 if test X$prefix = XNONE ; then
3282 iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
3284 iconvlib="-L$prefix/lib -R$prefix/lib -liconv"
3291 iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
3296 [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]],
3297 iconvlib="$withval")
3308 [ --with-idnlib=ARG specify libidnkit],
3309 idnlib="$withval", idnlib="no")
3310 if test "$idnlib" = yes; then
3311 AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
3315 if test "$use_idn" != no; then
3316 AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.])
3317 STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include"
3318 if test "$idnlib" != no; then
3319 IDNLIBS="$idnlib $iconvlib"
3321 IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib"
3327 # Check whether to build Automated Test Framework unit tests
3330 [ --with-atf=ARG Automated Test Framework support],
3331 atf="$withval", atf="no")
3332 if test "$atf" = yes; then
3336 AC_CONFIG_COMMANDS([atf-config],
3338 mkdir -p unit/atf-src;
3342 *) srcdir="../../$srcdir";;
3344 ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" --enable-tools --disable-shared MISSING=: --prefix $atfdir;
3346 [atfdir=`pwd`/unit/atf])
3347 AC_MSG_RESULT(building ATF from bind9/unit/atf-src)
3351 if test "$atf" != no; then
3352 AC_DEFINE(ATF_TEST, 1, [define if ATF unit tests are to be built.])
3353 STD_CINCLUDES="$STD_CINCLUDES -I$atf/include"
3355 ATFLIBS="-L$atf/lib -latf-c"
3356 if test "$want_openssl_hash" = yes; then
3357 ATFLIBS="-L$atf/lib -latf-c $DNS_CRYPTO_LIBS"
3365 AC_CHECK_HEADERS(locale.h)
3366 AC_CHECK_FUNCS(setlocale)
3371 AC_SUBST(BIND9_TOP_BUILDDIR)
3372 BIND9_TOP_BUILDDIR=`pwd`
3374 AC_SUBST(BIND9_ISC_BUILDINCLUDE)
3375 AC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
3376 AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
3377 AC_SUBST(BIND9_DNS_BUILDINCLUDE)
3378 AC_SUBST(BIND9_LWRES_BUILDINCLUDE)
3379 AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
3380 if test "X$srcdir" != "X"; then
3381 BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
3382 BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
3383 BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
3384 BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
3385 BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
3386 BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
3388 BIND9_ISC_BUILDINCLUDE=""
3389 BIND9_ISCCC_BUILDINCLUDE=""
3390 BIND9_ISCCFG_BUILDINCLUDE=""
3391 BIND9_DNS_BUILDINCLUDE=""
3392 BIND9_LWRES_BUILDINCLUDE=""
3393 BIND9_BIND9_BUILDINCLUDE=""
3396 AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
3397 BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
3399 AC_SUBST_FILE(BIND9_MAKE_RULES)
3400 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
3403 BIND9_PRODUCT="PRODUCT=\"${PRODUCT}\""
3404 AC_SUBST(BIND9_PRODUCT)
3405 BIND9_DESCRIPTION="DESCRIPTION=\"${DESCRIPTION}\""
3406 AC_SUBST(BIND9_DESCRIPTION)
3407 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}"
3408 AC_SUBST(BIND9_VERSION)
3410 BIND9_SRCID="SRCID=unset"
3411 if test -f "${srcdir}/srcid"; then
3413 BIND9_SRCID="SRCID=$SRCID"
3414 elif test -d "${srcdir}/.git"; then
3415 BIND9_SRCID="SRCID="`(cd "${srcdir}";git log -n 1 --format=%h)`
3418 AC_SUBST(BIND9_SRCID)
3420 if test -z "$ac_configure_args"; then
3421 BIND9_CONFIGARGS="defaults"
3423 for a in $ac_configure_args
3425 BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
3428 BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
3429 BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
3430 AC_SUBST(BIND9_CONFIGARGS)
3432 AC_SUBST_FILE(LIBISC_API)
3433 LIBISC_API="$srcdir/lib/isc/api"
3435 AC_SUBST_FILE(LIBISCCC_API)
3436 LIBISCCC_API="$srcdir/lib/isccc/api"
3438 AC_SUBST_FILE(LIBISCCFG_API)
3439 LIBISCCFG_API="$srcdir/lib/isccfg/api"
3441 AC_SUBST_FILE(LIBDNS_API)
3442 LIBDNS_API="$srcdir/lib/dns/api"
3444 AC_SUBST_FILE(LIBBIND9_API)
3445 LIBBIND9_API="$srcdir/lib/bind9/api"
3447 AC_SUBST_FILE(LIBLWRES_API)
3448 LIBLWRES_API="$srcdir/lib/lwres/api"
3450 AC_SUBST_FILE(LIBIRS_API)
3451 LIBIRS_API="$srcdir/lib/irs/api"
3454 # Configure any DLZ drivers.
3456 # If config.dlz.in selects one or more DLZ drivers, it will set
3457 # CONTRIB_DLZ to a non-empty value, which will be our clue to
3458 # build DLZ drivers in contrib.
3460 # This section has to come after the libtool stuff because it needs to
3461 # know how to name the driver object files.
3465 DLZ_DRIVER_INCLUDES=""
3472 # Configure support for building a shared library object
3474 # Even when libtool is available it can't always be relied upon
3475 # to build an object that can be dlopen()'ed, but this is necessary
3476 # for building the dlzexternal system test, so we'll try it the
3477 # old-fashioned way.
3485 [ --with-dlopen=ARG Support dynamically loadable DLZ drivers],
3486 dlopen="$withval", dlopen="yes")
3489 *-sunos*) dlopen="no"
3493 if test "$dlopen" = "yes"; then
3494 AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
3495 if test "$have_dl" = "yes"; then
3498 AC_CHECK_FUNCS(dlopen dlclose dlsym,,dlopen=no)
3501 if test "$dlopen" = "yes"; then
3505 if test "$have_dl" = "yes"
3507 if test "$use_libtool" = "yes"; then
3508 SO_LD="${CC} -Xcompiler -shared"
3510 SO_LD="${CC} -shared"
3516 *-freebsd*|*-openbsd*|*-netbsd*)
3518 SO_LD="ld -Bshareable -x"
3522 SO_LD="ld -G -z text"
3534 if test "X$GCC" = "Xyes"; then
3536 test -n "$SO_LD" || SO_LD="${CC} -shared"
3539 # If we still don't know how to make shared objects, don't make any.
3540 if test -n "$SO_LD"; then
3541 SO_TARGETS="\${SO_TARGETS}"
3542 AC_DEFINE(ISC_DLZ_DLOPEN, 1,
3543 [Define to allow building of objects for dlopen().])
3550 AC_SUBST(SO_TARGETS)
3552 sinclude(contrib/dlz/config.dlz.in)
3553 AC_MSG_CHECKING(contributed DLZ drivers)
3555 if test -n "$CONTRIB_DLZ"
3558 DLZ_DRIVER_RULES=contrib/dlz/drivers/rules
3559 AC_CONFIG_FILES([$DLZ_DRIVER_RULES])
3562 DLZ_DRIVER_RULES=/dev/null
3565 AC_SUBST(CONTRIB_DLZ)
3566 AC_SUBST(DLZ_DRIVER_INCLUDES)
3567 AC_SUBST(DLZ_DRIVER_LIBS)
3568 AC_SUBST(DLZ_DRIVER_SRCS)
3569 AC_SUBST(DLZ_DRIVER_OBJS)
3570 AC_SUBST(DLZ_SYSTEM_TEST)
3571 AC_SUBST_FILE(DLZ_DRIVER_RULES)
3573 if test "$cross_compiling" = "yes"; then
3574 if test -z "$BUILD_CC"; then
3575 AC_ERROR([BUILD_CC not set])
3577 BUILD_CFLAGS="$BUILD_CFLAGS"
3578 BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
3579 BUILD_LDFLAGS="$BUILD_LDFLAGS"
3580 BUILD_LIBS="$BUILD_LIBS"
3583 BUILD_CFLAGS="$CFLAGS"
3584 BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
3585 BUILD_LDFLAGS="$LDFLAGS"
3590 for e in $BUILD_LDFLAGS ; do
3595 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3596 NEWFLAGS="$NEWFLAGS $e $ee"
3599 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3600 NEWFLAGS="$NEWFLAGS $e $ee"
3603 ee=`echo $e | sed -e 's%^-L%-R%'`
3604 NEWFLAGS="$NEWFLAGS $e $ee"
3607 NEWFLAGS="$NEWFLAGS $e"
3612 NEWFLAGS="$NEWFLAGS $e"
3616 BUILD_LDFLAGS="$NEWFLAGS"
3619 for e in $DNS_GSSAPI_LIBS ; do
3624 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3625 NEWFLAGS="$NEWFLAGS $e $ee"
3628 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3629 NEWFLAGS="$NEWFLAGS $e $ee"
3632 ee=`echo $e | sed -e 's%^-L%-R%'`
3633 NEWFLAGS="$NEWFLAGS $e $ee"
3636 NEWFLAGS="$NEWFLAGS $e"
3641 NEWFLAGS="$NEWFLAGS $e"
3645 DNS_GSSAPI_LIBS="$NEWFLAGS"
3648 for e in $DNS_CRYPTO_LIBS ; do
3653 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3654 NEWFLAGS="$NEWFLAGS $e $ee"
3657 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3658 NEWFLAGS="$NEWFLAGS $e $ee"
3661 ee=`echo $e | sed -e 's%^-L%-R%'`
3662 NEWFLAGS="$NEWFLAGS $e $ee"
3665 NEWFLAGS="$NEWFLAGS $e"
3670 NEWFLAGS="$NEWFLAGS $e"
3674 DNS_CRYPTO_LIBS="$NEWFLAGS"
3677 AC_SUBST(BUILD_CFLAGS)
3678 AC_SUBST(BUILD_CPPFLAGS)
3679 AC_SUBST(BUILD_LDFLAGS)
3680 AC_SUBST(BUILD_LIBS)
3683 # Commands to run at the end of config.status.
3684 # Don't just put these into configure, it won't work right if somebody
3685 # runs config.status directly (which autoconf allows).
3690 [chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter])
3693 # Files to configure. These are listed here because we used to
3694 # specify them as arguments to AC_OUTPUT. It's (now) ok to move these
3695 # elsewhere if there's a good reason for doing so.
3704 bin/confgen/Makefile
3705 bin/confgen/unix/Makefile
3709 bin/named/unix/Makefile
3710 bin/nsupdate/Makefile
3713 bin/python/dnssec-checkds.py
3714 bin/python/dnssec-coverage.py
3717 bin/tests/atomic/Makefile
3718 bin/tests/db/Makefile
3719 bin/tests/dst/Makefile
3720 bin/tests/dst/Kdh.+002+18602.key
3721 bin/tests/dst/Kdh.+002+18602.private
3722 bin/tests/dst/Kdh.+002+48957.key
3723 bin/tests/dst/Kdh.+002+48957.private
3724 bin/tests/dst/Ktest.+001+00002.key
3725 bin/tests/dst/Ktest.+001+54622.key
3726 bin/tests/dst/Ktest.+001+54622.private
3727 bin/tests/dst/Ktest.+003+23616.key
3728 bin/tests/dst/Ktest.+003+23616.private
3729 bin/tests/dst/Ktest.+003+49667.key
3730 bin/tests/dst/dst_2_data
3731 bin/tests/dst/t2_data_1
3732 bin/tests/dst/t2_data_2
3733 bin/tests/dst/t2_dsasig
3734 bin/tests/dst/t2_rsasig
3735 bin/tests/hashes/Makefile
3736 bin/tests/headerdep_test.sh
3737 bin/tests/master/Makefile
3738 bin/tests/mem/Makefile
3739 bin/tests/names/Makefile
3740 bin/tests/net/Makefile
3741 bin/tests/rbt/Makefile
3742 bin/tests/resolver/Makefile
3743 bin/tests/sockaddr/Makefile
3744 bin/tests/system/Makefile
3745 bin/tests/system/conf.sh
3746 bin/tests/system/dlz/prereq.sh
3747 bin/tests/system/dlzexternal/Makefile
3748 bin/tests/system/dlzexternal/ns1/named.conf
3749 bin/tests/system/ecdsa/prereq.sh
3750 bin/tests/system/filter-aaaa/Makefile
3751 bin/tests/system/gost/prereq.sh
3752 bin/tests/system/inline/checkdsa.sh
3753 bin/tests/system/lwresd/Makefile
3754 bin/tests/system/rpz/Makefile
3755 bin/tests/system/rrl/Makefile
3756 bin/tests/system/rsabigexponent/Makefile
3757 bin/tests/system/tkey/Makefile
3758 bin/tests/system/tsiggss/Makefile
3759 bin/tests/tasks/Makefile
3760 bin/tests/timers/Makefile
3761 bin/tests/virtual-time/Makefile
3762 bin/tests/virtual-time/conf.sh
3764 contrib/check-secure-delegation.pl
3765 contrib/zone-edit.sh
3768 doc/doxygen/Doxyfile
3769 doc/doxygen/Makefile
3770 doc/doxygen/doxygen-input-filter
3773 doc/xsl/isc-docbook-chunk.xsl
3774 doc/xsl/isc-docbook-html.xsl
3775 doc/xsl/isc-docbook-latex.xsl
3776 doc/xsl/isc-manpage.xsl
3780 lib/bind9/include/Makefile
3781 lib/bind9/include/bind9/Makefile
3783 lib/dns/include/Makefile
3784 lib/dns/include/dns/Makefile
3785 lib/dns/include/dst/Makefile
3786 lib/dns/tests/Makefile
3788 lib/export/dns/Makefile
3789 lib/export/dns/include/Makefile
3790 lib/export/dns/include/dns/Makefile
3791 lib/export/dns/include/dst/Makefile
3792 lib/export/irs/Makefile
3793 lib/export/irs/include/Makefile
3794 lib/export/irs/include/irs/Makefile
3795 lib/export/isc/$thread_dir/Makefile
3796 lib/export/isc/$thread_dir/include/Makefile
3797 lib/export/isc/$thread_dir/include/isc/Makefile
3798 lib/export/isc/Makefile
3799 lib/export/isc/include/Makefile
3800 lib/export/isc/include/isc/Makefile
3801 lib/export/isc/nls/Makefile
3802 lib/export/isc/unix/Makefile
3803 lib/export/isc/unix/include/Makefile
3804 lib/export/isc/unix/include/isc/Makefile
3805 lib/export/isccfg/Makefile
3806 lib/export/isccfg/include/Makefile
3807 lib/export/isccfg/include/isccfg/Makefile
3808 lib/export/samples/Makefile
3809 lib/export/samples/Makefile-postinstall
3811 lib/irs/include/Makefile
3812 lib/irs/include/irs/Makefile
3813 lib/irs/include/irs/netdb.h
3814 lib/irs/include/irs/platform.h
3815 lib/isc/$arch/Makefile
3816 lib/isc/$arch/include/Makefile
3817 lib/isc/$arch/include/isc/Makefile
3818 lib/isc/$thread_dir/Makefile
3819 lib/isc/$thread_dir/include/Makefile
3820 lib/isc/$thread_dir/include/isc/Makefile
3822 lib/isc/include/Makefile
3823 lib/isc/include/isc/Makefile
3824 lib/isc/include/isc/platform.h
3825 lib/isc/tests/Makefile
3826 lib/isc/nls/Makefile
3827 lib/isc/unix/Makefile
3828 lib/isc/unix/include/Makefile
3829 lib/isc/unix/include/isc/Makefile
3831 lib/isccc/include/Makefile
3832 lib/isccc/include/isccc/Makefile
3834 lib/isccfg/include/Makefile
3835 lib/isccfg/include/isccfg/Makefile
3837 lib/lwres/include/Makefile
3838 lib/lwres/include/lwres/Makefile
3839 lib/lwres/include/lwres/netdb.h
3840 lib/lwres/include/lwres/platform.h
3841 lib/lwres/man/Makefile
3842 lib/lwres/unix/Makefile
3843 lib/lwres/unix/include/Makefile
3844 lib/lwres/unix/include/lwres/Makefile
3846 lib/tests/include/Makefile
3847 lib/tests/include/tests/Makefile
3859 # Now that the Makefiles exist we can ensure that everything is rebuilt.
3861 AC_ARG_WITH(make-clean,
3862 [ --with-make-clean Run "make clean" at end of configure [[yes|no]].],
3863 make_clean="$withval", make_clean="yes")
3864 case "$make_clean" in
3870 AC_ARG_ENABLE(full-report,
3871 [ --enable-full-report report values of all configure options])
3873 echo "========================================================================"
3874 echo "Configuration summary:"
3875 echo "------------------------------------------------------------------------"
3876 echo "Optional features enabled:"
3877 $use_threads && echo " Multiprocessing support (--enable-threads)"
3879 test "$enable_rrl" = "yes" && \
3880 echo " Response Rate Limiting (--enable-rrl)"
3881 test "$use_gssapi" = "no" || echo " GSS-API (--with-gssapi)"
3882 test "$use_pkcs11" = "no" || echo " PKCS#11/Cryptoki support (--with-pkcs11)"
3883 test "$enable_newstats" = "yes" && \
3884 echo " New statistics (--enable-newstats)"
3885 test "$enable_fixed" = "yes" && \
3886 echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)"
3887 test "$enable_filter" = "yes" && \
3888 echo " AAAA filtering (--enable-filter-aaaa)"
3889 test "$want_backtrace" = "yes" && \
3890 echo " Print backtrace on crash (--enable-backtrace)"
3891 test "$want_symtable" = "minimal" && \
3892 echo " Use symbol table for backtrace, named only (--enable-symtable)"
3893 test "$want_symtable" = "yes" -o "$want_symtable" = "all" && \
3894 echo " Use symbol table for backtrace, all binaries (--enable-symtable=all)"
3895 test "$atf" = "no" || echo " Automated Testing Framework (--with-atf)"
3897 # these lines are only printed if run with --enable-full-report
3898 if test "$enable_full_report" = "yes"; then
3899 test "$enable_ipv6" = "no" -o "$found_ipv6" = "no" || \
3900 echo " IPv6 support (--enable-ipv6)"
3901 test "X$USE_OPENSSL" = "X" || \
3902 echo " OpenSSL cryptography/DNSSEC (--with-openssl)"
3903 test "$OPENSSL_GOST" != "yes" || \
3904 echo " GOST algorithm support (--with-gost)"
3905 test "$OPENSSL_ECDSA" != "yes" || \
3906 echo " ECDSA algorithm support (--with-ecdsa)"
3907 test "X$PYTHON" = "X" || echo " Python tools (--with-python)"
3908 test "X$libxml2_libs" = "X" || echo " XML statistics (--with-libxml2)"
3911 echo " Dynamically loadable zone (DLZ) drivers:"
3912 test "$use_dlz_bdb" = "no" || \
3913 echo " Berkeley DB (--with-dlz-bdb)"
3914 test "$use_dlz_ldap" = "no" || \
3915 echo " LDAP (--with-dlz-ldap)"
3916 test "$use_dlz_mysql" = "no" || \
3917 echo " MySQL (--with-dlz-mysql)"
3918 test "$use_dlz_odbc" = "no" || \
3919 echo " ODBC (--with-dlz-bdb)"
3920 test "$use_dlz_postgres" = "no" || \
3921 echo " Postgres (--with-dlz-postgres)"
3922 test "$use_dlz_filesystem" = "no" || \
3923 echo " Filesystem (--with-dlz-filesystem)"
3924 test "$use_dlz_stub" = "no" || \
3925 echo " Stub (--with-dlz-stub)"
3926 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"
3929 echo "Features disabled or unavailable on this platform:"
3930 $use_threads || echo " Multiprocessing support (--enable-threads)"
3931 test "$enable_ipv6" = "no" -o "$found_ipv6" = "no" && \
3932 echo " IPv6 support (--enable-ipv6)"
3933 test "$enable_rrl" = "yes" || \
3934 echo " Response Rate Limiting (--enable-rrl)"
3935 test "$use_gssapi" = "no" && echo " GSS-API (--with-gssapi)"
3936 test "$use_pkcs11" = "no" && echo " PKCS#11/Cryptoki support (--with-pkcs11)"
3937 test "X$enable_newstats" = "X" && echo " New statistics (--enable-newstats)"
3938 test "$enable_fixed" = "yes" || \
3939 echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)"
3940 test "$want_backtrace" = "yes" || \
3941 echo " Print backtrace on crash (--enable-backtrace)"
3942 test "$atf" = "no" && echo " Automated Testing Framework (--with-atf)"
3943 test "X$USE_OPENSSL" = "X" && \
3944 echo " OpenSSL cryptography/DNSSEC (--with-openssl)"
3945 test "X$USE_OPENSSL" != "X" -a "$OPENSSL_GOST" != "yes" && \
3946 echo " GOST algorithm support (--with-gost)"
3947 test "X$USE_OPENSSL" != "X" -a "$OPENSSL_ECDSA" != "yes" && \
3948 echo " ECDSA algorithm support (--with-ecdsa)"
3949 test "X$PYTHON" = "X" && echo " Python tools (--with-python)"
3950 test "X$libxml2_libs" = "X" && echo " XML statistics (--with-libxml2)"
3952 echo "========================================================================"
3954 if test "X$USE_OPENSSL" = "X"; then
3956 BIND is being built without OpenSSL. This means it will not have DNSSEC support.
3960 if test "X$OPENSSL_WARNING" != "X"; then
3962 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3963 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3965 WARNING Your OpenSSL crypto library may be vulnerable to WARNING
3966 WARNING one or more of the the following known security WARNING
3967 WARNING flaws: WARNING
3969 WARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
3970 WARNING CVE-2006-2940. WARNING
3972 WARNING It is recommended that you upgrade to OpenSSL WARNING
3973 WARNING version 0.9.8d/0.9.7l (or greater). WARNING
3975 WARNING You can disable this warning by specifying: WARNING
3977 WARNING --disable-openssl-version-check WARNING
3979 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3980 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3984 # Tell Emacs to edit this file in shell mode.