1 # Copyright (C) 2004-2010 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 "s/^/# /" COPYRIGHT])dnl
21 AC_REVISION($Revision: 1.457.26.28 $)
23 AC_INIT(lib/dns/name.c)
26 AC_CONFIG_HEADER(config.h)
37 # Just set the maximum command line length for sunos as it otherwise
38 # takes a exceptionally long time to work it out. Required for libtool.
39 lt_cv_sys_max_cmd_len=4096;
47 AC_SUBST(STD_CINCLUDES)
48 AC_SUBST(STD_CDEFINES)
49 AC_SUBST(STD_CWARNINGS)
52 # Warn if the user specified libbind, which is now deprecated
53 AC_ARG_ENABLE(libbind, [ --enable-libbind deprecated])
55 case "$enable_libbind" in
57 AC_MSG_ERROR(['libbind' is no longer part of the BIND 9 distribution.
58 It is available from http://www.isc.org as a separate download.])
66 # Make very sure that these are the first files processed by
67 # config.status, since we use the processed output as the input for
68 # AC_SUBST_FILE() substitutions in other files.
70 AC_CONFIG_FILES([make/rules make/includes])
77 # The POSIX ln(1) program. Non-POSIX systems may substitute
78 # "copy" or something.
85 ar program not found. Please fix your PATH to include the directory in
86 which ar resides, or set AR in the environment with the full path to ar.
95 AC_PATH_PROGS(ETAGS, etags emacs-etags)
98 # Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
99 # GNU emacs etags, and it requires the -L flag.
101 if test "X$ETAGS" != "X"; then
102 AC_MSG_CHECKING(for Exuberant Ctags etags)
103 if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
113 # Perl is optional; it is used only by some of the system test scripts.
115 AC_PATH_PROGS(PERL, perl5 perl)
119 # Special processing of paths depending on whether --prefix,
120 # --sysconfdir or --localstatedir arguments were given. What's
121 # desired is some compatibility with the way previous versions
122 # of BIND built; they defaulted to /usr/local for most parts of
123 # the installation, but named.boot/named.conf was in /etc
124 # and named.pid was in /var/run.
126 # So ... if none of --prefix, --sysconfdir or --localstatedir are
127 # specified, set things up that way. If --prefix is given, use
128 # it for sysconfdir and localstatedir the way configure normally
129 # would. To change the prefix for everything but leave named.conf
130 # in /etc or named.pid in /var/run, then do this the usual configure way:
131 # ./configure --prefix=/somewhere --sysconfdir=/etc
132 # ./configure --prefix=/somewhere --localstatedir=/var
134 # To put named.conf and named.pid in /usr/local with everything else,
135 # set the prefix explicitly to /usr/local even though that's the default:
136 # ./configure --prefix=/usr/local
140 case "$sysconfdir" in
145 case "$localstatedir" in
154 # Make sure INSTALL uses an absolute path, else it will be wrong in all
155 # Makefiles, since they use make/rules.in and INSTALL will be adjusted by
156 # configure based on the location of the file where it is substituted.
157 # Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
158 # subdirectory of install-sh, This relative path will be wrong for all
159 # directories more than one level down from install-sh.
166 # Not all systems have dirname.
169 ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
172 ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
173 test "$ac_dir" = "$ac_prog" && ac_dir=.
174 test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
175 INSTALL="$ac_dir/$ac_prog"
180 # On these hosts, we really want to use cc, not gcc, even if it is
181 # found. The gcc that these systems have will not correctly handle
184 # However, if the user sets $CC to be something, let that override
187 if test "X$CC" = "X" ; then
193 # Use Sun's cc if it is available, but watch
194 # out for /usr/ucb/cc; it will never be the right
197 # If setting CC here fails, the AC_PROG_CC done
198 # below might still find gcc.
199 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
200 for ac_dir in $PATH; do
201 test -z "$ac_dir" && ac_dir=.
207 if test -f "$ac_dir/cc"; then
228 # gcc's optimiser is broken at -02 for ultrasparc
230 if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
239 # OS dependent CC flags
242 # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
243 # -D_XOPEN_SOURCE_EXTENDED.
245 STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
246 CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
248 #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
250 STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
251 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
254 # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
256 STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
257 CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
259 # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
260 # parts of the IPv6 Advanced Socket API as a result. This is stupid
261 # as it breaks how the two halves (Basic and Advanced) of the IPv6
262 # Socket API were designed to be used but we have to live with it.
263 # Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
265 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
266 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
272 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h,,,
273 [$ac_includes_default
274 #ifdef HAVE_SYS_PARAM_H
275 # include <sys/param.h>
282 AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
283 AC_C_FLEXIBLE_ARRAY_MEMBER
286 # UnixWare 7.1.1 with the feature supplement to the UDK compiler
287 # is reported to not support "static inline" (RT #1212).
289 AC_MSG_CHECKING(for static inline breakage)
294 static inline int foo1() {
298 static inline int foo2() {
303 AC_DEFINE(inline, )])
306 AC_CHECK_TYPE(ssize_t, int)
307 AC_CHECK_TYPE(uintptr_t,unsigned long)
308 AC_CHECK_TYPE(socklen_t,
309 [AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
313 #include <sys/types.h>
314 #include <sys/socket.h>
315 int getsockname(int, struct sockaddr *, size_t *);
317 [AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
318 [AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
321 #include <sys/types.h>
322 #include <sys/socket.h>
324 AC_SUBST(ISC_SOCKADDR_LEN_T)
326 AC_MSG_CHECKING(for long long)
327 AC_TRY_COMPILE([],[long long i = 0; return (0);],
329 ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
331 ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
332 AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
335 # check if we have lifconf
337 AC_MSG_CHECKING(for struct lifconf)
339 #include <sys/types.h>
340 #include <sys/socket.h>
344 struct lifconf lifconf;
345 lifconf.lifc_len = 0;
349 ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
351 ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
352 AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
355 # check if we have kqueue
357 AC_ARG_ENABLE(kqueue,
358 [ --enable-kqueue use BSD kqueue when available [[default=yes]]],
359 want_kqueue="$enableval", want_kqueue="yes")
362 AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
363 case $ac_cv_have_kqueue in
365 ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
368 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
373 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
376 AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
379 # check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
380 # so we need to try running the code, not just test its existence.
383 [ --enable-epoll use Linux epoll when available [[default=auto]]],
384 want_epoll="$enableval", want_epoll="auto")
387 AC_MSG_CHECKING(epoll support)
389 #include <sys/epoll.h>
391 if (epoll_create(1) < 0)
397 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
399 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
402 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
405 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
408 AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
411 # check if we support /dev/poll
413 AC_ARG_ENABLE(devpoll,
414 [ --enable-devpoll use /dev/poll when available [[default=yes]]],
415 want_devpoll="$enableval", want_devpoll="yes")
416 case $want_devpoll in
418 AC_CHECK_HEADERS(sys/devpoll.h devpoll.h,
419 ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
421 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
425 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
428 AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
431 # check if we need to #include sys/select.h explicitly
433 case $ac_cv_header_unistd_h in
435 AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
437 #include <sys/types.h> /* Ultrix */
438 #include <unistd.h>],
439 [fd_set read_set; return (0);],
441 ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
442 LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
444 case $ac_cv_header_sys_select_h in
446 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
447 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
450 AC_MSG_ERROR([need either working unistd.h or sys/select.h])
456 case $ac_cv_header_sys_select_h in
458 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
459 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
462 AC_MSG_ERROR([need either unistd.h or sys/select.h])
467 AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
468 AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
471 # Find the machine's endian flavor.
477 # was --with-openssl specified?
480 AC_MSG_CHECKING(for OpenSSL library)
482 [ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
483 (Required for DNSSEC)],
484 use_openssl="$withval", use_openssl="auto")
486 openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
487 if test "$use_openssl" = "auto"
489 for d in $openssldirs
491 if test -f $d/include/openssl/opensslv.h
498 case "$use_openssl" in
512 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
513 If you don't want OpenSSL, use --without-openssl])
516 if test "$use_openssl" = "yes"
518 # User did not specify a path - guess it
519 for d in $openssldirs
521 if test -f $d/include/openssl/opensslv.h
527 if test "$use_openssl" = "yes"
529 AC_MSG_RESULT(not found)
531 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
533 elif ! test -f "$use_openssl"/include/openssl/opensslv.h
535 AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found])
537 USE_OPENSSL='-DOPENSSL'
538 if test "$use_openssl" = "/usr"
541 DNS_OPENSSL_LIBS="-lcrypto"
543 DST_OPENSSL_INC="-I$use_openssl/include"
546 DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
549 DNS_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
553 # Apple's ld seaches for serially for dynamic
554 # then static libraries. This means you can't
555 # use -L to override dynamic system libraries
556 # with static ones when linking. Instead
557 # we specify a absolute path.
559 if test -f "$use_openssl/lib/libcrypto.dylib"
561 DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
563 DNS_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a"
567 DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
571 AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include)
573 saved_cflags="$CFLAGS"
575 CFLAGS="$CFLAGS $DST_OPENSSL_INC"
576 LIBS="$LIBS $DNS_OPENSSL_LIBS"
577 AC_MSG_CHECKING(whether linking with OpenSSL works)
579 #include <openssl/err.h>
585 [AC_MSG_RESULT(yes)],
587 AC_MSG_ERROR(Could not run test program using OpenSSL from
588 $use_openssl/lib and $use_openssl/include.
589 Please check the argument to --with-openssl and your
590 shared library configuration (e.g., LD_LIBRARY_PATH).)],
591 [AC_MSG_RESULT(assuming it does work on target platform)])
593 AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
595 #include <openssl/err.h>],
596 [ DSO_METHOD_dlfcn(); ],
600 #include <openssl/err.h>
601 ],[ DSO_METHOD_dlfcn(); ],
603 DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl"
605 [AC_MSG_RESULT(unknown)
606 AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
607 [AC_MSG_RESULT(assuming it does work on target platform)])
609 [AC_MSG_RESULT(assuming it does work on target platform)]
612 AC_ARG_ENABLE(openssl-version-check,
613 [AC_HELP_STRING([--enable-openssl-version-check],
614 [Check OpenSSL Version @<:@default=yes@:>@])])
615 case "$enable_openssl_version_check" in
617 AC_MSG_CHECKING(OpenSSL library version)
620 #include <openssl/opensslv.h>
622 if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
623 OPENSSL_VERSION_NUMBER < 0x00908000L) ||
624 OPENSSL_VERSION_NUMBER >= 0x0090804fL)
626 printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
627 OPENSSL_VERSION_NUMBER);
628 printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n"
629 "Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n");
634 [AC_MSG_RESULT(not compatible)
637 [AC_MSG_RESULT(assuming target platform has compatible version)])
640 AC_MSG_RESULT(Skipped OpenSSL version check)
644 AC_MSG_CHECKING(for OpenSSL DSA support)
645 if test -f $use_openssl/include/openssl/dsa.h
647 AC_DEFINE(HAVE_OPENSSL_DSA)
652 AC_CHECK_FUNCS(EVP_sha256 EVP_sha512)
653 CFLAGS="$saved_cflags"
655 OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
656 OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
662 # This would include the system openssl path (and linker options to use
663 # it as needed) if it is found.
666 AC_SUBST(USE_OPENSSL)
667 AC_SUBST(DST_OPENSSL_INC)
668 AC_SUBST(OPENSSLLINKOBJS)
669 AC_SUBST(OPENSSLLINKSRCS)
670 DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
673 # PKCS11 (aka crypto hardware) support
675 # This works only with the right OpenSSL with PKCS11 engine!
678 AC_MSG_CHECKING(for PKCS11 support)
680 [ --with-pkcs11 Build with PKCS11 support],
681 use_pkcs11="yes", use_pkcs11="no")
683 case "$use_pkcs11" in
685 AC_MSG_RESULT(disabled)
689 AC_MSG_RESULT(using OpenSSL with PKCS11 support)
690 USE_PKCS11='-DUSE_PKCS11'
696 AC_MSG_CHECKING(for GSSAPI library)
698 [ --with-gssapi=PATH Specify path for system-supplied GSSAPI],
699 use_gssapi="$withval", use_gssapi="no")
701 gssapidirs="/usr/local /usr/pkg /usr/kerberos /usr"
702 if test "$use_gssapi" = "yes"
706 if test -f $d/include/gssapi/gssapi.h -o -f $d/include/gssapi.h
714 case "$use_gssapi" in
716 AC_MSG_RESULT(disabled)
720 AC_MSG_ERROR([--with-gssapi must specify a path])
723 AC_MSG_RESULT(looking in $use_gssapi/lib)
724 USE_GSSAPI='-DGSSAPI'
725 saved_cppflags="$CPPFLAGS"
726 CPPFLAGS="-I$use_gssapi/include $CPPFLAGS"
727 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
728 [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
730 if test "$ISC_PLATFORM_GSSAPIHEADER" = ""; then
731 AC_MSG_ERROR([gssapi.h not found])
734 AC_CHECK_HEADERS(krb5.h krb5/krb5.h kerberosv5/krb5.h,
735 [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"])
737 if test "$ISC_PLATFORM_KRB5HEADER" = ""; then
738 AC_MSG_ERROR([krb5.h not found])
741 CPPFLAGS="$saved_cppflags"
744 # XXXDCL This probably doesn't work right on all systems.
745 # It will need to be worked on as problems become evident.
747 # Essentially the problems here relate to two different
748 # areas. The first area is building with either KTH
749 # or MIT Kerberos, particularly when both are present on
750 # the machine. The other is static versus dynamic linking.
752 # On the KTH vs MIT issue, Both have libkrb5 that can mess
753 # up the works if one implementation ends up trying to
754 # use the other's krb. This is unfortunately a situation
755 # that very easily arises.
757 # Dynamic linking when the dependency information is built
758 # into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
759 # all such problems go away, but when that setup is not
760 # present, because either the dynamic libraries lack
761 # dependencies or static linking is being done, then the
762 # problems start to show up.
766 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
767 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
769 "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
770 "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
773 # Note that this does not include $saved_libs, because
774 # on FreeBSD machines this configure script has added
775 # -L/usr/local/lib to LIBS, which can make the
776 # -lgssapi_krb5 test succeed with shared libraries even
777 # when you are trying to build with KTH in /usr/lib.
778 LIBS="-L$use_gssapi/lib $TRY_LIBS"
779 AC_MSG_CHECKING(linking as $TRY_LIBS)
780 AC_TRY_LINK( , [gss_acquire_cred();krb5_init_context()],
781 gssapi_linked=yes, gssapi_linked=no)
782 case $gssapi_linked in
783 yes) AC_MSG_RESULT(yes); break ;;
784 no) AC_MSG_RESULT(no) ;;
788 case $gssapi_linked in
789 no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
793 # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib
794 # but MIT in /usr/local/lib and trying to build with KTH.
795 # /usr/local/lib can end up earlier on the link lines.
796 # Like most kludges, this one is not only inelegant it
797 # is also likely to be the wrong thing to do at least as
798 # many times as it is the right thing. Something better
801 if test "$use_gssapi" = "/usr" -a \
802 -f /usr/local/lib/libkrb5.a; then
806 case "$FIX_KTH_VS_MIT" in
808 case "$enable_static_linking" in
809 yes) gssapi_lib_suffix=".a" ;;
810 *) gssapi_lib_suffix=".so" ;;
819 sed -e s%^-l%$use_gssapi/lib/lib% \
820 -e s%$%$gssapi_lib_suffix%`
821 NEW_LIBS="$NEW_LIBS $new_lib"
824 AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
832 DST_GSSAPI_INC="-I$use_gssapi/include"
833 DNS_GSSAPI_LIBS="$LIBS"
835 AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include)
840 AC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
841 AC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
842 AC_SUBST(ISC_PLATFORM_KRB5HEADER)
845 AC_SUBST(DST_GSSAPI_INC)
846 AC_SUBST(DNS_GSSAPI_LIBS)
847 DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS"
850 # Applications linking with libdns also need to link with these libraries.
853 AC_SUBST(DNS_CRYPTO_LIBS)
856 # was --with-randomdev specified?
858 AC_MSG_CHECKING(for random device)
859 AC_ARG_WITH(randomdev,
860 [ --with-randomdev=PATH Specify path for random device],
861 use_randomdev="$withval", use_randomdev="unspec")
863 case "$use_randomdev" in
867 devrandom=/dev/arandom
870 devrandom=/dev/random
873 AC_MSG_RESULT($devrandom)
874 AC_CHECK_FILE($devrandom,
875 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
879 AC_MSG_ERROR([--with-randomdev must specify a path])
882 AC_MSG_RESULT(disabled)
885 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
886 AC_MSG_RESULT(using "$use_randomdev")
891 # Do we have arc4random() ?
893 AC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM))
895 sinclude(config.threads.in)dnl
899 if test "X$GCC" = "Xyes"; then
903 CCOPT="$CCOPT -pthread"
904 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
908 CCOPT="$CCOPT -pthread"
911 LIBS="$LIBS -lthread"
914 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
921 CCOPT="$CCOPT -pthread"
928 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
930 *-sco-sysv*uw*|*-*-sysv*UnixWare*)
932 CCOPT="$CCOPT -Kthread"
936 CCOPT="$CCOPT -Kpthread"
940 ALWAYS_DEFINES="-D_REENTRANT"
941 ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
942 THREADOPTOBJS='${THREADOPTOBJS}'
943 THREADOPTSRCS='${THREADOPTSRCS}'
946 # We'd like to use sigwait() too
948 AC_CHECK_FUNC(sigwait,
949 AC_DEFINE(HAVE_SIGWAIT),
950 AC_CHECK_LIB(c, sigwait,
951 AC_DEFINE(HAVE_SIGWAIT),
952 AC_CHECK_LIB(pthread, sigwait,
953 AC_DEFINE(HAVE_SIGWAIT),
954 AC_CHECK_LIB(pthread, _Psigwait,
955 AC_DEFINE(HAVE_SIGWAIT),))))
957 AC_CHECK_FUNC(pthread_attr_getstacksize,
958 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
960 AC_CHECK_FUNC(pthread_attr_setstacksize,
961 AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
964 # Additional OS-specific issues related to pthreads and sigwait.
968 # One more place to look for sigwait.
971 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
973 *-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
974 *-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
975 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
978 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
983 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
984 # called before certain pthreads calls. This is deprecated
987 *-bsdi3.*|*-bsdi4.0*)
988 AC_DEFINE(NEED_PTHREAD_INIT)
991 # LinuxThreads requires some changes to the way we
995 AC_DEFINE(HAVE_LINUXTHREADS)
998 # Ensure the right sigwait() semantics on Solaris and make
999 # sure we call pthread_setconcurrency.
1002 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
1003 AC_CHECK_FUNC(pthread_setconcurrency,
1004 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
1007 # UnixWare does things its own way.
1009 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1010 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
1015 # Look for sysconf to allow detection of the number of processors.
1017 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
1020 ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
1021 thread_dir=nothreads
1027 AC_SUBST(ALWAYS_DEFINES)
1028 AC_SUBST(ISC_PLATFORM_USETHREADS)
1029 AC_SUBST(THREADOPTOBJS)
1030 AC_SUBST(THREADOPTSRCS)
1031 ISC_THREAD_DIR=$thread_dir
1032 AC_SUBST(ISC_THREAD_DIR)
1035 # was --with-libxml2 specified?
1037 AC_MSG_CHECKING(for libxml2 library)
1038 AC_ARG_WITH(libxml2,
1039 [ --with-libxml2[=PATH] Build with libxml2 library [yes|no|path]],
1040 use_libxml2="$withval", use_libxml2="auto")
1042 case "$use_libxml2" in
1047 case X`(xml2-config --version) 2>/dev/null` in
1049 libxml2_libs=`xml2-config --libs`
1050 libxml2_cflags=`xml2-config --cflags`
1059 if test -f "$use_libxml2/bin/xml2-config" ; then
1060 libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
1061 libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
1066 if test "X$libxml2_libs" != "X"
1069 CFLAGS="$CFLAGS $libxml2_cflags"
1070 LIBS="$LIBS $libxml2_libs"
1071 AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
1077 # In solaris 10, SMF can manage named service
1079 AC_CHECK_LIB(scf, smf_enable_instance)
1082 # flockfile is usually provided by pthreads, but we may want to use it
1083 # even if compiled with --disable-threads. getc_unlocked might also not
1086 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
1087 AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
1090 # Indicate what the final decision was regarding threads.
1092 AC_MSG_CHECKING(whether to build with threads)
1093 if $use_threads; then
1100 # End of pthreads stuff.
1106 AC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
1107 want_largefile="yes", want_largefile="no")
1108 case $want_largefile in
1110 ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1117 # Additional compiler settings.
1121 IRIX_DNSSEC_WARNINGS_HACK=""
1123 if test "X$GCC" = "Xyes"; then
1124 AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
1126 CFLAGS="$CFLAGS -fno-strict-aliasing"
1127 AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
1129 if test "$FNOSTRICTALIASING" = "yes"; then
1131 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
1134 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
1138 LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1150 # The version of the C compiler that constantly warns about
1151 # 'const' as well as alignment issues is unfortunately not
1152 # able to be discerned via the version of the operating
1153 # system, nor does cc have a version flag.
1154 case "`$CC +W 123 2>&1`" in
1159 # Turn off the pointlessly noisy warnings.
1160 STD_CWARNINGS="+w1 +W 474,530,2193,2236"
1163 CCOPT="$CCOPT -Ae -z"
1164 LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1165 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
1168 STD_CWARNINGS="-fullwarn -woff 1209"
1170 # Silence more than 250 instances of
1171 # "prototyped function redeclared without prototype"
1172 # and 11 instances of
1173 # "variable ... was set but never used"
1174 # from lib/dns/sec/openssl.
1176 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
1181 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1189 AC_SUBST(MKDEPCFLAGS)
1191 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
1196 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
1199 # -lxnet buys us one big porting headache... standards, gotta love 'em.
1201 # AC_CHECK_LIB(xnet, socket, ,
1202 # AC_CHECK_LIB(socket, socket)
1205 # Use this for now, instead:
1213 AC_CHECK_LIB(socket, socket)
1214 AC_CHECK_LIB(nsl, inet_addr)
1219 # Work around Solaris's select() limitations.
1222 *-solaris2.[[89]]|*-solaris2.1?)
1223 AC_DEFINE(FD_SETSIZE, 65536,
1224 [Solaris hack to get select_large_fdset.])
1231 AC_MSG_CHECKING(whether to use purify)
1233 [ --with-purify[=PATH] use Rational purify],
1234 use_purify="$withval", use_purify="no")
1236 case "$use_purify" in
1240 AC_PATH_PROG(purify_path, purify, purify)
1243 purify_path="$use_purify"
1247 case "$use_purify" in
1253 if test -f $purify_path || test $purify_path = purify; then
1254 AC_MSG_RESULT($purify_path)
1255 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
1256 PURIFY="$purify_path $PURIFYFLAGS"
1258 AC_MSG_ERROR([$purify_path not found.
1260 Please choose the proper path with the following command:
1262 configure --with-purify=PATH
1271 AC_ARG_WITH(libtool,
1272 [ --with-libtool use GNU libtool],
1273 use_libtool="$withval", use_libtool="no")
1275 case $use_libtool in
1280 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
1281 LIBTOOL_MODE_COMPILE='--mode=compile'
1282 LIBTOOL_MODE_INSTALL='--mode=install'
1283 LIBTOOL_MODE_LINK='--mode=link'
1285 *) LIBTOOL_ALLOW_UNDEFINED= ;;
1288 *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
1289 *) LIBTOOL_IN_MAIN= ;;
1298 LIBTOOL_MODE_COMPILE=
1299 LIBTOOL_MODE_INSTALL=
1301 LIBTOOL_ALLOW_UNDEFINED=
1307 # File name extension for static archive files, for those few places
1308 # where they are treated differently from dynamic ones.
1315 AC_SUBST(LIBTOOL_MKDEP_SED)
1316 AC_SUBST(LIBTOOL_MODE_COMPILE)
1317 AC_SUBST(LIBTOOL_MODE_INSTALL)
1318 AC_SUBST(LIBTOOL_MODE_LINK)
1319 AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
1320 AC_SUBST(LIBTOOL_IN_MAIN)
1323 # Here begins a very long section to determine the system's networking
1324 # capabilities. The order of the tests is significant.
1331 [ --enable-ipv6 use IPv6 [default=autodetect]])
1333 case "$enable_ipv6" in
1335 AC_DEFINE(WANT_IPV6)
1342 # We do the IPv6 compilation checking after libtool so that we can put
1343 # the right suffix on the files.
1345 AC_MSG_CHECKING(for IPv6 structures)
1347 #include <sys/types.h>
1348 #include <sys/socket.h>
1349 #include <netinet/in.h>],
1350 [struct sockaddr_in6 sin6; return (0);],
1357 # See whether IPv6 support is provided via a Kame add-on.
1358 # This is done before other IPv6 linking tests to LIBS is properly set.
1360 AC_MSG_CHECKING(for Kame IPv6 support)
1362 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
1363 use_kame="$withval", use_kame="no")
1369 kame_path=/usr/local/v6
1372 kame_path="$use_kame"
1381 if test -f $kame_path/lib/libinet6.a; then
1382 AC_MSG_RESULT($kame_path/lib/libinet6.a)
1383 LIBS="-L$kame_path/lib -linet6 $LIBS"
1385 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
1387 Please choose the proper path with the following command:
1389 configure --with-kame=PATH
1396 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
1397 # Including it on Kame-using platforms is very bad, though, because
1398 # Kame uses #error against direct inclusion. So include it on only
1399 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
1400 # This is done before the in6_pktinfo check because that's what
1401 # netinet6/in6.h is needed for.
1406 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
1407 LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
1408 isc_netinet6in6_hack="#include <netinet6/in6.h>"
1411 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
1412 LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
1413 isc_netinet6in6_hack=""
1419 # This is similar to the netinet6/in6.h issue.
1422 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1424 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
1425 LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
1426 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
1427 isc_netinetin6_hack="#include <netinet/in6.h>"
1430 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
1431 LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
1432 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
1433 isc_netinetin6_hack=""
1438 # Now delve deeper into the suitability of the IPv6 support.
1440 case "$found_ipv6" in
1442 ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
1443 LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
1445 AC_MSG_CHECKING(for in6_addr)
1447 #include <sys/types.h>
1448 #include <sys/socket.h>
1449 #include <netinet/in.h>
1450 $isc_netinetin6_hack
1451 $isc_netinet6in6_hack
1453 [struct in6_addr in6; return (0);],
1455 ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
1456 LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
1457 isc_in_addr6_hack=""],
1459 ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
1460 LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
1461 isc_in_addr6_hack="#define in6_addr in_addr6"])
1463 AC_MSG_CHECKING(for in6addr_any)
1465 #include <sys/types.h>
1466 #include <sys/socket.h>
1467 #include <netinet/in.h>
1468 $isc_netinetin6_hack
1469 $isc_netinet6in6_hack
1472 [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
1474 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
1475 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
1477 ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
1478 LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
1480 AC_MSG_CHECKING(for in6addr_loopback)
1482 #include <sys/types.h>
1483 #include <sys/socket.h>
1484 #include <netinet/in.h>
1485 $isc_netinetin6_hack
1486 $isc_netinet6in6_hack
1489 [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
1491 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
1492 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
1494 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
1495 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
1497 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
1499 #include <sys/types.h>
1500 #include <sys/socket.h>
1501 #include <netinet/in.h>
1502 $isc_netinetin6_hack
1503 $isc_netinet6in6_hack
1505 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
1507 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
1508 result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
1510 ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
1511 result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
1512 LWRES_HAVE_SIN6_SCOPE_ID="$result"
1514 AC_MSG_CHECKING(for in6_pktinfo)
1516 #include <sys/types.h>
1517 #include <sys/socket.h>
1518 #include <netinet/in.h>
1519 $isc_netinetin6_hack
1520 $isc_netinet6in6_hack
1522 [struct in6_pktinfo xyzzy; return (0);],
1524 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
1525 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
1526 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
1529 ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
1530 LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
1531 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
1532 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
1533 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
1534 LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
1535 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
1537 ISC_IPV6_O="ipv6.$O"
1538 ISC_ISCIPV6_O="unix/ipv6.$O"
1543 AC_SUBST(ISC_PLATFORM_HAVEIPV6)
1544 AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
1545 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
1546 AC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
1547 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
1548 AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
1549 AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
1550 AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
1551 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
1552 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
1553 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
1554 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
1555 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
1556 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
1557 AC_SUBST(ISC_IPV6_H)
1558 AC_SUBST(ISC_IPV6_O)
1559 AC_SUBST(ISC_ISCIPV6_O)
1560 AC_SUBST(ISC_IPV6_C)
1561 AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
1562 AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
1564 AC_MSG_CHECKING([for struct if_laddrreq])
1566 #include <sys/types.h>
1567 #include <net/if6.h>
1568 ],[ struct if_laddrreq a; ],
1570 ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
1572 ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
1573 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
1575 AC_MSG_CHECKING([for struct if_laddrconf])
1577 #include <sys/types.h>
1578 #include <net/if6.h>
1579 ],[ struct if_laddrconf a; ],
1581 ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
1583 ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
1584 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
1587 # Check for network functions that are often missing. We do this
1588 # after the libtool checking, so we can put the right suffix on
1589 # the files. It also needs to come after checking for a Kame add-on,
1590 # which provides some (all?) of the desired functions.
1593 AC_MSG_CHECKING([for inet_ntop with IPv6 support])
1595 #include <sys/types.h>
1596 #include <sys/socket.h>
1597 #include <netinet/in.h>
1598 #include <arpa/inet.h>
1600 char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
1602 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
1605 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
1606 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
1607 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
1608 [AC_MSG_RESULT(assuming inet_ntop needed)
1609 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
1610 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
1611 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
1614 # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
1615 # addresses with less than four octets, like "1.2.3". Also leading
1616 # zeros should also be rejected.
1618 AC_MSG_CHECKING([for working inet_pton with IPv6 support])
1620 #include <sys/types.h>
1621 #include <sys/socket.h>
1622 #include <netinet/in.h>
1623 #include <arpa/inet.h>
1624 main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
1625 inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
1626 (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
1628 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
1630 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
1631 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1632 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
1633 [AC_MSG_RESULT(assuming target platform has working inet_pton)
1634 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
1635 [AC_MSG_RESULT(assuming inet_pton needed)
1636 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
1637 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1638 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
1639 [AC_MSG_RESULT(assuming target platform has working inet_pton)
1640 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
1642 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
1643 AC_SUBST(ISC_PLATFORM_NEEDPTON)
1646 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
1650 # Turn on 4.4BSD style sa_len support.
1651 AC_DEFINE(_SOCKADDR_LEN)
1655 AC_MSG_CHECKING(for sa_len in struct sockaddr)
1657 #include <sys/types.h>
1658 #include <sys/socket.h>],
1659 [struct sockaddr sa; sa.sa_len = 0; return (0);],
1661 ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"
1662 LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"],
1664 ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"
1665 LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"])
1666 AC_SUBST(ISC_PLATFORM_HAVESALEN)
1667 AC_SUBST(LWRES_PLATFORM_HAVESALEN)
1670 # Look for a 4.4BSD or 4.3BSD struct msghdr
1672 AC_MSG_CHECKING(for struct msghdr flavor)
1674 #include <sys/types.h>
1675 #include <sys/socket.h>],
1676 [struct msghdr msg; msg.msg_flags = 0; return (0);],
1677 [AC_MSG_RESULT(4.4BSD)
1678 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
1679 [AC_MSG_RESULT(4.3BSD)
1680 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
1681 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
1684 # Look for in_port_t.
1686 AC_MSG_CHECKING(for type in_port_t)
1688 #include <sys/types.h>
1689 #include <netinet/in.h>],
1690 [in_port_t port = 25; return (0);],
1692 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
1694 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
1695 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
1698 # Check for addrinfo
1700 AC_MSG_CHECKING(for struct addrinfo)
1702 #include <netdb.h>],
1703 [struct addrinfo a; return (0);],
1705 ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"
1706 AC_DEFINE(HAVE_ADDRINFO)],
1708 ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"])
1709 AC_SUBST(ISC_LWRES_NEEDADDRINFO)
1712 # Check for rrsetinfo
1714 AC_MSG_CHECKING(for struct rrsetinfo)
1716 #include <netdb.h>],
1717 [struct rrsetinfo r; return (0);],
1719 ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
1721 ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
1722 AC_SUBST(ISC_LWRES_NEEDRRSETINFO)
1724 AC_MSG_CHECKING(for int sethostent)
1726 #include <netdb.h>],
1727 [int i = sethostent(0); return(0);],
1729 ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"],
1731 ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"])
1732 AC_SUBST(ISC_LWRES_SETHOSTENTINT)
1734 AC_MSG_CHECKING(for int endhostent)
1736 #include <netdb.h>],
1737 [int i = endhostent(); return(0);],
1739 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
1741 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
1742 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
1744 AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
1747 struct netent *getnetbyaddr(in_addr_t, int);],
1750 ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"],
1752 ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"])
1753 AC_SUBST(ISC_LWRES_GETNETBYADDRINADDR)
1755 AC_MSG_CHECKING(for int setnetent)
1757 #include <netdb.h>],
1758 [int i = setnetent(0); return(0);],
1760 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
1762 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
1763 AC_SUBST(ISC_LWRES_SETNETENTINT)
1765 AC_MSG_CHECKING(for int endnetent)
1767 #include <netdb.h>],
1768 [int i = endnetent(); return(0);],
1770 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
1772 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
1773 AC_SUBST(ISC_LWRES_ENDNETENTINT)
1775 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
1778 struct hostent *gethostbyaddr(const void *, size_t, int);],
1781 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
1783 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
1784 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
1786 AC_MSG_CHECKING(for h_errno in netdb.h)
1788 #include <netdb.h>],
1789 [h_errno = 1; return(0);],
1791 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
1793 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
1794 AC_SUBST(ISC_LWRES_NEEDHERRNO)
1796 AC_CHECK_FUNC(getipnodebyname,
1797 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
1798 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
1799 AC_CHECK_FUNC(getnameinfo,
1800 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
1801 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
1802 AC_CHECK_FUNC(getaddrinfo,
1803 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
1804 AC_DEFINE(HAVE_GETADDRINFO)],
1805 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
1806 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
1807 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
1808 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
1809 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
1811 AC_ARG_ENABLE(getifaddrs,
1812 [ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no]].],
1813 want_getifaddrs="$enableval", want_getifaddrs="yes")
1816 # This interface iteration code for getifaddrs() will fall back to using
1817 # /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6
1820 case $want_getifaddrs in
1822 AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required")
1823 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
1826 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
1833 # Look for a sysctl call to get the list of network interfaces.
1835 case $ac_cv_header_sys_sysctl_h in
1837 AC_MSG_CHECKING(for interface list sysctl)
1838 AC_EGREP_CPP(found_rt_iflist, [
1839 #include <sys/param.h>
1840 #include <sys/sysctl.h>
1841 #include <sys/socket.h>
1842 #ifdef NET_RT_IFLIST
1847 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
1848 [AC_MSG_RESULT(no)])
1853 # Check for some other useful functions that are not ever-present.
1856 # We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC
1857 # because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77
1858 # reportedly defines strsep() without declaring it in <string.h> when
1859 # -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and
1860 # AC_CHECK_FUNC() incorrectly succeeds because it declares
1861 # the function itself.
1862 AC_MSG_CHECKING(for correctly declared strsep())
1863 AC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");],
1864 [AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
1865 [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
1866 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
1868 AC_CHECK_FUNC(memmove,
1869 [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
1870 [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
1871 AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
1873 AC_CHECK_FUNC(strtoul,
1874 [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
1875 LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
1877 [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
1878 LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
1879 GENRANDOMLIB='${ISCLIBS}'])
1880 AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
1881 AC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
1882 AC_SUBST(GENRANDOMLIB)
1884 AC_CHECK_FUNC(strlcpy,
1885 [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
1886 [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
1887 AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
1889 AC_CHECK_FUNC(strlcat,
1890 [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
1891 [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
1892 AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
1896 AC_MSG_CHECKING(sprintf)
1900 [ char buf[2]; return(*sprintf(buf,"x"));],
1902 ISC_PRINT_OBJS="print.$O"
1903 ISC_PRINT_SRCS="print.c"
1904 ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
1905 LWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF"
1907 [ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"
1908 LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"]
1910 AC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
1911 AC_SUBST(LWRES_PLATFORM_NEEDSPRINTF)
1913 AC_CHECK_FUNC(vsnprintf,
1914 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
1915 LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
1916 [ISC_PRINT_OBJS="print.$O"
1917 ISC_PRINT_SRCS="print.c"
1918 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
1919 LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"])
1920 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
1921 AC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF)
1922 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
1923 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
1925 AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
1927 AC_SUBST(ISC_EXTRA_OBJS)
1928 AC_SUBST(ISC_EXTRA_SRCS)
1931 # Use our own SPNEGO implementation?
1933 AC_ARG_ENABLE(isc-spnego,
1934 [ --disable-isc-spnego use SPNEGO from GSSAPI library])
1936 if test -n "$USE_GSSAPI"
1938 case "$enable_isc_spnego" in
1940 USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
1941 DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
1942 DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c"
1943 AC_MSG_RESULT(using SPNEGO from lib/dns)
1946 AC_MSG_RESULT(using SPNEGO from GSSAPI library)
1951 AC_SUBST(USE_ISC_SPNEGO)
1953 AC_SUBST(DST_EXTRA_OBJS)
1954 AC_SUBST(DST_EXTRA_SRCS)
1956 # Determine the printf format characters to use when printing
1957 # values of type isc_int64_t. This will normally be "ll", but where
1958 # the compiler treats "long long" as a alias for "long" and printf
1959 # doesn't know about "long long" use "l". Hopefully the sprintf
1960 # will produce a inconsistent result in the later case. If the compiler
1961 # fails due to seeing "%lld" we fall back to "l".
1963 # Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
1964 # %ld even for (long long)/
1966 # Win32 uses "%I64d", but that's defined elsewhere since we don't use
1967 # configure on Win32.
1969 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
1973 long long int j = 0;
1976 sprintf(buf, "%lld", j);
1977 exit((sizeof(long long int) != sizeof(long int))? 0 :
1978 (strcmp(buf, "0") != 0));
1982 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
1983 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
1985 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
1986 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
1987 [AC_MSG_RESULT(assuming target platform uses ll)
1988 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
1989 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
1990 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
1991 AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
1996 # Note it is very recommended to *not* disable chroot(),
1997 # this is only because chroot() was made obsolete by Posix.
1998 AC_ARG_ENABLE(chroot,
1999 [ --disable-chroot disable chroot])
2000 case "$enable_chroot" in
2002 AC_CHECK_FUNCS(chroot)
2007 AC_ARG_ENABLE(linux-caps,
2008 [ --disable-linux-caps disable linux capabilities])
2009 case "$enable_linux_caps" in
2011 AC_CHECK_HEADERS(linux/capability.h sys/capability.h)
2012 AC_CHECK_LIB(cap, cap_set_proc)
2017 AC_CHECK_HEADERS(sys/prctl.h)
2019 AC_CHECK_HEADERS(sys/un.h,
2020 ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
2022 ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
2024 AC_SUBST(ISC_PLATFORM_HAVESYSUNH)
2028 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2029 [Define if connect does not honour the permission on the UNIX domain socket.])
2032 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2033 [Define if connect does not honour the permission on the UNIX domain socket.])
2040 AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
2042 AC_MSG_CHECKING(for optarg declaration)
2047 [AC_MSG_RESULT(yes)],
2049 GEN_NEED_OPTARG="-DNEED_OPTARG=1"
2050 AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
2053 # BSD/OS, and perhaps some others, don't define rlim_t.
2055 AC_MSG_CHECKING(for type rlim_t)
2057 #include <sys/types.h>
2058 #include <sys/time.h>
2059 #include <sys/resource.h>],
2060 [rlim_t rl = 19671212; return (0);],
2062 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
2065 AC_MSG_CHECKING(type of rlim_cur)
2067 #include <sys/types.h>
2068 #include <sys/time.h>
2069 #include <sys/resource.h>
2070 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
2072 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
2075 #include <sys/types.h>
2076 #include <sys/time.h>
2077 #include <sys/resource.h>
2078 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
2079 [AC_MSG_RESULT(long int)
2080 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
2083 #include <sys/types.h>
2084 #include <sys/time.h>
2085 #include <sys/resource.h>
2086 main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
2087 [AC_MSG_RESULT(long long int)
2088 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
2089 [AC_MSG_ERROR([unable to determine sizeof rlim_cur])
2090 ],[AC_MSG_ERROR(this cannot happen)])
2091 ],[AC_MSG_ERROR(this cannot happen)])
2093 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
2094 AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming long long int)])
2096 AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
2099 # Older HP-UX doesn't have gettune
2103 AC_CHECK_HEADERS(sys/dyntune.h)
2111 # Compaq TruCluster requires more code for handling cluster IP aliases
2115 AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
2116 AC_CHECK_FUNC(clua_getaliasaddress,
2117 AC_DEFINE(HAVE_TRUCLUSTER, 1,
2118 [Define if running under Compaq TruCluster]))
2125 # Some hosts need msg_namelen to match the size of the socket structure.
2126 # Some hosts don't set msg_namelen appropriately on return from recvmsg().
2130 AC_DEFINE(BROKEN_RECVMSG, 1,
2131 [Define if recvmsg() does not meet all of the BSD socket API specifications.])
2136 # Microsoft has their own way of handling shared libraries that requires
2137 # additional qualifiers on extern variables. Unix systems don't need it.
2139 AC_SUBST(ISC_PLATFORM_USEDECLSPEC)
2140 ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
2141 AC_SUBST(LWRES_PLATFORM_USEDECLSPEC)
2142 LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC"
2145 # Random remaining OS-specific issues involving compiler warnings.
2146 # XXXDCL print messages to indicate some compensation is being done?
2148 AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
2149 ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
2153 hack_shutup_pthreadonceinit=yes
2156 hack_shutup_sputaux=yes
2159 hack_shutup_sigwait=yes
2160 hack_shutup_sputaux=yes
2163 hack_shutup_stdargcast=yes
2166 hack_shutup_pthreadonceinit=yes
2168 *-solaris2.1[[0-9]])
2169 AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
2173 case "$hack_shutup_pthreadonceinit" in
2176 # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
2178 ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
2182 case "$hack_shutup_sigwait" in
2185 # Shut up a -Wmissing-prototypes warning for sigwait().
2187 AC_DEFINE(SHUTUP_SIGWAIT)
2191 case "$hack_shutup_sputaux" in
2194 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
2196 AC_DEFINE(SHUTUP_SPUTAUX)
2200 case "$hack_shutup_stdargcast" in
2203 # Shut up a -Wcast-qual warning from va_start().
2205 AC_DEFINE(SHUTUP_STDARG_CAST)
2209 AC_CHECK_HEADERS(strings.h,
2210 ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
2212 ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH"
2214 AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
2217 # Check for if_nametoindex() for IPv6 scoped addresses support
2219 AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
2220 ac_cv_have_if_nametoindex=no)
2221 case $ac_cv_have_if_nametoindex in
2225 AC_CHECK_LIB(ipv6, if_nametoindex,
2226 ac_cv_have_if_nametoindex=yes
2227 LIBS="-lipv6 $LIBS",)
2231 case $ac_cv_have_if_nametoindex in
2233 ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
2236 ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
2239 AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
2241 AC_CHECK_FUNCS(nanosleep)
2244 # Machine architecture dependent features
2246 AC_ARG_ENABLE(atomic,
2247 [ --enable-atomic enable machine specific atomic operations
2248 [[default=autodetect]]],
2249 enable_atomic="$enableval",
2250 enable_atomic="autodetect")
2251 case "$enable_atomic" in
2255 if test "X$GCC" = "Xyes"; then
2256 AC_MSG_CHECKING([if asm("isc"); works])
2258 main() { asm("ics"); exit(0); }
2263 saved_cflags="$CFLAGS"
2264 CFLAGS="$CFLAGS -Wa,-many"
2266 main() { asm("ics"); exit(0); }
2268 [AC_MSG_RESULT([yes, required -Wa,-many])
2270 [AC_MSG_RESULT([no, use_atomic disabled])
2271 CFLAGS="$saved_cflags"
2273 [AC_MSG_RESULT([cross compile, assume yes])
2274 CFLAGS="$saved_cflags"
2293 ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
2294 if test "$use_atomic" = "yes"; then
2295 AC_MSG_CHECKING([architecture type for atomic operations])
2296 have_atomic=yes # set default
2299 # XXX: some old x86 architectures actually do not support
2300 # (some of) these operations. Do we need stricter checks?
2303 exit((sizeof(void *) == 8) ? 0 : 1);
2314 exit((sizeof(void *) == 8) ? 0 : 1);
2326 powerpc-*|powerpc64-*)
2329 mips-*|mipsel-*|mips64-*|mips64el-*)
2340 AC_MSG_RESULT($arch)
2343 if test "$have_atomic" = "yes"; then
2344 AC_MSG_CHECKING([compiler support for inline assembly code])
2347 # Check whether the compiler supports the assembly syntax we provide.
2348 if test "X$GCC" = "Xyes"; then
2349 # GCC's ASM extension always works
2351 if test $arch = "x86_64"; then
2352 # We can share the same code for gcc with x86_32
2355 if test $arch = "powerpc"; then
2357 # The MacOS (and maybe others) uses "r0" for register
2358 # zero. Under linux/ibm it is "0" for register 0.
2359 # Probe to see if we have a MacOS style assembler.
2361 AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
2363 __asm__ volatile ("li r0, 0x0\n"::);
2367 ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
2368 ], [AC_MSG_RESULT(no)])
2373 # Tru64 compiler has its own syntax for inline
2377 #error "unexpected compiler"
2389 ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
2392 ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
2399 # See if the generic __asm function works. If not,
2400 # we need to disable the atomic operations.
2404 [compiler="standard"
2405 ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
2406 [compiler="not supported (atomic operations disabled)"
2412 AC_MSG_RESULT($compiler)
2415 if test "$have_atomic" = "yes"; then
2416 ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
2417 ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
2418 ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
2420 ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
2421 ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
2422 ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
2425 if test "$have_xaddq" = "yes"; then
2426 ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1"
2428 ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
2431 AC_SUBST(ISC_PLATFORM_HAVEXADD)
2432 AC_SUBST(ISC_PLATFORM_HAVEXADDQ)
2433 AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
2434 AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
2436 AC_SUBST(ISC_PLATFORM_USEGCCASM)
2437 AC_SUBST(ISC_PLATFORM_USEOSFASM)
2438 AC_SUBST(ISC_PLATFORM_USESTDASM)
2439 AC_SUBST(ISC_PLATFORM_USEMACASM)
2442 AC_SUBST(ISC_ARCH_DIR)
2445 # Activate "rrset-order fixed" or not?
2447 AC_ARG_ENABLE(fixed-rrset,
2448 [ --enable-fixed-rrset enable fixed rrset ordering
2450 enable_fixed="$enableval",
2452 case "$enable_fixed" in
2454 AC_DEFINE(DNS_RDATASET_FIXED, 1,
2455 [Define to enable "rrset-order fixed" syntax.])
2464 # The following sets up how non-blocking i/o is established.
2465 # Sunos, cygwin and solaris 2.x (x<5) require special handling.
2468 *-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2469 *-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2470 *-solaris2.[[01234]])
2471 AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
2472 AC_DEFINE(USE_FIONBIO_IOCTL, 1,
2473 [Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
2475 *) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
2476 [Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
2480 # Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
2481 # This prevents the source address being set.
2484 *-solaris2.[[012345]]|*-solaris2.5.1)
2485 AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
2486 [Define if you cannot bind() before connect() for TCP sockets.])
2490 # The following sections deal with tools used for formatting
2491 # the documentation. They are all optional, unless you are
2492 # a developer editing the documentation source.
2499 AC_PATH_PROGS(LATEX, latex, latex)
2502 AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
2509 AC_PATH_PROGS(W3M, w3m, w3m)
2513 # Look for xsltproc (libxslt)
2516 AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
2520 # Look for xmllint (libxml2)
2523 AC_PATH_PROG(XMLLINT, xmllint, xmllint)
2530 AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
2534 # Subroutine for searching for an ordinary file (e.g., a stylesheet)
2535 # in a number of directories:
2537 # NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
2539 # If the file FILENAME is found in one of the DIRECTORIES, the shell
2540 # variable VARIABLE is defined to its absolute pathname. Otherwise,
2541 # it is set to FILENAME, with no directory prefix (that's not terribly
2542 # useful, but looks less confusing in substitutions than leaving it
2543 # empty). The variable VARIABLE will be substituted into output files.
2546 AC_DEFUN(NOM_PATH_FILE, [
2548 AC_MSG_CHECKING(for $2)
2559 if test "X[$]$1" = "X"
2561 AC_MSG_RESULT("not found");
2568 # Look for Docbook-XSL stylesheets. Location probably varies by system.
2569 # If it's not explicitly specified, guess where it might be found, based on
2570 # where SGML stuff lives on some systems (FreeBSD is the only one we're sure
2571 # of at the moment).
2573 AC_MSG_CHECKING(for Docbook-XSL path)
2574 AC_ARG_WITH(docbook-xsl,
2575 [ --with-docbook-xsl=PATH Specify path for Docbook-XSL stylesheets],
2576 docbook_path="$withval", docbook_path="auto")
2577 case "$docbook_path" in
2580 docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook /usr/share/xsl/docbook"
2583 docbook_xsl_trees="$withval"
2584 AC_MSG_RESULT($docbook_xsl_trees)
2589 # Look for stylesheets we need.
2592 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees)
2593 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees)
2594 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees)
2595 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, html/chunk.xsl, $docbook_xsl_trees)
2596 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, xhtml/chunk.xsl, $docbook_xsl_trees)
2597 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees)
2598 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees)
2599 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees)
2600 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees)
2603 # Same dance for db2latex
2605 # No idea where this lives except on FreeBSD.
2608 db2latex_xsl_trees="/usr/local/share"
2611 # Look for stylesheets we need.
2614 NOM_PATH_FILE(XSLT_DB2LATEX_STYLE, db2latex/xsl/docbook.xsl, $db2latex_xsl_trees)
2617 # Look for "admonition" image directory. Can't use NOM_PATH_FILE()
2618 # because it's a directory, so just do the same things, inline.
2621 AC_MSG_CHECKING(for db2latex/xsl/figures)
2622 for d in $db2latex_xsl_trees
2624 dd=$d/db2latex/xsl/figures
2627 XSLT_DB2LATEX_ADMONITIONS=$dd
2632 if test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
2634 AC_MSG_RESULT(not found)
2635 XSLT_DB2LATEX_ADMONITIONS=db2latex/xsl/figures
2637 AC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
2643 [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]],
2644 use_idn="$withval", use_idn="no")
2647 if test X$prefix = XNONE ; then
2662 AC_ARG_WITH(libiconv,
2663 [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]],
2664 use_libiconv="$withval", use_libiconv="no")
2665 case "$use_libiconv" in
2667 if test X$prefix = XNONE ; then
2668 iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
2670 iconvlib="-L$prefix/lib -R$prefix/lib -liconv"
2677 iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
2682 [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]],
2683 iconvlib="$withval")
2694 [ --with-idnlib=ARG specify libidnkit],
2695 idnlib="$withval", idnlib="no")
2696 if test "$idnlib" = yes; then
2697 AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
2701 if test "$use_idn" != no; then
2702 AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.])
2703 STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include"
2704 if test "$idnlib" != no; then
2705 IDNLIBS="$idnlib $iconvlib"
2707 IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib"
2712 AC_CHECK_HEADERS(locale.h)
2713 AC_CHECK_FUNCS(setlocale)
2718 AC_SUBST(BIND9_TOP_BUILDDIR)
2719 BIND9_TOP_BUILDDIR=`pwd`
2721 AC_SUBST(BIND9_ISC_BUILDINCLUDE)
2722 AC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
2723 AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
2724 AC_SUBST(BIND9_DNS_BUILDINCLUDE)
2725 AC_SUBST(BIND9_LWRES_BUILDINCLUDE)
2726 AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
2727 if test "X$srcdir" != "X"; then
2728 BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
2729 BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
2730 BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
2731 BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
2732 BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
2733 BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
2735 BIND9_ISC_BUILDINCLUDE=""
2736 BIND9_ISCCC_BUILDINCLUDE=""
2737 BIND9_ISCCFG_BUILDINCLUDE=""
2738 BIND9_DNS_BUILDINCLUDE=""
2739 BIND9_LWRES_BUILDINCLUDE=""
2740 BIND9_BIND9_BUILDINCLUDE=""
2743 AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
2744 BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
2746 AC_SUBST_FILE(BIND9_MAKE_RULES)
2747 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
2750 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}"
2751 AC_SUBST(BIND9_VERSION)
2753 if test -z "$ac_configure_args"; then
2754 BIND9_CONFIGARGS="defaults"
2756 for a in $ac_configure_args
2758 BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
2761 BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
2762 BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
2763 AC_SUBST(BIND9_CONFIGARGS)
2765 AC_SUBST_FILE(LIBISC_API)
2766 LIBISC_API=$srcdir/lib/isc/api
2768 AC_SUBST_FILE(LIBISCCC_API)
2769 LIBISCCC_API=$srcdir/lib/isccc/api
2771 AC_SUBST_FILE(LIBISCCFG_API)
2772 LIBISCCFG_API=$srcdir/lib/isccfg/api
2774 AC_SUBST_FILE(LIBDNS_API)
2775 LIBDNS_API=$srcdir/lib/dns/api
2777 AC_SUBST_FILE(LIBBIND9_API)
2778 LIBBIND9_API=$srcdir/lib/bind9/api
2780 AC_SUBST_FILE(LIBLWRES_API)
2781 LIBLWRES_API=$srcdir/lib/lwres/api
2784 # Configure any DLZ drivers.
2786 # If config.dlz.in selects one or more DLZ drivers, it will set
2787 # USE_DLZ to a non-empty value, which will be our clue to
2788 # enable the DLZ core functions.
2790 # This section has to come after the libtool stuff because it needs to
2791 # know how to name the driver object files.
2795 DLZ_DRIVER_INCLUDES=""
2801 sinclude(contrib/dlz/config.dlz.in)
2803 AC_MSG_CHECKING(for DLZ)
2805 if test -n "$USE_DLZ"
2808 USE_DLZ="-DDLZ $USE_DLZ"
2809 DLZ_DRIVER_RULES=contrib/dlz/drivers/rules
2810 AC_CONFIG_FILES([$DLZ_DRIVER_RULES])
2813 DLZ_DRIVER_RULES=/dev/null
2817 AC_SUBST(DLZ_DRIVER_INCLUDES)
2818 AC_SUBST(DLZ_DRIVER_LIBS)
2819 AC_SUBST(DLZ_DRIVER_SRCS)
2820 AC_SUBST(DLZ_DRIVER_OBJS)
2821 AC_SUBST(DLZ_SYSTEM_TEST)
2822 AC_SUBST_FILE(DLZ_DRIVER_RULES)
2824 if test "$cross_compiling" = "yes"; then
2825 if test -z "$BUILD_CC"; then
2826 AC_ERROR([BUILD_CC not set])
2828 BUILD_CFLAGS="$BUILD_CFLAGS"
2829 BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
2830 BUILD_LDFLAGS="$BUILD_LDFLAGS"
2831 BUILD_LIBS="$BUILD_LIBS"
2834 BUILD_CFLAGS="$CFLAGS"
2835 BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
2836 BUILD_LDFLAGS="$LDFLAGS"
2841 for e in $BUILD_LDFLAGS ; do
2846 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2847 NEWFLAGS="$NEWFLAGS $e $ee"
2850 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2851 NEWFLAGS="$NEWFLAGS $e $ee"
2854 ee=`echo $e | sed -e 's%^-L%-R%'`
2855 NEWFLAGS="$NEWFLAGS $e $ee"
2858 NEWFLAGS="$NEWFLAGS $e"
2863 NEWFLAGS="$NEWFLAGS $e"
2867 BUILD_LDFLAGS="$NEWFLAGS"
2870 for e in $DNS_GSSAPI_LIBS ; do
2875 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2876 NEWFLAGS="$NEWFLAGS $e $ee"
2879 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2880 NEWFLAGS="$NEWFLAGS $e $ee"
2883 ee=`echo $e | sed -e 's%^-L%-R%'`
2884 NEWFLAGS="$NEWFLAGS $e $ee"
2887 NEWFLAGS="$NEWFLAGS $e"
2892 NEWFLAGS="$NEWFLAGS $e"
2896 DNS_GSSAPI_LIBS="$NEWFLAGS"
2899 for e in $DNS_CRYPTO_LIBS ; do
2904 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2905 NEWFLAGS="$NEWFLAGS $e $ee"
2908 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2909 NEWFLAGS="$NEWFLAGS $e $ee"
2912 ee=`echo $e | sed -e 's%^-L%-R%'`
2913 NEWFLAGS="$NEWFLAGS $e $ee"
2916 NEWFLAGS="$NEWFLAGS $e"
2921 NEWFLAGS="$NEWFLAGS $e"
2925 DNS_CRYPTO_LIBS="$NEWFLAGS"
2928 AC_SUBST(BUILD_CFLAGS)
2929 AC_SUBST(BUILD_CPPFLAGS)
2930 AC_SUBST(BUILD_LDFLAGS)
2931 AC_SUBST(BUILD_LIBS)
2934 # Commands to run at the end of config.status.
2935 # Don't just put these into configure, it won't work right if somebody
2936 # runs config.status directly (which autoconf allows).
2941 [chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter])
2944 # Files to configure. These are listed here because we used to
2945 # specify them as arguments to AC_OUTPUT. It's (now) ok to move these
2946 # elsewhere if there's a good reason for doing so.
2955 lib/isc/include/Makefile
2956 lib/isc/include/isc/Makefile
2957 lib/isc/include/isc/platform.h
2958 lib/isc/unix/Makefile
2959 lib/isc/unix/include/Makefile
2960 lib/isc/unix/include/isc/Makefile
2961 lib/isc/nls/Makefile
2962 lib/isc/$thread_dir/Makefile
2963 lib/isc/$thread_dir/include/Makefile
2964 lib/isc/$thread_dir/include/isc/Makefile
2965 lib/isc/$arch/Makefile
2966 lib/isc/$arch/include/Makefile
2967 lib/isc/$arch/include/isc/Makefile
2969 lib/isccc/include/Makefile
2970 lib/isccc/include/isccc/Makefile
2972 lib/isccfg/include/Makefile
2973 lib/isccfg/include/isccfg/Makefile
2975 lib/dns/include/Makefile
2976 lib/dns/include/dns/Makefile
2977 lib/dns/include/dst/Makefile
2979 lib/bind9/include/Makefile
2980 lib/bind9/include/bind9/Makefile
2982 lib/lwres/include/Makefile
2983 lib/lwres/include/lwres/Makefile
2984 lib/lwres/include/lwres/netdb.h
2985 lib/lwres/include/lwres/platform.h
2986 lib/lwres/man/Makefile
2987 lib/lwres/unix/Makefile
2988 lib/lwres/unix/include/Makefile
2989 lib/lwres/unix/include/lwres/Makefile
2991 lib/tests/include/Makefile
2992 lib/tests/include/tests/Makefile
2996 bin/named/unix/Makefile
2998 bin/rndc/unix/Makefile
3000 bin/nsupdate/Makefile
3002 bin/tests/names/Makefile
3003 bin/tests/master/Makefile
3004 bin/tests/rbt/Makefile
3005 bin/tests/db/Makefile
3006 bin/tests/tasks/Makefile
3007 bin/tests/timers/Makefile
3008 bin/tests/dst/Makefile
3009 bin/tests/mem/Makefile
3010 bin/tests/hashes/Makefile
3011 bin/tests/net/Makefile
3012 bin/tests/sockaddr/Makefile
3013 bin/tests/system/Makefile
3014 bin/tests/system/conf.sh
3015 bin/tests/system/lwresd/Makefile
3016 bin/tests/system/tkey/Makefile
3017 bin/tests/headerdep_test.sh
3024 doc/xsl/isc-docbook-chunk.xsl
3025 doc/xsl/isc-docbook-html.xsl
3026 doc/xsl/isc-docbook-latex.xsl
3027 doc/xsl/isc-manpage.xsl
3028 doc/doxygen/Doxyfile
3029 doc/doxygen/Makefile
3030 doc/doxygen/doxygen-input-filter
3040 # Now that the Makefiles exist we can ensure that everything is rebuilt.
3042 AC_ARG_WITH(make-clean,
3043 [ --with-make-clean Run "make clean" at end of configure [[yes|no]].],
3044 make_clean="$withval", make_clean="yes")
3045 case "$make_clean" in
3051 if test "X$USE_OPENSSL" = "X"; then
3053 BIND is being built without OpenSSL. This means it will not have DNSSEC support.
3057 if test "X$OPENSSL_WARNING" != "X"; then
3059 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3060 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3062 WARNING Your OpenSSL crypto library may be vulnerable to WARNING
3063 WARNING one or more of the the following known security WARNING
3064 WARNING flaws: WARNING
3066 WARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
3067 WARNING CVE-2006-2940. WARNING
3069 WARNING It is recommended that you upgrade to OpenSSL WARNING
3070 WARNING version 0.9.8d/0.9.7l (or greater). WARNING
3072 WARNING You can disable this warning by specifying: WARNING
3074 WARNING --disable-openssl-version-check WARNING
3076 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3077 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3081 # Tell Emacs to edit this file in shell mode.