1 # Copyright (C) 2004-2012 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.40 $)
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.])
65 AC_ARG_ENABLE(developer, [ --enable-developer enable developer build settings])
66 case "$enable_developer" in
68 test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes
69 test "${with_atf+set}" = set || with_atf=yes
70 test "${enable_filter_aaaa+set}" = set || enable_filter_aaaa=yes
71 test "${enable_rpz_nsip+set}" = set || enable_rpz_nsip=yes
72 test "${enable_rpz_nsdname+set}" = set || enable_rpz_nsdname=yes
73 test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes
76 test "${enable_exportlib+set}" = set || enable_exportlib=yes
79 test "${enable_exportlib+set}" = set || enable_exportlib=yes
85 # Make very sure that these are the first files processed by
86 # config.status, since we use the processed output as the input for
87 # AC_SUBST_FILE() substitutions in other files.
89 AC_CONFIG_FILES([make/rules make/includes])
96 # The POSIX ln(1) program. Non-POSIX systems may substitute
97 # "copy" or something.
104 ar program not found. Please fix your PATH to include the directory in
105 which ar resides, or set AR in the environment with the full path to ar.
114 AC_PATH_PROGS(ETAGS, etags emacs-etags)
117 # Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
118 # GNU emacs etags, and it requires the -L flag.
120 if test "X$ETAGS" != "X"; then
121 AC_MSG_CHECKING(for Exuberant Ctags etags)
122 if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
132 # Perl is optional; it is used only by some of the system test scripts.
134 AC_PATH_PROGS(PERL, perl5 perl)
138 # Special processing of paths depending on whether --prefix,
139 # --sysconfdir or --localstatedir arguments were given. What's
140 # desired is some compatibility with the way previous versions
141 # of BIND built; they defaulted to /usr/local for most parts of
142 # the installation, but named.boot/named.conf was in /etc
143 # and named.pid was in /var/run.
145 # So ... if none of --prefix, --sysconfdir or --localstatedir are
146 # specified, set things up that way. If --prefix is given, use
147 # it for sysconfdir and localstatedir the way configure normally
148 # would. To change the prefix for everything but leave named.conf
149 # in /etc or named.pid in /var/run, then do this the usual configure way:
150 # ./configure --prefix=/somewhere --sysconfdir=/etc
151 # ./configure --prefix=/somewhere --localstatedir=/var
153 # To put named.conf and named.pid in /usr/local with everything else,
154 # set the prefix explicitly to /usr/local even though that's the default:
155 # ./configure --prefix=/usr/local
159 case "$sysconfdir" in
164 case "$localstatedir" in
173 # Make sure INSTALL uses an absolute path, else it will be wrong in all
174 # Makefiles, since they use make/rules.in and INSTALL will be adjusted by
175 # configure based on the location of the file where it is substituted.
176 # Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
177 # subdirectory of install-sh, This relative path will be wrong for all
178 # directories more than one level down from install-sh.
185 # Not all systems have dirname.
188 ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
191 ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
192 test "$ac_dir" = "$ac_prog" && ac_dir=.
193 test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
194 INSTALL="$ac_dir/$ac_prog"
199 # On these hosts, we really want to use cc, not gcc, even if it is
200 # found. The gcc that these systems have will not correctly handle
203 # However, if the user sets $CC to be something, let that override
206 if test "X$CC" = "X" ; then
212 # Use Sun's cc if it is available, but watch
213 # out for /usr/ucb/cc; it will never be the right
216 # If setting CC here fails, the AC_PROG_CC done
217 # below might still find gcc.
218 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
219 for ac_dir in $PATH; do
220 test -z "$ac_dir" && ac_dir=.
226 if test -f "$ac_dir/cc"; then
247 # gcc's optimiser is broken at -02 for ultrasparc
249 if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
258 # OS dependent CC flags
261 # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
262 # -D_XOPEN_SOURCE_EXTENDED.
264 STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
265 CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
267 #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
269 STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
270 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
273 # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
275 STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
276 CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
278 # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
279 # parts of the IPv6 Advanced Socket API as a result. This is stupid
280 # as it breaks how the two halves (Basic and Advanced) of the IPv6
281 # Socket API were designed to be used but we have to live with it.
282 # Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
283 *-linux* | *-kfreebsd*-gnu)
284 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
285 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
288 # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use.
289 # Setting this is sufficient to select the correct behavior for BIND 9.
292 STD_CDEFINES="$STD_CDEFINES -D__APPLE_USE_RFC_3542"
293 CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542"
299 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,,,
300 [$ac_includes_default
301 #ifdef HAVE_SYS_PARAM_H
302 # include <sys/param.h>
309 AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
310 AC_C_FLEXIBLE_ARRAY_MEMBER
315 AC_CHECK_FUNCS(getenv)
318 # UnixWare 7.1.1 with the feature supplement to the UDK compiler
319 # is reported to not support "static inline" (RT #1212).
321 AC_MSG_CHECKING(for static inline breakage)
326 static inline int foo1() {
330 static inline int foo2() {
335 AC_DEFINE(inline, )])
338 AC_CHECK_TYPE(ssize_t, int)
339 AC_CHECK_TYPE(uintptr_t,unsigned long)
340 AC_CHECK_TYPE(socklen_t,
341 [AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
345 #include <sys/types.h>
346 #include <sys/socket.h>
347 int getsockname(int, struct sockaddr *, size_t *);
349 [AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
350 [AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
353 #include <sys/types.h>
354 #include <sys/socket.h>
356 AC_SUBST(ISC_SOCKADDR_LEN_T)
358 AC_MSG_CHECKING(for long long)
359 AC_TRY_COMPILE([],[long long i = 0; return (0);],
361 ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
363 ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
364 AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
367 # check for GCC noreturn attribute
369 AC_MSG_CHECKING(for GCC noreturn attribute)
370 AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));],
372 ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
373 ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"],
375 ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
376 ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST"])
377 AC_SUBST(ISC_PLATFORM_NORETURN_PRE)
378 AC_SUBST(ISC_PLATFORM_NORETURN_POST)
381 # check if we have lifconf
383 AC_MSG_CHECKING(for struct lifconf)
385 #include <sys/types.h>
386 #include <sys/socket.h>
390 struct lifconf lifconf;
391 lifconf.lifc_len = 0;
395 ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
397 ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
398 AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
401 # check if we have kqueue
403 AC_ARG_ENABLE(kqueue,
404 [ --enable-kqueue use BSD kqueue when available [[default=yes]]],
405 want_kqueue="$enableval", want_kqueue="yes")
408 AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
409 case $ac_cv_have_kqueue in
411 ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
414 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
419 ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
422 AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
425 # check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
426 # so we need to try running the code, not just test its existence.
429 [ --enable-epoll use Linux epoll when available [[default=auto]]],
430 want_epoll="$enableval", want_epoll="auto")
433 AC_MSG_CHECKING(epoll support)
435 #include <sys/epoll.h>
437 if (epoll_create(1) < 0)
443 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
445 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
448 ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
451 ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
454 AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
457 # check if we support /dev/poll
459 AC_ARG_ENABLE(devpoll,
460 [ --enable-devpoll use /dev/poll when available [[default=yes]]],
461 want_devpoll="$enableval", want_devpoll="yes")
462 case $want_devpoll in
464 AC_CHECK_HEADERS(sys/devpoll.h devpoll.h,
465 ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
467 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
471 ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
474 AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
477 # check if we need to #include sys/select.h explicitly
479 case $ac_cv_header_unistd_h in
481 AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
483 #include <sys/types.h> /* Ultrix */
484 #include <unistd.h>],
485 [fd_set read_set; return (0);],
487 ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
488 LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
490 case $ac_cv_header_sys_select_h in
492 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
493 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
496 AC_MSG_ERROR([need either working unistd.h or sys/select.h])
502 case $ac_cv_header_sys_select_h in
504 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
505 LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
508 AC_MSG_ERROR([need either unistd.h or sys/select.h])
513 AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
514 AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
517 # Find the machine's endian flavor.
522 # was --with-openssl specified?
525 AC_MSG_CHECKING(for OpenSSL library)
527 [ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
528 (Required for DNSSEC)],
529 use_openssl="$withval", use_openssl="auto")
531 openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
532 if test "$use_openssl" = "auto"
534 for d in $openssldirs
536 if test -f $d/include/openssl/opensslv.h
543 case "$use_openssl" in
557 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
558 If you don't want OpenSSL, use --without-openssl])
561 if test "$use_openssl" = "yes"
563 # User did not specify a path - guess it
564 for d in $openssldirs
566 if test -f $d/include/openssl/opensslv.h
572 if test "$use_openssl" = "yes"
574 AC_MSG_RESULT(not found)
576 [OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
578 elif ! test -f "$use_openssl"/include/openssl/opensslv.h
580 AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found])
582 USE_OPENSSL='-DOPENSSL'
583 if test "$use_openssl" = "/usr"
586 DNS_OPENSSL_LIBS="-lcrypto"
588 DST_OPENSSL_INC="-I$use_openssl/include"
591 DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
594 DNS_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
598 # Apple's ld seaches for serially for dynamic
599 # then static libraries. This means you can't
600 # use -L to override dynamic system libraries
601 # with static ones when linking. Instead
602 # we specify a absolute path.
604 if test -f "$use_openssl/lib/libcrypto.dylib"
606 DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
608 DNS_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a"
612 DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
616 AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include)
618 saved_cflags="$CFLAGS"
620 CFLAGS="$CFLAGS $DST_OPENSSL_INC"
621 LIBS="$LIBS $DNS_OPENSSL_LIBS"
622 AC_MSG_CHECKING(whether linking with OpenSSL works)
624 #include <openssl/err.h>
630 [AC_MSG_RESULT(yes)],
632 AC_MSG_ERROR(Could not run test program using OpenSSL from
633 $use_openssl/lib and $use_openssl/include.
634 Please check the argument to --with-openssl and your
635 shared library configuration (e.g., LD_LIBRARY_PATH).)],
636 [AC_MSG_RESULT(assuming it does work on target platform)])
638 AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
640 #include <openssl/err.h>],
641 [ DSO_METHOD_dlfcn(); ],
645 #include <openssl/err.h>
646 ],[ DSO_METHOD_dlfcn(); ],
648 DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl"
650 [AC_MSG_RESULT(unknown)
651 AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
652 [AC_MSG_RESULT(assuming it does work on target platform)])
654 [AC_MSG_RESULT(assuming it does work on target platform)]
657 AC_ARG_ENABLE(openssl-version-check,
658 [AC_HELP_STRING([--enable-openssl-version-check],
659 [Check OpenSSL Version @<:@default=yes@:>@])])
660 case "$enable_openssl_version_check" in
662 AC_MSG_CHECKING(OpenSSL library version)
665 #include <openssl/opensslv.h>
667 if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
668 OPENSSL_VERSION_NUMBER < 0x00908000L) ||
669 OPENSSL_VERSION_NUMBER >= 0x0090804fL)
671 printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
672 OPENSSL_VERSION_NUMBER);
673 printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n"
674 "Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n");
679 [AC_MSG_RESULT(not compatible)
682 [AC_MSG_RESULT(assuming target platform has compatible version)])
685 AC_MSG_RESULT(Skipped OpenSSL version check)
689 AC_MSG_CHECKING(for OpenSSL DSA support)
690 if test -f $use_openssl/include/openssl/dsa.h
692 AC_DEFINE(HAVE_OPENSSL_DSA)
697 AC_CHECK_FUNCS(EVP_sha256 EVP_sha512)
698 CFLAGS="$saved_cflags"
700 OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
701 OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
707 # This would include the system openssl path (and linker options to use
708 # it as needed) if it is found.
711 AC_SUBST(USE_OPENSSL)
712 AC_SUBST(DST_OPENSSL_INC)
713 AC_SUBST(OPENSSLLINKOBJS)
714 AC_SUBST(OPENSSLLINKSRCS)
715 DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
718 # PKCS11 (aka crypto hardware) support
720 # This works only with the right OpenSSL with PKCS11 engine!
723 AC_MSG_CHECKING(for PKCS11 support)
725 [ --with-pkcs11 Build with PKCS11 support],
726 use_pkcs11="yes", use_pkcs11="no")
728 case "$use_pkcs11" in
730 AC_MSG_RESULT(disabled)
734 AC_MSG_RESULT(using OpenSSL with PKCS11 support)
735 USE_PKCS11='-DUSE_PKCS11'
741 AC_MSG_CHECKING(for GSSAPI library)
743 [ --with-gssapi=PATH Specify path for system-supplied GSSAPI],
744 use_gssapi="$withval", use_gssapi="no")
746 gssapidirs="/usr/local /usr/pkg /usr/kerberos /usr"
747 if test "$use_gssapi" = "yes"
751 if test -f $d/include/gssapi/gssapi.h -o -f $d/include/gssapi.h
759 case "$use_gssapi" in
761 AC_MSG_RESULT(disabled)
765 AC_MSG_ERROR([--with-gssapi must specify a path])
768 AC_MSG_RESULT(looking in $use_gssapi/lib)
769 USE_GSSAPI='-DGSSAPI'
770 saved_cppflags="$CPPFLAGS"
771 CPPFLAGS="-I$use_gssapi/include $CPPFLAGS"
772 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
773 [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
775 if test "$ISC_PLATFORM_GSSAPIHEADER" = ""; then
776 AC_MSG_ERROR([gssapi.h not found])
779 AC_CHECK_HEADERS(krb5.h krb5/krb5.h kerberosv5/krb5.h,
780 [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"])
782 if test "$ISC_PLATFORM_KRB5HEADER" = ""; then
783 AC_MSG_ERROR([krb5.h not found])
786 CPPFLAGS="$saved_cppflags"
789 # XXXDCL This probably doesn't work right on all systems.
790 # It will need to be worked on as problems become evident.
792 # Essentially the problems here relate to two different
793 # areas. The first area is building with either KTH
794 # or MIT Kerberos, particularly when both are present on
795 # the machine. The other is static versus dynamic linking.
797 # On the KTH vs MIT issue, Both have libkrb5 that can mess
798 # up the works if one implementation ends up trying to
799 # use the other's krb. This is unfortunately a situation
800 # that very easily arises.
802 # Dynamic linking when the dependency information is built
803 # into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
804 # all such problems go away, but when that setup is not
805 # present, because either the dynamic libraries lack
806 # dependencies or static linking is being done, then the
807 # problems start to show up.
811 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
812 "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
814 "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
815 "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
818 # Note that this does not include $saved_libs, because
819 # on FreeBSD machines this configure script has added
820 # -L/usr/local/lib to LIBS, which can make the
821 # -lgssapi_krb5 test succeed with shared libraries even
822 # when you are trying to build with KTH in /usr/lib.
823 LIBS="-L$use_gssapi/lib $TRY_LIBS"
824 AC_MSG_CHECKING(linking as $TRY_LIBS)
825 AC_TRY_LINK( , [gss_acquire_cred();krb5_init_context()],
826 gssapi_linked=yes, gssapi_linked=no)
827 case $gssapi_linked in
828 yes) AC_MSG_RESULT(yes); break ;;
829 no) AC_MSG_RESULT(no) ;;
833 case $gssapi_linked in
834 no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
838 # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib
839 # but MIT in /usr/local/lib and trying to build with KTH.
840 # /usr/local/lib can end up earlier on the link lines.
841 # Like most kludges, this one is not only inelegant it
842 # is also likely to be the wrong thing to do at least as
843 # many times as it is the right thing. Something better
846 if test "$use_gssapi" = "/usr" -a \
847 -f /usr/local/lib/libkrb5.a; then
851 case "$FIX_KTH_VS_MIT" in
853 case "$enable_static_linking" in
854 yes) gssapi_lib_suffix=".a" ;;
855 *) gssapi_lib_suffix=".so" ;;
864 sed -e s%^-l%$use_gssapi/lib/lib% \
865 -e s%$%$gssapi_lib_suffix%`
866 NEW_LIBS="$NEW_LIBS $new_lib"
869 AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
877 DST_GSSAPI_INC="-I$use_gssapi/include"
878 DNS_GSSAPI_LIBS="$LIBS"
880 AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include)
885 AC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
886 AC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
887 AC_SUBST(ISC_PLATFORM_KRB5HEADER)
890 AC_SUBST(DST_GSSAPI_INC)
891 AC_SUBST(DNS_GSSAPI_LIBS)
892 DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS"
895 # Applications linking with libdns also need to link with these libraries.
898 AC_SUBST(DNS_CRYPTO_LIBS)
901 # was --with-randomdev specified?
903 AC_MSG_CHECKING(for random device)
904 AC_ARG_WITH(randomdev,
905 [ --with-randomdev=PATH Specify path for random device],
906 use_randomdev="$withval", use_randomdev="unspec")
908 case "$use_randomdev" in
912 devrandom=/dev/arandom
915 devrandom=/dev/random
918 AC_MSG_RESULT($devrandom)
919 AC_CHECK_FILE($devrandom,
920 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
924 AC_MSG_ERROR([--with-randomdev must specify a path])
927 AC_MSG_RESULT(disabled)
930 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
931 AC_MSG_RESULT(using "$use_randomdev")
936 # Do we have arc4random() ?
938 AC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM))
940 sinclude(config.threads.in)dnl
944 if test "X$GCC" = "Xyes"; then
948 CCOPT="$CCOPT -pthread"
949 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
953 CCOPT="$CCOPT -pthread"
956 LIBS="$LIBS -lthread"
959 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
966 CCOPT="$CCOPT -pthread"
973 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
975 *-sco-sysv*uw*|*-*-sysv*UnixWare*)
977 CCOPT="$CCOPT -Kthread"
981 CCOPT="$CCOPT -Kpthread"
985 ALWAYS_DEFINES="-D_REENTRANT"
986 ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
987 THREADOPTOBJS='${THREADOPTOBJS}'
988 THREADOPTSRCS='${THREADOPTSRCS}'
991 # We'd like to use sigwait() too
993 AC_CHECK_FUNC(sigwait,
994 AC_DEFINE(HAVE_SIGWAIT),
995 AC_CHECK_LIB(c, sigwait,
996 AC_DEFINE(HAVE_SIGWAIT),
997 AC_CHECK_LIB(pthread, sigwait,
998 AC_DEFINE(HAVE_SIGWAIT),
999 AC_CHECK_LIB(pthread, _Psigwait,
1000 AC_DEFINE(HAVE_SIGWAIT),))))
1002 AC_CHECK_FUNC(pthread_attr_getstacksize,
1003 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
1005 AC_CHECK_FUNC(pthread_attr_setstacksize,
1006 AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
1009 # Additional OS-specific issues related to pthreads and sigwait.
1013 # One more place to look for sigwait.
1016 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
1018 *-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
1019 *-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
1020 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1023 AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1028 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
1029 # called before certain pthreads calls. This is deprecated
1032 *-bsdi3.*|*-bsdi4.0*)
1033 AC_DEFINE(NEED_PTHREAD_INIT)
1036 # LinuxThreads requires some changes to the way we
1037 # deal with signals.
1040 AC_DEFINE(HAVE_LINUXTHREADS)
1043 # Ensure the right sigwait() semantics on Solaris and make
1044 # sure we call pthread_setconcurrency.
1047 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
1048 AC_CHECK_FUNC(pthread_setconcurrency,
1049 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
1052 # UnixWare does things its own way.
1054 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1055 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
1060 # Look for sysconf to allow detection of the number of processors.
1062 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
1065 ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
1066 thread_dir=nothreads
1072 AC_SUBST(ALWAYS_DEFINES)
1073 AC_SUBST(ISC_PLATFORM_USETHREADS)
1074 AC_SUBST(THREADOPTOBJS)
1075 AC_SUBST(THREADOPTSRCS)
1076 ISC_THREAD_DIR=$thread_dir
1077 AC_SUBST(ISC_THREAD_DIR)
1080 # was --with-libxml2 specified?
1082 AC_MSG_CHECKING(for libxml2 library)
1083 AC_ARG_WITH(libxml2,
1084 [ --with-libxml2[=PATH] Build with libxml2 library [yes|no|path]],
1085 use_libxml2="$withval", use_libxml2="auto")
1087 case "$use_libxml2" in
1092 case X`(xml2-config --version) 2>/dev/null` in
1094 libxml2_libs=`xml2-config --libs`
1095 libxml2_cflags=`xml2-config --cflags`
1104 if test -f "$use_libxml2/bin/xml2-config" ; then
1105 libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
1106 libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
1111 if test "X$libxml2_libs" != "X"
1114 CFLAGS="$CFLAGS $libxml2_cflags"
1115 LIBS="$LIBS $libxml2_libs"
1116 AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
1122 # In solaris 10, SMF can manage named service
1124 AC_CHECK_LIB(scf, smf_enable_instance)
1127 # flockfile is usually provided by pthreads, but we may want to use it
1128 # even if compiled with --disable-threads. getc_unlocked might also not
1131 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
1132 AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
1135 # Indicate what the final decision was regarding threads.
1137 AC_MSG_CHECKING(whether to build with threads)
1138 if $use_threads; then
1145 # End of pthreads stuff.
1151 AC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
1152 want_largefile="yes", want_largefile="no")
1153 case $want_largefile in
1155 ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1162 # Additional compiler settings.
1166 IRIX_DNSSEC_WARNINGS_HACK=""
1168 if test "X$GCC" = "Xyes"; then
1169 AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
1171 CFLAGS="$CFLAGS -fno-strict-aliasing"
1172 AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
1174 if test "$FNOSTRICTALIASING" = "yes"; then
1176 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
1179 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
1183 LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1195 # The version of the C compiler that constantly warns about
1196 # 'const' as well as alignment issues is unfortunately not
1197 # able to be discerned via the version of the operating
1198 # system, nor does cc have a version flag.
1199 case "`$CC +W 123 2>&1`" in
1204 # Turn off the pointlessly noisy warnings.
1205 STD_CWARNINGS="+w1 +W 474,530,2193,2236"
1208 CCOPT="$CCOPT -Ae -z"
1209 LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1210 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
1213 STD_CWARNINGS="-fullwarn -woff 1209"
1215 # Silence more than 250 instances of
1216 # "prototyped function redeclared without prototype"
1217 # and 11 instances of
1218 # "variable ... was set but never used"
1219 # from lib/dns/sec/openssl.
1221 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
1226 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1234 AC_SUBST(MKDEPCFLAGS)
1236 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
1241 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
1244 # -lxnet buys us one big porting headache... standards, gotta love 'em.
1246 # AC_CHECK_LIB(xnet, socket, ,
1247 # AC_CHECK_LIB(socket, socket)
1250 # Use this for now, instead:
1258 AC_CHECK_LIB(socket, socket)
1259 AC_CHECK_LIB(nsl, inet_addr)
1264 # Work around Solaris's select() limitations.
1267 *-solaris2.[[89]]|*-solaris2.1?)
1268 AC_DEFINE(FD_SETSIZE, 65536,
1269 [Solaris hack to get select_large_fdset.])
1276 AC_MSG_CHECKING(whether to use purify)
1278 [ --with-purify[=PATH] use Rational purify],
1279 use_purify="$withval", use_purify="no")
1281 case "$use_purify" in
1285 AC_PATH_PROG(purify_path, purify, purify)
1288 purify_path="$use_purify"
1292 case "$use_purify" in
1298 if test -f $purify_path || test $purify_path = purify; then
1299 AC_MSG_RESULT($purify_path)
1300 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
1301 PURIFY="$purify_path $PURIFYFLAGS"
1303 AC_MSG_ERROR([$purify_path not found.
1305 Please choose the proper path with the following command:
1307 configure --with-purify=PATH
1316 AC_ARG_WITH(libtool,
1317 [ --with-libtool use GNU libtool],
1318 use_libtool="$withval", use_libtool="no")
1320 case $use_libtool in
1325 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
1326 LIBTOOL_MODE_COMPILE='--mode=compile'
1327 LIBTOOL_MODE_INSTALL='--mode=install'
1328 LIBTOOL_MODE_LINK='--mode=link'
1330 *) LIBTOOL_ALLOW_UNDEFINED= ;;
1333 *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
1334 *) LIBTOOL_IN_MAIN= ;;
1343 LIBTOOL_MODE_COMPILE=
1344 LIBTOOL_MODE_INSTALL=
1346 LIBTOOL_ALLOW_UNDEFINED=
1352 # File name extension for static archive files, for those few places
1353 # where they are treated differently from dynamic ones.
1360 AC_SUBST(LIBTOOL_MKDEP_SED)
1361 AC_SUBST(LIBTOOL_MODE_COMPILE)
1362 AC_SUBST(LIBTOOL_MODE_INSTALL)
1363 AC_SUBST(LIBTOOL_MODE_LINK)
1364 AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
1365 AC_SUBST(LIBTOOL_IN_MAIN)
1368 # Here begins a very long section to determine the system's networking
1369 # capabilities. The order of the tests is significant.
1376 [ --enable-ipv6 use IPv6 [default=autodetect]])
1378 case "$enable_ipv6" in
1380 AC_DEFINE(WANT_IPV6)
1387 # We do the IPv6 compilation checking after libtool so that we can put
1388 # the right suffix on the files.
1390 AC_MSG_CHECKING(for IPv6 structures)
1392 #include <sys/types.h>
1393 #include <sys/socket.h>
1394 #include <netinet/in.h>],
1395 [struct sockaddr_in6 sin6; return (0);],
1402 # See whether IPv6 support is provided via a Kame add-on.
1403 # This is done before other IPv6 linking tests to LIBS is properly set.
1405 AC_MSG_CHECKING(for Kame IPv6 support)
1407 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
1408 use_kame="$withval", use_kame="no")
1414 kame_path=/usr/local/v6
1417 kame_path="$use_kame"
1426 if test -f $kame_path/lib/libinet6.a; then
1427 AC_MSG_RESULT($kame_path/lib/libinet6.a)
1428 LIBS="-L$kame_path/lib -linet6 $LIBS"
1430 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
1432 Please choose the proper path with the following command:
1434 configure --with-kame=PATH
1441 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
1442 # Including it on Kame-using platforms is very bad, though, because
1443 # Kame uses #error against direct inclusion. So include it on only
1444 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
1445 # This is done before the in6_pktinfo check because that's what
1446 # netinet6/in6.h is needed for.
1451 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
1452 LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
1453 isc_netinet6in6_hack="#include <netinet6/in6.h>"
1456 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
1457 LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
1458 isc_netinet6in6_hack=""
1464 # This is similar to the netinet6/in6.h issue.
1467 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1469 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
1470 LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
1471 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
1472 isc_netinetin6_hack="#include <netinet/in6.h>"
1475 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
1476 LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
1477 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
1478 isc_netinetin6_hack=""
1483 # Now delve deeper into the suitability of the IPv6 support.
1485 case "$found_ipv6" in
1487 ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
1488 LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
1490 AC_MSG_CHECKING(for in6_addr)
1492 #include <sys/types.h>
1493 #include <sys/socket.h>
1494 #include <netinet/in.h>
1495 $isc_netinetin6_hack
1496 $isc_netinet6in6_hack
1498 [struct in6_addr in6; return (0);],
1500 ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
1501 LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
1502 isc_in_addr6_hack=""],
1504 ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
1505 LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
1506 isc_in_addr6_hack="#define in6_addr in_addr6"])
1508 AC_MSG_CHECKING(for in6addr_any)
1510 #include <sys/types.h>
1511 #include <sys/socket.h>
1512 #include <netinet/in.h>
1513 $isc_netinetin6_hack
1514 $isc_netinet6in6_hack
1517 [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
1519 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
1520 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
1522 ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
1523 LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
1525 AC_MSG_CHECKING(for in6addr_loopback)
1527 #include <sys/types.h>
1528 #include <sys/socket.h>
1529 #include <netinet/in.h>
1530 $isc_netinetin6_hack
1531 $isc_netinet6in6_hack
1534 [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
1536 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
1537 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
1539 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
1540 LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
1542 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
1544 #include <sys/types.h>
1545 #include <sys/socket.h>
1546 #include <netinet/in.h>
1547 $isc_netinetin6_hack
1548 $isc_netinet6in6_hack
1550 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
1552 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
1553 result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
1555 ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
1556 result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
1557 LWRES_HAVE_SIN6_SCOPE_ID="$result"
1559 AC_MSG_CHECKING(for in6_pktinfo)
1561 #include <sys/types.h>
1562 #include <sys/socket.h>
1563 #include <netinet/in.h>
1564 $isc_netinetin6_hack
1565 $isc_netinet6in6_hack
1567 [struct in6_pktinfo xyzzy; return (0);],
1569 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
1570 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
1571 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
1574 ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
1575 LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
1576 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
1577 LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
1578 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
1579 LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
1580 ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
1582 ISC_IPV6_O="ipv6.$O"
1583 ISC_ISCIPV6_O="unix/ipv6.$O"
1588 AC_SUBST(ISC_PLATFORM_HAVEIPV6)
1589 AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
1590 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
1591 AC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
1592 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
1593 AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
1594 AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
1595 AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
1596 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
1597 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
1598 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
1599 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
1600 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
1601 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
1602 AC_SUBST(ISC_IPV6_H)
1603 AC_SUBST(ISC_IPV6_O)
1604 AC_SUBST(ISC_ISCIPV6_O)
1605 AC_SUBST(ISC_IPV6_C)
1606 AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
1607 AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
1609 AC_MSG_CHECKING([for struct if_laddrreq])
1611 #include <sys/types.h>
1612 #include <net/if6.h>
1613 ],[ struct if_laddrreq a; ],
1615 ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
1617 ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
1618 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
1620 AC_MSG_CHECKING([for struct if_laddrconf])
1622 #include <sys/types.h>
1623 #include <net/if6.h>
1624 ],[ struct if_laddrconf a; ],
1626 ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
1628 ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
1629 AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
1632 # Check for network functions that are often missing. We do this
1633 # after the libtool checking, so we can put the right suffix on
1634 # the files. It also needs to come after checking for a Kame add-on,
1635 # which provides some (all?) of the desired functions.
1638 AC_MSG_CHECKING([for inet_ntop with IPv6 support])
1640 #include <sys/types.h>
1641 #include <sys/socket.h>
1642 #include <netinet/in.h>
1643 #include <arpa/inet.h>
1645 char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
1647 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
1650 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
1651 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
1652 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
1653 [AC_MSG_RESULT(assuming inet_ntop not needed)
1654 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"])
1657 # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
1658 # addresses with less than four octets, like "1.2.3". Also leading
1659 # zeros should also be rejected.
1661 AC_MSG_CHECKING([for working inet_pton with IPv6 support])
1663 #include <sys/types.h>
1664 #include <sys/socket.h>
1665 #include <netinet/in.h>
1666 #include <arpa/inet.h>
1667 main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
1668 inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
1669 (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
1671 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
1673 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
1674 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1675 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
1676 [AC_MSG_RESULT(assuming inet_pton needed)
1677 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
1678 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1679 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
1681 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
1682 AC_SUBST(ISC_PLATFORM_NEEDPTON)
1685 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
1689 # Turn on 4.4BSD style sa_len support.
1690 AC_DEFINE(_SOCKADDR_LEN)
1694 AC_MSG_CHECKING(for sa_len in struct sockaddr)
1696 #include <sys/types.h>
1697 #include <sys/socket.h>],
1698 [struct sockaddr sa; sa.sa_len = 0; return (0);],
1700 ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"
1701 LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"],
1703 ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"
1704 LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"])
1705 AC_SUBST(ISC_PLATFORM_HAVESALEN)
1706 AC_SUBST(LWRES_PLATFORM_HAVESALEN)
1709 # Look for a 4.4BSD or 4.3BSD struct msghdr
1711 AC_MSG_CHECKING(for struct msghdr flavor)
1713 #include <sys/types.h>
1714 #include <sys/socket.h>],
1715 [struct msghdr msg; msg.msg_flags = 0; return (0);],
1716 [AC_MSG_RESULT(4.4BSD)
1717 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
1718 [AC_MSG_RESULT(4.3BSD)
1719 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
1720 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
1723 # Look for in_port_t.
1725 AC_MSG_CHECKING(for type in_port_t)
1727 #include <sys/types.h>
1728 #include <netinet/in.h>],
1729 [in_port_t port = 25; return (0);],
1731 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
1733 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
1734 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
1737 # Check for addrinfo
1739 AC_MSG_CHECKING(for struct addrinfo)
1741 #include <netdb.h>],
1742 [struct addrinfo a; return (0);],
1744 ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"
1745 AC_DEFINE(HAVE_ADDRINFO)],
1747 ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"])
1748 AC_SUBST(ISC_LWRES_NEEDADDRINFO)
1751 # Check for rrsetinfo
1753 AC_MSG_CHECKING(for struct rrsetinfo)
1755 #include <netdb.h>],
1756 [struct rrsetinfo r; return (0);],
1758 ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
1760 ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
1761 AC_SUBST(ISC_LWRES_NEEDRRSETINFO)
1763 AC_MSG_CHECKING(for int sethostent)
1765 #include <netdb.h>],
1766 [int i = sethostent(0); return(0);],
1768 ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"],
1770 ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"])
1771 AC_SUBST(ISC_LWRES_SETHOSTENTINT)
1773 AC_MSG_CHECKING(for int endhostent)
1775 #include <netdb.h>],
1776 [int i = endhostent(); return(0);],
1778 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
1780 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
1781 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
1783 AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
1786 struct netent *getnetbyaddr(in_addr_t, int);],
1789 ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"],
1791 ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"])
1792 AC_SUBST(ISC_LWRES_GETNETBYADDRINADDR)
1794 AC_MSG_CHECKING(for int setnetent)
1796 #include <netdb.h>],
1797 [int i = setnetent(0); return(0);],
1799 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
1801 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
1802 AC_SUBST(ISC_LWRES_SETNETENTINT)
1804 AC_MSG_CHECKING(for int endnetent)
1806 #include <netdb.h>],
1807 [int i = endnetent(); return(0);],
1809 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
1811 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
1812 AC_SUBST(ISC_LWRES_ENDNETENTINT)
1814 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
1817 struct hostent *gethostbyaddr(const void *, size_t, int);],
1820 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
1822 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
1823 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
1825 AC_MSG_CHECKING(for h_errno in netdb.h)
1827 #include <netdb.h>],
1828 [h_errno = 1; return(0);],
1830 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
1832 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
1833 AC_SUBST(ISC_LWRES_NEEDHERRNO)
1835 AC_CHECK_FUNC(getipnodebyname,
1836 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
1837 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
1838 AC_CHECK_FUNC(getnameinfo,
1839 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
1840 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
1841 AC_CHECK_FUNC(getaddrinfo,
1842 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
1843 AC_DEFINE(HAVE_GETADDRINFO)],
1844 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
1845 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
1846 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
1847 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
1848 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
1850 AC_ARG_ENABLE(getifaddrs,
1851 [ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no]].],
1852 want_getifaddrs="$enableval", want_getifaddrs="yes")
1855 # This interface iteration code for getifaddrs() will fall back to using
1856 # /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6
1859 case $want_getifaddrs in
1861 AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required")
1862 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
1865 AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
1872 # Look for a sysctl call to get the list of network interfaces.
1874 case $ac_cv_header_sys_sysctl_h in
1876 AC_MSG_CHECKING(for interface list sysctl)
1877 AC_EGREP_CPP(found_rt_iflist, [
1878 #include <sys/param.h>
1879 #include <sys/sysctl.h>
1880 #include <sys/socket.h>
1881 #ifdef NET_RT_IFLIST
1886 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
1887 [AC_MSG_RESULT(no)])
1892 # Check for some other useful functions that are not ever-present.
1895 # We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC
1896 # because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77
1897 # reportedly defines strsep() without declaring it in <string.h> when
1898 # -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and
1899 # AC_CHECK_FUNC() incorrectly succeeds because it declares
1900 # the function itself.
1901 AC_MSG_CHECKING(for correctly declared strsep())
1902 AC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");],
1903 [AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
1904 [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
1905 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
1907 AC_CHECK_FUNC(memmove,
1908 [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
1909 [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
1910 AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
1912 AC_CHECK_FUNC(strtoul,
1913 [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
1914 LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
1916 [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
1917 LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
1918 GENRANDOMLIB='${ISCLIBS}'])
1919 AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
1920 AC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
1921 AC_SUBST(GENRANDOMLIB)
1923 AC_CHECK_FUNC(strlcpy,
1924 [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
1925 [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
1926 AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
1928 AC_CHECK_FUNC(strlcat,
1929 [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
1930 [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
1931 AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
1935 AC_MSG_CHECKING(sprintf)
1939 [ char buf[2]; return(*sprintf(buf,"x"));],
1941 ISC_PRINT_OBJS="print.$O"
1942 ISC_PRINT_SRCS="print.c"
1943 ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
1944 LWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF"
1946 [ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"
1947 LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"]
1949 AC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
1950 AC_SUBST(LWRES_PLATFORM_NEEDSPRINTF)
1952 AC_CHECK_FUNC(vsnprintf,
1953 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
1954 LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
1955 [ISC_PRINT_OBJS="print.$O"
1956 ISC_PRINT_SRCS="print.c"
1957 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
1958 LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"])
1959 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
1960 AC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF)
1961 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
1962 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
1964 AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
1966 AC_SUBST(ISC_EXTRA_OBJS)
1967 AC_SUBST(ISC_EXTRA_SRCS)
1970 # Use our own SPNEGO implementation?
1972 AC_ARG_ENABLE(isc-spnego,
1973 [ --disable-isc-spnego use SPNEGO from GSSAPI library])
1975 if test -n "$USE_GSSAPI"
1977 case "$enable_isc_spnego" in
1979 USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
1980 DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
1981 DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c"
1982 AC_MSG_RESULT(using SPNEGO from lib/dns)
1985 AC_MSG_RESULT(using SPNEGO from GSSAPI library)
1990 AC_SUBST(USE_ISC_SPNEGO)
1992 AC_SUBST(DST_EXTRA_OBJS)
1993 AC_SUBST(DST_EXTRA_SRCS)
1995 # Determine the printf format characters to use when printing
1996 # values of type isc_int64_t. This will normally be "ll", but where
1997 # the compiler treats "long long" as a alias for "long" and printf
1998 # doesn't know about "long long" use "l". Hopefully the sprintf
1999 # will produce a inconsistent result in the later case. If the compiler
2000 # fails due to seeing "%lld" we fall back to "l".
2002 # Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
2003 # %ld even for (long long)/
2005 # Win32 uses "%I64d", but that's defined elsewhere since we don't use
2006 # configure on Win32.
2008 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
2012 long long int j = 0;
2015 sprintf(buf, "%lld", j);
2016 exit((sizeof(long long int) != sizeof(long int))? 0 :
2017 (strcmp(buf, "0") != 0));
2021 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
2022 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
2024 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
2025 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
2026 [AC_MSG_RESULT(assuming target platform uses ll)
2027 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
2028 LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
2029 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
2030 AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
2035 # Note it is very recommended to *not* disable chroot(),
2036 # this is only because chroot() was made obsolete by Posix.
2037 AC_ARG_ENABLE(chroot,
2038 [ --disable-chroot disable chroot])
2039 case "$enable_chroot" in
2041 AC_CHECK_FUNCS(chroot)
2046 AC_ARG_ENABLE(linux-caps,
2047 [ --disable-linux-caps disable linux capabilities])
2048 case "$enable_linux_caps" in
2050 AC_CHECK_HEADERS(linux/capability.h sys/capability.h)
2051 AC_CHECK_LIB(cap, cap_set_proc)
2056 AC_CHECK_HEADERS(sys/prctl.h)
2058 AC_CHECK_HEADERS(sys/un.h,
2059 ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
2061 ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
2063 AC_SUBST(ISC_PLATFORM_HAVESYSUNH)
2067 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2068 [Define if connect does not honour the permission on the UNIX domain socket.])
2071 AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2072 [Define if connect does not honour the permission on the UNIX domain socket.])
2079 AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
2081 AC_MSG_CHECKING(for optarg declaration)
2086 [AC_MSG_RESULT(yes)],
2088 GEN_NEED_OPTARG="-DNEED_OPTARG=1"
2089 AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
2092 # BSD/OS, and perhaps some others, don't define rlim_t.
2094 AC_MSG_CHECKING(for type rlim_t)
2096 #include <sys/types.h>
2097 #include <sys/time.h>
2098 #include <sys/resource.h>],
2099 [rlim_t rl = 19671212; return (0);],
2101 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
2104 AC_MSG_CHECKING(type of rlim_cur)
2106 #include <sys/types.h>
2107 #include <sys/time.h>
2108 #include <sys/resource.h>
2109 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
2111 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
2114 #include <sys/types.h>
2115 #include <sys/time.h>
2116 #include <sys/resource.h>
2117 main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
2118 [AC_MSG_RESULT(long int)
2119 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
2122 #include <sys/types.h>
2123 #include <sys/time.h>
2124 #include <sys/resource.h>
2125 main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
2126 [AC_MSG_RESULT(long long int)
2127 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
2128 [AC_MSG_ERROR([unable to determine sizeof rlim_cur])
2129 ],[AC_MSG_ERROR(this cannot happen)])
2130 ],[AC_MSG_ERROR(this cannot happen)])
2132 AC_ARG_WITH(rlimtype, , rlimtype="$withval", rlimtype="long long int")
2133 ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE $rlimtype"
2134 AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming $rlimtype)])
2136 AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
2139 # Older HP-UX doesn't have gettune
2143 AC_CHECK_HEADERS(sys/dyntune.h)
2151 # Compaq TruCluster requires more code for handling cluster IP aliases
2155 AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
2156 AC_CHECK_FUNC(clua_getaliasaddress,
2157 AC_DEFINE(HAVE_TRUCLUSTER, 1,
2158 [Define if running under Compaq TruCluster]))
2165 # Some hosts need msg_namelen to match the size of the socket structure.
2166 # Some hosts don't set msg_namelen appropriately on return from recvmsg().
2170 AC_DEFINE(BROKEN_RECVMSG, 1,
2171 [Define if recvmsg() does not meet all of the BSD socket API specifications.])
2176 # Microsoft has their own way of handling shared libraries that requires
2177 # additional qualifiers on extern variables. Unix systems don't need it.
2179 AC_SUBST(ISC_PLATFORM_USEDECLSPEC)
2180 ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
2181 AC_SUBST(LWRES_PLATFORM_USEDECLSPEC)
2182 LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC"
2185 # Random remaining OS-specific issues involving compiler warnings.
2186 # XXXDCL print messages to indicate some compensation is being done?
2188 AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
2189 ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
2193 hack_shutup_pthreadonceinit=yes
2196 hack_shutup_sputaux=yes
2199 hack_shutup_sigwait=yes
2200 hack_shutup_sputaux=yes
2203 hack_shutup_stdargcast=yes
2206 hack_shutup_pthreadonceinit=yes
2208 *-solaris2.1[[0-9]])
2209 AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
2213 case "$hack_shutup_pthreadonceinit" in
2216 # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
2218 ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
2222 case "$hack_shutup_sigwait" in
2225 # Shut up a -Wmissing-prototypes warning for sigwait().
2227 AC_DEFINE(SHUTUP_SIGWAIT)
2231 case "$hack_shutup_sputaux" in
2234 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
2236 AC_DEFINE(SHUTUP_SPUTAUX)
2240 case "$hack_shutup_stdargcast" in
2243 # Shut up a -Wcast-qual warning from va_start().
2245 AC_DEFINE(SHUTUP_STDARG_CAST)
2249 AC_CHECK_HEADERS(strings.h,
2250 ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
2252 ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH"
2254 AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
2257 # Check for if_nametoindex() for IPv6 scoped addresses support
2259 AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
2260 ac_cv_have_if_nametoindex=no)
2261 case $ac_cv_have_if_nametoindex in
2265 AC_CHECK_LIB(ipv6, if_nametoindex,
2266 ac_cv_have_if_nametoindex=yes
2267 LIBS="-lipv6 $LIBS",)
2271 case $ac_cv_have_if_nametoindex in
2273 ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
2276 ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
2279 AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
2281 AC_CHECK_FUNCS(nanosleep)
2284 # Machine architecture dependent features
2286 AC_ARG_ENABLE(atomic,
2287 [ --enable-atomic enable machine specific atomic operations
2288 [[default=autodetect]]],
2289 enable_atomic="$enableval",
2290 enable_atomic="autodetect")
2291 case "$enable_atomic" in
2295 if test "X$GCC" = "Xyes"; then
2296 AC_MSG_CHECKING([if asm("isc"); works])
2298 main() { asm("ics"); exit(0); }
2303 saved_cflags="$CFLAGS"
2304 CFLAGS="$CFLAGS -Wa,-many"
2306 main() { asm("ics"); exit(0); }
2308 [AC_MSG_RESULT([yes, required -Wa,-many])
2310 [AC_MSG_RESULT([no, use_atomic disabled])
2311 CFLAGS="$saved_cflags"
2313 [AC_MSG_RESULT([cross compile, assume yes])
2314 CFLAGS="$saved_cflags"
2333 ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
2334 if test "$use_atomic" = "yes"; then
2335 AC_MSG_CHECKING([architecture type for atomic operations])
2336 have_atomic=yes # set default
2339 # XXX: some old x86 architectures actually do not support
2340 # (some of) these operations. Do we need stricter checks?
2341 AC_CHECK_SIZEOF([void *])
2342 if test $ac_cv_sizeof_void_p = 8; then
2350 AC_CHECK_SIZEOF([void *])
2351 if test $ac_cv_sizeof_void_p = 8; then
2361 powerpc-*|powerpc64-*)
2364 mips-*|mipsel-*|mips64-*|mips64el-*)
2375 AC_MSG_RESULT($arch)
2378 if test "$have_atomic" = "yes"; then
2379 AC_MSG_CHECKING([compiler support for inline assembly code])
2382 # Check whether the compiler supports the assembly syntax we provide.
2383 if test "X$GCC" = "Xyes"; then
2384 # GCC's ASM extension always works
2386 if test $arch = "x86_64"; then
2387 # We can share the same code for gcc with x86_32
2390 if test $arch = "powerpc"; then
2392 # The MacOS (and maybe others) uses "r0" for register
2393 # zero. Under linux/ibm it is "0" for register 0.
2394 # Probe to see if we have a MacOS style assembler.
2396 AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
2398 __asm__ volatile ("li r0, 0x0\n"::);
2402 ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
2403 ], [AC_MSG_RESULT(no)])
2408 # Tru64 compiler has its own syntax for inline
2412 #error "unexpected compiler"
2424 ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
2427 ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
2434 # See if the generic __asm function works. If not,
2435 # we need to disable the atomic operations.
2439 [compiler="standard"
2440 ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
2441 [compiler="not supported (atomic operations disabled)"
2447 AC_MSG_RESULT($compiler)
2450 if test "$have_atomic" = "yes"; then
2451 ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
2452 ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
2453 ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
2455 ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
2456 ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
2457 ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
2460 if test "$have_xaddq" = "yes"; then
2461 ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1"
2463 ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
2466 AC_SUBST(ISC_PLATFORM_HAVEXADD)
2467 AC_SUBST(ISC_PLATFORM_HAVEXADDQ)
2468 AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
2469 AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
2471 AC_SUBST(ISC_PLATFORM_USEGCCASM)
2472 AC_SUBST(ISC_PLATFORM_USEOSFASM)
2473 AC_SUBST(ISC_PLATFORM_USESTDASM)
2474 AC_SUBST(ISC_PLATFORM_USEMACASM)
2477 AC_SUBST(ISC_ARCH_DIR)
2480 # Activate "rrset-order fixed" or not?
2482 AC_ARG_ENABLE(fixed-rrset,
2483 [ --enable-fixed-rrset enable fixed rrset ordering
2485 enable_fixed="$enableval",
2487 case "$enable_fixed" in
2489 AC_DEFINE(DNS_RDATASET_FIXED, 1,
2490 [Define to enable "rrset-order fixed" syntax.])
2499 # The following sets up how non-blocking i/o is established.
2500 # Sunos, cygwin and solaris 2.x (x<5) require special handling.
2503 *-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2504 *-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2505 *-solaris2.[[01234]])
2506 AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
2507 AC_DEFINE(USE_FIONBIO_IOCTL, 1,
2508 [Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
2510 *) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
2511 [Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
2515 # Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
2516 # This prevents the source address being set.
2519 *-solaris2.[[012345]]|*-solaris2.5.1)
2520 AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
2521 [Define if you cannot bind() before connect() for TCP sockets.])
2525 # The following sections deal with tools used for formatting
2526 # the documentation. They are all optional, unless you are
2527 # a developer editing the documentation source.
2534 AC_PATH_PROGS(LATEX, latex, latex)
2537 AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
2544 AC_PATH_PROGS(W3M, w3m, w3m)
2548 # Look for xsltproc (libxslt)
2551 AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
2555 # Look for xmllint (libxml2)
2558 AC_PATH_PROG(XMLLINT, xmllint, xmllint)
2565 AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
2569 # Subroutine for searching for an ordinary file (e.g., a stylesheet)
2570 # in a number of directories:
2572 # NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
2574 # If the file FILENAME is found in one of the DIRECTORIES, the shell
2575 # variable VARIABLE is defined to its absolute pathname. Otherwise,
2576 # it is set to FILENAME, with no directory prefix (that's not terribly
2577 # useful, but looks less confusing in substitutions than leaving it
2578 # empty). The variable VARIABLE will be substituted into output files.
2581 AC_DEFUN(NOM_PATH_FILE, [
2583 AC_MSG_CHECKING(for $2)
2594 if test "X[$]$1" = "X"
2596 AC_MSG_RESULT("not found");
2603 # Look for Docbook-XSL stylesheets. Location probably varies by system.
2604 # If it's not explicitly specified, guess where it might be found, based on
2605 # where SGML stuff lives on some systems (FreeBSD is the only one we're sure
2606 # of at the moment).
2608 AC_MSG_CHECKING(for Docbook-XSL path)
2609 AC_ARG_WITH(docbook-xsl,
2610 [ --with-docbook-xsl=PATH Specify path for Docbook-XSL stylesheets],
2611 docbook_path="$withval", docbook_path="auto")
2612 case "$docbook_path" in
2615 docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook /usr/share/xsl/docbook"
2618 docbook_xsl_trees="$withval"
2619 AC_MSG_RESULT($docbook_xsl_trees)
2624 # Look for stylesheets we need.
2627 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees)
2628 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees)
2629 NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees)
2630 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, html/chunk.xsl, $docbook_xsl_trees)
2631 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, xhtml/chunk.xsl, $docbook_xsl_trees)
2632 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees)
2633 NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees)
2634 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees)
2635 NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees)
2638 # Same dance for db2latex
2640 # No idea where this lives except on FreeBSD.
2643 db2latex_xsl_trees="/usr/local/share"
2646 # Look for stylesheets we need.
2649 NOM_PATH_FILE(XSLT_DB2LATEX_STYLE, db2latex/xsl/docbook.xsl, $db2latex_xsl_trees)
2652 # Look for "admonition" image directory. Can't use NOM_PATH_FILE()
2653 # because it's a directory, so just do the same things, inline.
2656 AC_MSG_CHECKING(for db2latex/xsl/figures)
2657 for d in $db2latex_xsl_trees
2659 dd=$d/db2latex/xsl/figures
2662 XSLT_DB2LATEX_ADMONITIONS=$dd
2667 if test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
2669 AC_MSG_RESULT(not found)
2670 XSLT_DB2LATEX_ADMONITIONS=db2latex/xsl/figures
2672 AC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
2678 [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]],
2679 use_idn="$withval", use_idn="no")
2682 if test X$prefix = XNONE ; then
2697 AC_ARG_WITH(libiconv,
2698 [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]],
2699 use_libiconv="$withval", use_libiconv="no")
2700 case "$use_libiconv" in
2702 if test X$prefix = XNONE ; then
2703 iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
2705 iconvlib="-L$prefix/lib -R$prefix/lib -liconv"
2712 iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
2717 [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]],
2718 iconvlib="$withval")
2729 [ --with-idnlib=ARG specify libidnkit],
2730 idnlib="$withval", idnlib="no")
2731 if test "$idnlib" = yes; then
2732 AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
2736 if test "$use_idn" != no; then
2737 AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.])
2738 STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include"
2739 if test "$idnlib" != no; then
2740 IDNLIBS="$idnlib $iconvlib"
2742 IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib"
2748 # Check whether to build Automated Test Framework unit tests
2751 [ --with-atf=ARG Automated Test Framework support],
2752 atf="$withval", atf="no")
2753 if test "$atf" = yes; then
2757 AC_CONFIG_COMMANDS([atf-config],
2758 [cd unit/atf-src; ${SHELL} ./configure MISSING=: --prefix $atfdir; cd ../..],
2759 [atfdir=`pwd`/unit/atf])
2760 AC_MSG_RESULT(building ATF from bind9/unit/atf-src)
2764 if test "$atf" != no; then
2765 AC_DEFINE(ATF_TEST, 1, [define if ATF unit tests are to be built.])
2766 STD_CINCLUDES="$STD_CINCLUDES -I$atf/include"
2768 ATFLIBS="-L$atf/lib -latf-c"
2775 AC_CHECK_HEADERS(locale.h)
2776 AC_CHECK_FUNCS(setlocale)
2781 AC_SUBST(BIND9_TOP_BUILDDIR)
2782 BIND9_TOP_BUILDDIR=`pwd`
2784 AC_SUBST(BIND9_ISC_BUILDINCLUDE)
2785 AC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
2786 AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
2787 AC_SUBST(BIND9_DNS_BUILDINCLUDE)
2788 AC_SUBST(BIND9_LWRES_BUILDINCLUDE)
2789 AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
2790 if test "X$srcdir" != "X"; then
2791 BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
2792 BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
2793 BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
2794 BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
2795 BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
2796 BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
2798 BIND9_ISC_BUILDINCLUDE=""
2799 BIND9_ISCCC_BUILDINCLUDE=""
2800 BIND9_ISCCFG_BUILDINCLUDE=""
2801 BIND9_DNS_BUILDINCLUDE=""
2802 BIND9_LWRES_BUILDINCLUDE=""
2803 BIND9_BIND9_BUILDINCLUDE=""
2806 AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
2807 BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
2809 AC_SUBST_FILE(BIND9_MAKE_RULES)
2810 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
2813 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}"
2814 AC_SUBST(BIND9_VERSION)
2816 if test -z "$ac_configure_args"; then
2817 BIND9_CONFIGARGS="defaults"
2819 for a in $ac_configure_args
2821 BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
2824 BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
2825 BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
2826 AC_SUBST(BIND9_CONFIGARGS)
2828 AC_SUBST_FILE(LIBISC_API)
2829 LIBISC_API=$srcdir/lib/isc/api
2831 AC_SUBST_FILE(LIBISCCC_API)
2832 LIBISCCC_API=$srcdir/lib/isccc/api
2834 AC_SUBST_FILE(LIBISCCFG_API)
2835 LIBISCCFG_API=$srcdir/lib/isccfg/api
2837 AC_SUBST_FILE(LIBDNS_API)
2838 LIBDNS_API=$srcdir/lib/dns/api
2840 AC_SUBST_FILE(LIBBIND9_API)
2841 LIBBIND9_API=$srcdir/lib/bind9/api
2843 AC_SUBST_FILE(LIBLWRES_API)
2844 LIBLWRES_API=$srcdir/lib/lwres/api
2847 # Configure any DLZ drivers.
2849 # If config.dlz.in selects one or more DLZ drivers, it will set
2850 # USE_DLZ to a non-empty value, which will be our clue to
2851 # enable the DLZ core functions.
2853 # This section has to come after the libtool stuff because it needs to
2854 # know how to name the driver object files.
2858 DLZ_DRIVER_INCLUDES=""
2864 sinclude(contrib/dlz/config.dlz.in)
2866 AC_MSG_CHECKING(for DLZ)
2868 if test -n "$USE_DLZ"
2871 USE_DLZ="-DDLZ $USE_DLZ"
2872 DLZ_DRIVER_RULES=contrib/dlz/drivers/rules
2873 AC_CONFIG_FILES([$DLZ_DRIVER_RULES])
2876 DLZ_DRIVER_RULES=/dev/null
2880 AC_SUBST(DLZ_DRIVER_INCLUDES)
2881 AC_SUBST(DLZ_DRIVER_LIBS)
2882 AC_SUBST(DLZ_DRIVER_SRCS)
2883 AC_SUBST(DLZ_DRIVER_OBJS)
2884 AC_SUBST(DLZ_SYSTEM_TEST)
2885 AC_SUBST_FILE(DLZ_DRIVER_RULES)
2887 if test "$cross_compiling" = "yes"; then
2888 if test -z "$BUILD_CC"; then
2889 AC_ERROR([BUILD_CC not set])
2891 BUILD_CFLAGS="$BUILD_CFLAGS"
2892 BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
2893 BUILD_LDFLAGS="$BUILD_LDFLAGS"
2894 BUILD_LIBS="$BUILD_LIBS"
2897 BUILD_CFLAGS="$CFLAGS"
2898 BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
2899 BUILD_LDFLAGS="$LDFLAGS"
2904 for e in $BUILD_LDFLAGS ; do
2909 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2910 NEWFLAGS="$NEWFLAGS $e $ee"
2913 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2914 NEWFLAGS="$NEWFLAGS $e $ee"
2917 ee=`echo $e | sed -e 's%^-L%-R%'`
2918 NEWFLAGS="$NEWFLAGS $e $ee"
2921 NEWFLAGS="$NEWFLAGS $e"
2926 NEWFLAGS="$NEWFLAGS $e"
2930 BUILD_LDFLAGS="$NEWFLAGS"
2933 for e in $DNS_GSSAPI_LIBS ; do
2938 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2939 NEWFLAGS="$NEWFLAGS $e $ee"
2942 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2943 NEWFLAGS="$NEWFLAGS $e $ee"
2946 ee=`echo $e | sed -e 's%^-L%-R%'`
2947 NEWFLAGS="$NEWFLAGS $e $ee"
2950 NEWFLAGS="$NEWFLAGS $e"
2955 NEWFLAGS="$NEWFLAGS $e"
2959 DNS_GSSAPI_LIBS="$NEWFLAGS"
2962 for e in $DNS_CRYPTO_LIBS ; do
2967 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2968 NEWFLAGS="$NEWFLAGS $e $ee"
2971 ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
2972 NEWFLAGS="$NEWFLAGS $e $ee"
2975 ee=`echo $e | sed -e 's%^-L%-R%'`
2976 NEWFLAGS="$NEWFLAGS $e $ee"
2979 NEWFLAGS="$NEWFLAGS $e"
2984 NEWFLAGS="$NEWFLAGS $e"
2988 DNS_CRYPTO_LIBS="$NEWFLAGS"
2991 AC_SUBST(BUILD_CFLAGS)
2992 AC_SUBST(BUILD_CPPFLAGS)
2993 AC_SUBST(BUILD_LDFLAGS)
2994 AC_SUBST(BUILD_LIBS)
2997 # Commands to run at the end of config.status.
2998 # Don't just put these into configure, it won't work right if somebody
2999 # runs config.status directly (which autoconf allows).
3004 [chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter])
3007 # Files to configure. These are listed here because we used to
3008 # specify them as arguments to AC_OUTPUT. It's (now) ok to move these
3009 # elsewhere if there's a good reason for doing so.
3018 lib/isc/include/Makefile
3019 lib/isc/include/isc/Makefile
3020 lib/isc/include/isc/platform.h
3021 lib/isc/tests/Makefile
3022 lib/isc/unix/Makefile
3023 lib/isc/unix/include/Makefile
3024 lib/isc/unix/include/isc/Makefile
3025 lib/isc/nls/Makefile
3026 lib/isc/$thread_dir/Makefile
3027 lib/isc/$thread_dir/include/Makefile
3028 lib/isc/$thread_dir/include/isc/Makefile
3029 lib/isc/$arch/Makefile
3030 lib/isc/$arch/include/Makefile
3031 lib/isc/$arch/include/isc/Makefile
3033 lib/isccc/include/Makefile
3034 lib/isccc/include/isccc/Makefile
3036 lib/isccfg/include/Makefile
3037 lib/isccfg/include/isccfg/Makefile
3039 lib/dns/include/Makefile
3040 lib/dns/include/dns/Makefile
3041 lib/dns/include/dst/Makefile
3042 lib/dns/tests/Makefile
3044 lib/bind9/include/Makefile
3045 lib/bind9/include/bind9/Makefile
3047 lib/lwres/include/Makefile
3048 lib/lwres/include/lwres/Makefile
3049 lib/lwres/include/lwres/netdb.h
3050 lib/lwres/include/lwres/platform.h
3051 lib/lwres/man/Makefile
3052 lib/lwres/unix/Makefile
3053 lib/lwres/unix/include/Makefile
3054 lib/lwres/unix/include/lwres/Makefile
3056 lib/tests/include/Makefile
3057 lib/tests/include/tests/Makefile
3063 bin/named/unix/Makefile
3065 bin/rndc/unix/Makefile
3067 bin/nsupdate/Makefile
3069 bin/tests/names/Makefile
3070 bin/tests/master/Makefile
3071 bin/tests/rbt/Makefile
3072 bin/tests/db/Makefile
3073 bin/tests/tasks/Makefile
3074 bin/tests/timers/Makefile
3075 bin/tests/dst/Makefile
3076 bin/tests/mem/Makefile
3077 bin/tests/hashes/Makefile
3078 bin/tests/net/Makefile
3079 bin/tests/sockaddr/Makefile
3080 bin/tests/system/Makefile
3081 bin/tests/system/conf.sh
3082 bin/tests/system/dlz/prereq.sh
3083 bin/tests/system/lwresd/Makefile
3084 bin/tests/system/tkey/Makefile
3085 bin/tests/headerdep_test.sh
3092 doc/xsl/isc-docbook-chunk.xsl
3093 doc/xsl/isc-docbook-html.xsl
3094 doc/xsl/isc-docbook-latex.xsl
3095 doc/xsl/isc-manpage.xsl
3096 doc/doxygen/Doxyfile
3097 doc/doxygen/Makefile
3098 doc/doxygen/doxygen-input-filter
3108 # Now that the Makefiles exist we can ensure that everything is rebuilt.
3110 AC_ARG_WITH(make-clean,
3111 [ --with-make-clean Run "make clean" at end of configure [[yes|no]].],
3112 make_clean="$withval", make_clean="yes")
3113 case "$make_clean" in
3119 if test "X$USE_OPENSSL" = "X"; then
3121 BIND is being built without OpenSSL. This means it will not have DNSSEC support.
3125 if test "X$OPENSSL_WARNING" != "X"; then
3127 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3128 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3130 WARNING Your OpenSSL crypto library may be vulnerable to WARNING
3131 WARNING one or more of the the following known security WARNING
3132 WARNING flaws: WARNING
3134 WARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
3135 WARNING CVE-2006-2940. WARNING
3137 WARNING It is recommended that you upgrade to OpenSSL WARNING
3138 WARNING version 0.9.8d/0.9.7l (or greater). WARNING
3140 WARNING You can disable this warning by specifying: WARNING
3142 WARNING --disable-openssl-version-check WARNING
3144 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3145 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3149 # Tell Emacs to edit this file in shell mode.