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.489.22.5 $)
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.
40
lt_cv_sys_max_cmd_len=4096;
48
AC_SUBST(STD_CINCLUDES)
49
AC_SUBST(STD_CDEFINES)
50
AC_SUBST(STD_CWARNINGS)
53
# Warn if the user specified libbind, which is now deprecated
54
AC_ARG_ENABLE(libbind, [ --enable-libbind deprecated])
56
case "$enable_libbind" in
58
AC_MSG_ERROR(['libbind' is no longer part of the BIND 9 distribution.
59
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.
114
# Note: the backtrace feature (see below) uses perl to build the symbol table,
115
# but it still compiles without perl, in which case an empty table will be used.
117
AC_PATH_PROGS(PERL, perl5 perl)
121
# Special processing of paths depending on whether --prefix,
122
# --sysconfdir or --localstatedir arguments were given. What's
123
# desired is some compatibility with the way previous versions
124
# of BIND built; they defaulted to /usr/local for most parts of
125
# the installation, but named.boot/named.conf was in /etc
126
# and named.pid was in /var/run.
128
# So ... if none of --prefix, --sysconfdir or --localstatedir are
129
# specified, set things up that way. If --prefix is given, use
130
# it for sysconfdir and localstatedir the way configure normally
131
# would. To change the prefix for everything but leave named.conf
132
# in /etc or named.pid in /var/run, then do this the usual configure way:
133
# ./configure --prefix=/somewhere --sysconfdir=/etc
134
# ./configure --prefix=/somewhere --localstatedir=/var
136
# To put named.conf and named.pid in /usr/local with everything else,
137
# set the prefix explicitly to /usr/local even though that's the default:
138
# ./configure --prefix=/usr/local
142
case "$sysconfdir" in
147
case "$localstatedir" in
156
# Make sure INSTALL uses an absolute path, else it will be wrong in all
157
# Makefiles, since they use make/rules.in and INSTALL will be adjusted by
158
# configure based on the location of the file where it is substituted.
159
# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
160
# subdirectory of install-sh, This relative path will be wrong for all
161
# directories more than one level down from install-sh.
168
# Not all systems have dirname.
171
ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
174
ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
175
test "$ac_dir" = "$ac_prog" && ac_dir=.
176
test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
177
INSTALL="$ac_dir/$ac_prog"
182
# On these hosts, we really want to use cc, not gcc, even if it is
183
# found. The gcc that these systems have will not correctly handle
186
# However, if the user sets $CC to be something, let that override
189
if test "X$CC" = "X" ; then
195
# Use Sun's cc if it is available, but watch
196
# out for /usr/ucb/cc; it will never be the right
199
# If setting CC here fails, the AC_PROG_CC done
200
# below might still find gcc.
201
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
202
for ac_dir in $PATH; do
203
test -z "$ac_dir" && ac_dir=.
209
if test -f "$ac_dir/cc"; then
230
# gcc's optimiser is broken at -02 for ultrasparc
232
if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
241
# OS dependent CC flags
244
# OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
245
# -D_XOPEN_SOURCE_EXTENDED.
247
STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
248
CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
250
#HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
252
STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
253
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
256
# Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
258
STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
259
CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
261
# POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
262
# parts of the IPv6 Advanced Socket API as a result. This is stupid
263
# as it breaks how the two halves (Basic and Advanced) of the IPv6
264
# Socket API were designed to be used but we have to live with it.
265
# Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
267
STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
268
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
274
AC_CHECK_HEADERS(fcntl.h regex.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h,,,
275
[$ac_includes_default
276
#ifdef HAVE_SYS_PARAM_H
277
# include <sys/param.h>
284
AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
285
AC_C_FLEXIBLE_ARRAY_MEMBER
288
# Older versions of HP/UX don't define seteuid() and setegid()
290
AC_CHECK_FUNCS(seteuid setresuid)
291
AC_CHECK_FUNCS(setegid setresgid)
294
# UnixWare 7.1.1 with the feature supplement to the UDK compiler
295
# is reported to not support "static inline" (RT #1212).
297
AC_MSG_CHECKING(for static inline breakage)
302
static inline int foo1() {
306
static inline int foo2() {
311
AC_DEFINE(inline, )])
314
AC_CHECK_TYPE(ssize_t, int)
315
AC_CHECK_TYPE(uintptr_t,unsigned long)
316
AC_CHECK_TYPE(socklen_t,
317
[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
321
#include <sys/types.h>
322
#include <sys/socket.h>
323
int getsockname(int, struct sockaddr *, size_t *);
325
[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
326
[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
329
#include <sys/types.h>
330
#include <sys/socket.h>
332
AC_SUBST(ISC_SOCKADDR_LEN_T)
334
AC_MSG_CHECKING(for long long)
335
AC_TRY_COMPILE([],[long long i = 0; return (0);],
337
ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
339
ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
340
AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
343
# check for GCC noreturn attribute
345
AC_MSG_CHECKING(for GCC noreturn attribute)
346
AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));],
348
ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
349
ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"],
351
ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
352
ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST"])
353
AC_SUBST(ISC_PLATFORM_NORETURN_PRE)
354
AC_SUBST(ISC_PLATFORM_NORETURN_POST)
357
# check if we have lifconf
359
AC_MSG_CHECKING(for struct lifconf)
361
#include <sys/types.h>
362
#include <sys/socket.h>
366
struct lifconf lifconf;
367
lifconf.lifc_len = 0;
371
ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
373
ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
374
AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
377
# check if we have kqueue
379
AC_ARG_ENABLE(kqueue,
380
[ --enable-kqueue use BSD kqueue when available [[default=yes]]],
381
want_kqueue="$enableval", want_kqueue="yes")
384
AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
385
case $ac_cv_have_kqueue in
387
ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
390
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
395
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
398
AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
401
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
402
# so we need to try running the code, not just test its existence.
405
[ --enable-epoll use Linux epoll when available [[default=auto]]],
406
want_epoll="$enableval", want_epoll="auto")
409
AC_MSG_CHECKING(epoll support)
411
#include <sys/epoll.h>
413
if (epoll_create(1) < 0)
419
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
421
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
424
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
427
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
430
AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
433
# check if we support /dev/poll
435
AC_ARG_ENABLE(devpoll,
436
[ --enable-devpoll use /dev/poll when available [[default=yes]]],
437
want_devpoll="$enableval", want_devpoll="yes")
438
case $want_devpoll in
440
AC_CHECK_HEADERS(sys/devpoll.h,
441
ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
443
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
447
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
450
AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
453
# check if we need to #include sys/select.h explicitly
455
case $ac_cv_header_unistd_h in
457
AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
459
#include <sys/types.h> /* Ultrix */
460
#include <unistd.h>],
461
[fd_set read_set; return (0);],
463
ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
464
LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
466
case $ac_cv_header_sys_select_h in
468
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
469
LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
472
AC_MSG_ERROR([need either working unistd.h or sys/select.h])
478
case $ac_cv_header_sys_select_h in
480
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
481
LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
484
AC_MSG_ERROR([need either unistd.h or sys/select.h])
489
AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
490
AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
493
# Find the machine's endian flavor.
499
# was --with-openssl specified?
502
AC_MSG_CHECKING(for OpenSSL library)
504
[ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
505
(Required for DNSSEC)],
506
use_openssl="$withval", use_openssl="auto")
508
openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
509
if test "$use_openssl" = "auto"
511
for d in $openssldirs
513
if test -f $d/include/openssl/opensslv.h
520
case "$use_openssl" in
530
[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
531
If you don't want OpenSSL, use --without-openssl])
534
if test "$use_openssl" = "yes"
536
# User did not specify a path - guess it
537
for d in $openssldirs
539
if test -f $d/include/openssl/opensslv.h
545
if test "$use_openssl" = "yes"
547
AC_MSG_RESULT(not found)
549
[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
551
elif ! test -f "$use_openssl"/include/openssl/opensslv.h
553
AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found])
555
USE_OPENSSL='-DOPENSSL'
556
if test "$use_openssl" = "/usr"
559
DNS_OPENSSL_LIBS="-lcrypto"
561
DST_OPENSSL_INC="-I$use_openssl/include"
564
DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
567
DNS_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
571
# Apple's ld seaches for serially for dynamic
572
# then static libraries. This means you can't
573
# use -L to override dynamic system libraries
574
# with static ones when linking. Instead
575
# we specify a absolute path.
577
if test -f "$use_openssl/lib/libcrypto.dylib"
579
DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
581
DNS_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a"
585
DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
589
AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include)
591
saved_cflags="$CFLAGS"
593
CFLAGS="$CFLAGS $DST_OPENSSL_INC"
594
LIBS="$LIBS $DNS_OPENSSL_LIBS"
595
AC_MSG_CHECKING(whether linking with OpenSSL works)
597
#include <openssl/err.h>
603
[AC_MSG_RESULT(yes)],
605
AC_MSG_ERROR(Could not run test program using OpenSSL from
606
$use_openssl/lib and $use_openssl/include.
607
Please check the argument to --with-openssl and your
608
shared library configuration (e.g., LD_LIBRARY_PATH).)],
609
[AC_MSG_RESULT(assuming it does work on target platform)])
611
AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
613
#include <openssl/err.h>],
614
[ DSO_METHOD_dlfcn(); ],
618
#include <openssl/err.h>
619
],[ DSO_METHOD_dlfcn(); ],
621
DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl"
623
[AC_MSG_RESULT(unknown)
624
AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
625
[AC_MSG_RESULT(assuming it does work on target platform)])
627
[AC_MSG_RESULT(assuming it does work on target platform)]
630
AC_ARG_ENABLE(openssl-version-check,
631
[AC_HELP_STRING([--enable-openssl-version-check],
632
[Check OpenSSL Version @<:@default=yes@:>@])])
633
case "$enable_openssl_version_check" in
635
AC_MSG_CHECKING(OpenSSL library version)
638
#include <openssl/opensslv.h>
640
if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
641
OPENSSL_VERSION_NUMBER < 0x00908000L) ||
642
OPENSSL_VERSION_NUMBER >= 0x0090804fL)
644
printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
645
OPENSSL_VERSION_NUMBER);
646
printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n"
647
"Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n");
652
[AC_MSG_RESULT(not compatible)
655
[AC_MSG_RESULT(assuming target platform has compatible version)])
658
AC_MSG_RESULT(Skipped OpenSSL version check)
662
AC_MSG_CHECKING(for OpenSSL DSA support)
663
if test -f $use_openssl/include/openssl/dsa.h
665
AC_DEFINE(HAVE_OPENSSL_DSA)
670
AC_CHECK_FUNCS(EVP_sha256 EVP_sha512)
671
CFLAGS="$saved_cflags"
678
# This would include the system openssl path (and linker options to use
679
# it as needed) if it is found.
682
AC_SUBST(USE_OPENSSL)
683
AC_SUBST(DST_OPENSSL_INC)
684
DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
687
# Use OpenSSL for hash functions
690
AC_ARG_ENABLE(openssl-hash,
691
[ --enable-openssl-hash use OpenSSL for hash functions [[default=no]]],
692
want_openssl_hash="$enableval", want_openssl_hash="no")
693
case $want_openssl_hash in
695
if test "$USE_OPENSSL" = ""
697
AC_MSG_ERROR([No OpenSSL for hash functions])
699
ISC_PLATFORM_OPENSSLHASH="#define ISC_PLATFORM_OPENSSLHASH 1"
700
ISC_OPENSSL_INC="$DST_OPENSSL_INC"
703
ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH"
707
AC_SUBST(ISC_PLATFORM_OPENSSLHASH)
708
AC_SUBST(ISC_OPENSSL_INC)
711
# PKCS11 (aka crypto hardware) support
713
# This works only with the right OpenSSL with PKCS11 engine!
716
AC_MSG_CHECKING(for PKCS11 support)
718
[ --with-pkcs11[=PATH] Build with PKCS11 support [yes|no|path]
719
(PATH is for the PKCS11 provider)],
720
use_pkcs11="$withval", use_pkcs11="no")
722
case "$use_pkcs11" in
724
AC_MSG_RESULT(disabled)
729
AC_MSG_RESULT(using OpenSSL with PKCS11 support)
730
USE_PKCS11='-DUSE_PKCS11'
735
AC_SUBST(PKCS11_TOOLS)
737
AC_MSG_CHECKING(for PKCS11 tools)
738
case "$use_pkcs11" in
740
AC_MSG_RESULT(disabled)
741
PKCS11_PROVIDER="undefined"
744
AC_MSG_RESULT(PKCS11 provider is "$use_pkcs11")
745
PKCS11_PROVIDER="$use_pkcs11"
748
AC_SUBST(PKCS11_PROVIDER)
750
AC_MSG_CHECKING(for GSSAPI library)
752
[ --with-gssapi=PATH Specify path for system-supplied GSSAPI],
753
use_gssapi="$withval", use_gssapi="no")
755
gssapidirs="/usr/local /usr/pkg /usr/kerberos /usr"
756
if test "$use_gssapi" = "yes"
760
if test -f $d/include/gssapi/gssapi.h -o -f $d/include/gssapi.h
768
case "$use_gssapi" in
770
AC_MSG_RESULT(disabled)
774
AC_MSG_ERROR([--with-gssapi must specify a path])
777
AC_MSG_RESULT(looking in $use_gssapi/lib)
778
USE_GSSAPI='-DGSSAPI'
779
saved_cppflags="$CPPFLAGS"
780
CPPFLAGS="-I$use_gssapi/include $CPPFLAGS"
781
AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
782
[ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
784
if test "$ISC_PLATFORM_GSSAPIHEADER" = ""; then
785
AC_MSG_ERROR([gssapi.h not found])
788
CPPFLAGS="$saved_cppflags"
791
# XXXDCL This probably doesn't work right on all systems.
792
# It will need to be worked on as problems become evident.
794
# Essentially the problems here relate to two different
795
# areas. The first area is building with either KTH
796
# or MIT Kerberos, particularly when both are present on
797
# the machine. The other is static versus dynamic linking.
799
# On the KTH vs MIT issue, Both have libkrb5 that can mess
800
# up the works if one implementation ends up trying to
801
# use the other's krb. This is unfortunately a situation
802
# that very easily arises.
804
# Dynamic linking when the dependency information is built
805
# into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
806
# all such problems go away, but when that setup is not
807
# present, because either the dynamic libraries lack
808
# dependencies or static linking is being done, then the
809
# problems start to show up.
813
"-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
814
"-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
816
"-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
817
"-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
820
# Note that this does not include $saved_libs, because
821
# on FreeBSD machines this configure script has added
822
# -L/usr/local/lib to LIBS, which can make the
823
# -lgssapi_krb5 test succeed with shared libraries even
824
# when you are trying to build with KTH in /usr/lib.
825
LIBS="-L$use_gssapi/lib $TRY_LIBS"
826
AC_MSG_CHECKING(linking as $TRY_LIBS)
827
AC_TRY_LINK( , [gss_acquire_cred();],
828
gssapi_linked=yes, gssapi_linked=no)
829
case $gssapi_linked in
830
yes) AC_MSG_RESULT(yes); break ;;
831
no) AC_MSG_RESULT(no) ;;
835
case $gssapi_linked in
836
no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
840
# XXXDCL Major kludge. Tries to cope with KTH in /usr/lib
841
# but MIT in /usr/local/lib and trying to build with KTH.
842
# /usr/local/lib can end up earlier on the link lines.
843
# Like most kludges, this one is not only inelegant it
844
# is also likely to be the wrong thing to do at least as
845
# many times as it is the right thing. Something better
848
if test "$use_gssapi" = "/usr" -a \
849
-f /usr/local/lib/libkrb5.a; then
853
case "$FIX_KTH_VS_MIT" in
855
case "$enable_static_linking" in
856
yes) gssapi_lib_suffix=".a" ;;
857
*) gssapi_lib_suffix=".so" ;;
866
sed -e s%^-l%$use_gssapi/lib/lib% \
867
-e s%$%$gssapi_lib_suffix%`
868
NEW_LIBS="$NEW_LIBS $new_lib"
871
AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
879
DST_GSSAPI_INC="-I$use_gssapi/include"
880
DNS_GSSAPI_LIBS="$LIBS"
882
AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include)
887
AC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
888
AC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
891
AC_SUBST(DST_GSSAPI_INC)
892
AC_SUBST(DNS_GSSAPI_LIBS)
893
DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS"
896
# Applications linking with libdns also need to link with these libraries.
899
AC_SUBST(DNS_CRYPTO_LIBS)
902
# was --with-randomdev specified?
904
AC_MSG_CHECKING(for random device)
905
AC_ARG_WITH(randomdev,
906
[ --with-randomdev=PATH Specify path for random device],
907
use_randomdev="$withval", use_randomdev="unspec")
909
case "$use_randomdev" in
913
devrandom=/dev/arandom
916
devrandom=/dev/random
919
AC_MSG_RESULT($devrandom)
920
AC_CHECK_FILE($devrandom,
921
AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
925
AC_MSG_ERROR([--with-randomdev must specify a path])
928
AC_MSG_RESULT(disabled)
931
AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
932
AC_MSG_RESULT(using "$use_randomdev")
937
# Do we have arc4random() ?
939
AC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM))
941
sinclude(config.threads.in)dnl
945
if test "X$GCC" = "Xyes"; then
949
CCOPT="$CCOPT -pthread"
950
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
954
CCOPT="$CCOPT -pthread"
957
LIBS="$LIBS -lthread"
960
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
967
CCOPT="$CCOPT -pthread"
974
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
976
*-sco-sysv*uw*|*-*-sysv*UnixWare*)
978
CCOPT="$CCOPT -Kthread"
982
CCOPT="$CCOPT -Kpthread"
986
ALWAYS_DEFINES="-D_REENTRANT"
987
ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
990
# We'd like to use sigwait() too
992
AC_CHECK_FUNC(sigwait,
993
AC_DEFINE(HAVE_SIGWAIT),
994
AC_CHECK_LIB(c, sigwait,
995
AC_DEFINE(HAVE_SIGWAIT),
996
AC_CHECK_LIB(pthread, sigwait,
997
AC_DEFINE(HAVE_SIGWAIT),
998
AC_CHECK_LIB(pthread, _Psigwait,
999
AC_DEFINE(HAVE_SIGWAIT),))))
1001
AC_CHECK_FUNC(pthread_attr_getstacksize,
1002
AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
1004
AC_CHECK_FUNC(pthread_attr_setstacksize,
1005
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
1008
# Additional OS-specific issues related to pthreads and sigwait.
1012
# One more place to look for sigwait.
1015
AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
1017
*-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
1018
*-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
1019
AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1022
AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
1027
# BSDI 3.0 through 4.0.1 needs pthread_init() to be
1028
# called before certain pthreads calls. This is deprecated
1031
*-bsdi3.*|*-bsdi4.0*)
1032
AC_DEFINE(NEED_PTHREAD_INIT)
1035
# LinuxThreads requires some changes to the way we
1036
# deal with signals.
1039
AC_DEFINE(HAVE_LINUXTHREADS)
1042
# Ensure the right sigwait() semantics on Solaris and make
1043
# sure we call pthread_setconcurrency.
1046
AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
1047
AC_CHECK_FUNC(pthread_setconcurrency,
1048
AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
1051
# UnixWare does things its own way.
1053
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1054
AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
1059
# Look for sysconf to allow detection of the number of processors.
1061
AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
1064
ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
1065
thread_dir=nothreads
1069
AC_SUBST(ALWAYS_DEFINES)
1070
AC_SUBST(ISC_PLATFORM_USETHREADS)
1071
ISC_THREAD_DIR=$thread_dir
1072
AC_SUBST(ISC_THREAD_DIR)
1075
# was --with-libxml2 specified?
1077
AC_MSG_CHECKING(for libxml2 library)
1078
AC_ARG_WITH(libxml2,
1079
[ --with-libxml2[=PATH] Build with libxml2 library [yes|no|path]],
1080
use_libxml2="$withval", use_libxml2="auto")
1082
case "$use_libxml2" in
1087
case X`(xml2-config --version) 2>/dev/null` in
1089
libxml2_libs=`xml2-config --libs`
1090
libxml2_cflags=`xml2-config --cflags`
1099
if test -f "$use_libxml2/bin/xml2-config" ; then
1100
libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
1101
libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
1106
if test "X$libxml2_libs" != "X"
1109
CFLAGS="$CFLAGS $libxml2_cflags"
1110
LIBS="$LIBS $libxml2_libs"
1111
AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
1117
# In solaris 10, SMF can manage named service
1119
AC_CHECK_LIB(scf, smf_enable_instance)
1122
# flockfile is usually provided by pthreads, but we may want to use it
1123
# even if compiled with --disable-threads. getc_unlocked might also not
1126
AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
1127
AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
1130
# Indicate what the final decision was regarding threads.
1132
AC_MSG_CHECKING(whether to build with threads)
1133
if $use_threads; then
1140
# End of pthreads stuff.
1146
AC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
1147
want_largefile="yes", want_largefile="no")
1148
case $want_largefile in
1150
ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1157
# Additional compiler settings.
1161
IRIX_DNSSEC_WARNINGS_HACK=""
1163
if test "X$GCC" = "Xyes"; then
1164
AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
1166
CFLAGS="$CFLAGS -fno-strict-aliasing"
1167
AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
1169
if test "$FNOSTRICTALIASING" = "yes"; then
1171
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
1174
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
1178
LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1190
# The version of the C compiler that constantly warns about
1191
# 'const' as well as alignment issues is unfortunately not
1192
# able to be discerned via the version of the operating
1193
# system, nor does cc have a version flag.
1194
case "`$CC +W 123 2>&1`" in
1199
# Turn off the pointlessly noisy warnings.
1200
STD_CWARNINGS="+w1 +W 474,530,2193,2236"
1203
CCOPT="$CCOPT -Ae -z"
1204
LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
1205
MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
1208
STD_CWARNINGS="-fullwarn -woff 1209"
1210
# Silence more than 250 instances of
1211
# "prototyped function redeclared without prototype"
1212
# and 11 instances of
1213
# "variable ... was set but never used"
1214
# from lib/dns/sec/openssl.
1216
IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
1221
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1229
AC_SUBST(MKDEPCFLAGS)
1231
AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
1236
AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
1239
# -lxnet buys us one big porting headache... standards, gotta love 'em.
1241
# AC_CHECK_LIB(xnet, socket, ,
1242
# AC_CHECK_LIB(socket, socket)
1245
# Use this for now, instead:
1253
AC_CHECK_LIB(socket, socket)
1254
AC_CHECK_LIB(nsl, inet_addr)
1259
# Work around Solaris's select() limitations.
1262
*-solaris2.[[89]]|*-solaris2.1?)
1263
AC_DEFINE(FD_SETSIZE, 65536,
1264
[Solaris hack to get select_large_fdset.])
1271
AC_MSG_CHECKING(whether to use purify)
1273
[ --with-purify[=PATH] use Rational purify],
1274
use_purify="$withval", use_purify="no")
1276
case "$use_purify" in
1280
AC_PATH_PROG(purify_path, purify, purify)
1283
purify_path="$use_purify"
1287
case "$use_purify" in
1293
if test -f $purify_path || test $purify_path = purify; then
1294
AC_MSG_RESULT($purify_path)
1295
PURIFYFLAGS="`echo $PURIFYOPTIONS`"
1296
PURIFY="$purify_path $PURIFYFLAGS"
1298
AC_MSG_ERROR([$purify_path not found.
1300
Please choose the proper path with the following command:
1302
configure --with-purify=PATH
1311
AC_ARG_WITH(libtool,
1312
[ --with-libtool use GNU libtool],
1313
use_libtool="$withval", use_libtool="no")
1315
case $use_libtool in
1320
LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
1321
LIBTOOL_MODE_COMPILE='--mode=compile'
1322
LIBTOOL_MODE_INSTALL='--mode=install'
1323
LIBTOOL_MODE_LINK='--mode=link'
1325
*) LIBTOOL_ALLOW_UNDEFINED= ;;
1328
*-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
1329
*) LIBTOOL_IN_MAIN= ;;
1338
LIBTOOL_MODE_COMPILE=
1339
LIBTOOL_MODE_INSTALL=
1341
LIBTOOL_ALLOW_UNDEFINED=
1347
# enable/disable dumping stack backtrace. Also check if the system supports
1348
# glibc-compatible backtrace() function.
1350
AC_ARG_ENABLE(backtrace,
1351
[ --enable-backtrace log stack backtrace on abort [[default=yes]]],
1352
want_backtrace="$enableval", want_backtrace="yes")
1353
case $want_backtrace in
1355
ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1"
1356
AC_TRY_LINK([#include <execinfo.h>],
1357
[return (backtrace((void **)0, 0));],
1358
[AC_DEFINE([HAVE_LIBCTRACE], [], [if system have backtrace function])],)
1361
ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE"
1364
AC_SUBST(ISC_PLATFORM_USEBACKTRACE)
1366
AC_ARG_ENABLE(symtable,
1367
[ --enable-symtable use internal symbol table for backtrace
1368
[[all|minimal(default)|none]]],
1369
want_symtable="$enableval", want_symtable="minimal")
1370
case $want_symtable in
1371
yes|all|minimal) # "yes" is a hidden value equivalent to "minimal"
1372
if test "$PERL" = ""
1374
AC_MSG_ERROR([Internal symbol table requires perl but no perl is found.
1375
Install perl or explicitly disable the feature by --disable-symtable.])
1377
if test "$use_libtool" = "yes"; then
1378
AC_MSG_WARN([Internal symbol table does not work with libtool. Disabling symbol table.])
1380
# we generate the internal symbol table only for those systems
1381
# known to work to avoid unexpected build failure. Also, warn
1382
# about unsupported systems when the feature is enabled
1385
freebsd*|netbsd*|openbsd*|linux*|solaris*|darwin*)
1386
MKSYMTBL_PROGRAM="$PERL"
1387
if test $want_symtable = all; then
1388
ALWAYS_MAKE_SYMTABLE="yes"
1392
if test $want_symtable = yes -o $want_symtable = all
1394
AC_MSG_WARN([this system is not known to generate internal symbol table safely; disabling it])
1402
AC_SUBST(MKSYMTBL_PROGRAM)
1403
AC_SUBST(ALWAYS_MAKE_SYMTABLE)
1406
# File name extension for static archive files, for those few places
1407
# where they are treated differently from dynamic ones.
1414
AC_SUBST(LIBTOOL_MKDEP_SED)
1415
AC_SUBST(LIBTOOL_MODE_COMPILE)
1416
AC_SUBST(LIBTOOL_MODE_INSTALL)
1417
AC_SUBST(LIBTOOL_MODE_LINK)
1418
AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
1419
AC_SUBST(LIBTOOL_IN_MAIN)
1422
# build exportable DNS library?
1424
AC_ARG_ENABLE(exportlib,
1425
[ --enable-exportlib build exportable library (GNU make required)
1427
case "$enable_exportlib" in
1430
for x in gmake gnumake make; do
1431
if $x --version 2>/dev/null | grep GNU > /dev/null; then
1436
if test -z "$gmake"; then
1437
AC_MSG_ERROR([exportlib requires GNU make. Install it or disable the feature.])
1439
LIBEXPORT=lib/export
1441
BIND9_CO_RULE="%.$O: \${srcdir}/%.c"
1444
BIND9_CO_RULE=".c.$O:"
1447
AC_SUBST(BIND9_CO_RULE)
1449
AC_ARG_WITH(export-libdir,
1450
[ --with-export-libdir[=PATH]
1451
installation directory for the export library
1452
[[EPREFIX/lib/bind9]]],
1453
export_libdir="$withval",)
1454
if test -z "$export_libdir"; then
1455
export_libdir="\${exec_prefix}/lib/bind9/"
1457
AC_SUBST(export_libdir)
1459
AC_ARG_WITH(export-includedir,
1460
[ --with-export-includedir[=PATH]
1461
installation directory for the header files of the
1462
export library [[PREFIX/include/bind9]]],
1463
export_includedir="$withval",)
1464
if test -z "$export_includedir"; then
1465
export_includedir="\${prefix}/include/bind9/"
1467
AC_SUBST(export_includedir)
1470
# Here begins a very long section to determine the system's networking
1471
# capabilities. The order of the tests is significant.
1478
[ --enable-ipv6 use IPv6 [default=autodetect]])
1480
case "$enable_ipv6" in
1482
AC_DEFINE(WANT_IPV6)
1489
# We do the IPv6 compilation checking after libtool so that we can put
1490
# the right suffix on the files.
1492
AC_MSG_CHECKING(for IPv6 structures)
1494
#include <sys/types.h>
1495
#include <sys/socket.h>
1496
#include <netinet/in.h>],
1497
[struct sockaddr_in6 sin6; return (0);],
1504
# See whether IPv6 support is provided via a Kame add-on.
1505
# This is done before other IPv6 linking tests to LIBS is properly set.
1507
AC_MSG_CHECKING(for Kame IPv6 support)
1509
[ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
1510
use_kame="$withval", use_kame="no")
1516
kame_path=/usr/local/v6
1519
kame_path="$use_kame"
1528
if test -f $kame_path/lib/libinet6.a; then
1529
AC_MSG_RESULT($kame_path/lib/libinet6.a)
1530
LIBS="-L$kame_path/lib -linet6 $LIBS"
1532
AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
1534
Please choose the proper path with the following command:
1536
configure --with-kame=PATH
1543
# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
1544
# Including it on Kame-using platforms is very bad, though, because
1545
# Kame uses #error against direct inclusion. So include it on only
1546
# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
1547
# This is done before the in6_pktinfo check because that's what
1548
# netinet6/in6.h is needed for.
1553
ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
1554
LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
1555
isc_netinet6in6_hack="#include <netinet6/in6.h>"
1558
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
1559
LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
1560
isc_netinet6in6_hack=""
1566
# This is similar to the netinet6/in6.h issue.
1569
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
1571
ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
1572
LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
1573
ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
1574
isc_netinetin6_hack="#include <netinet/in6.h>"
1577
ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
1578
LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
1579
ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
1580
isc_netinetin6_hack=""
1585
# Now delve deeper into the suitability of the IPv6 support.
1587
case "$found_ipv6" in
1589
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
1590
LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
1592
AC_MSG_CHECKING(for in6_addr)
1594
#include <sys/types.h>
1595
#include <sys/socket.h>
1596
#include <netinet/in.h>
1597
$isc_netinetin6_hack
1598
$isc_netinet6in6_hack
1600
[struct in6_addr in6; return (0);],
1602
ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
1603
LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
1604
isc_in_addr6_hack=""],
1606
ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
1607
LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
1608
isc_in_addr6_hack="#define in6_addr in_addr6"])
1610
AC_MSG_CHECKING(for in6addr_any)
1612
#include <sys/types.h>
1613
#include <sys/socket.h>
1614
#include <netinet/in.h>
1615
$isc_netinetin6_hack
1616
$isc_netinet6in6_hack
1619
[struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
1621
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
1622
LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
1624
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
1625
LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
1627
AC_MSG_CHECKING(for in6addr_loopback)
1629
#include <sys/types.h>
1630
#include <sys/socket.h>
1631
#include <netinet/in.h>
1632
$isc_netinetin6_hack
1633
$isc_netinet6in6_hack
1636
[struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
1638
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
1639
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
1641
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
1642
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
1644
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
1646
#include <sys/types.h>
1647
#include <sys/socket.h>
1648
#include <netinet/in.h>
1649
$isc_netinetin6_hack
1650
$isc_netinet6in6_hack
1652
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
1654
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
1655
result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
1657
ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
1658
result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
1659
LWRES_HAVE_SIN6_SCOPE_ID="$result"
1661
AC_MSG_CHECKING(for in6_pktinfo)
1663
#include <sys/types.h>
1664
#include <sys/socket.h>
1665
#include <netinet/in.h>
1666
$isc_netinetin6_hack
1667
$isc_netinet6in6_hack
1669
[struct in6_pktinfo xyzzy; return (0);],
1671
ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
1672
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)
1673
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
1676
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
1677
LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
1678
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
1679
LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
1680
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
1681
LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
1682
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
1684
ISC_IPV6_O="ipv6.$O"
1685
ISC_ISCIPV6_O="unix/ipv6.$O"
1690
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
1691
AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
1692
AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
1693
AC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
1694
AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
1695
AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
1696
AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
1697
AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
1698
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
1699
AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
1700
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
1701
AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
1702
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
1703
AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
1704
AC_SUBST(ISC_IPV6_H)
1705
AC_SUBST(ISC_IPV6_O)
1706
AC_SUBST(ISC_ISCIPV6_O)
1707
AC_SUBST(ISC_IPV6_C)
1708
AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
1709
AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
1711
AC_MSG_CHECKING([for struct if_laddrreq])
1713
#include <sys/types.h>
1714
#include <net/if6.h>
1715
],[ struct if_laddrreq a; ],
1717
ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
1719
ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
1720
AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
1722
AC_MSG_CHECKING([for struct if_laddrconf])
1724
#include <sys/types.h>
1725
#include <net/if6.h>
1726
],[ struct if_laddrconf a; ],
1728
ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
1730
ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
1731
AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
1734
# Check for network functions that are often missing. We do this
1735
# after the libtool checking, so we can put the right suffix on
1736
# the files. It also needs to come after checking for a Kame add-on,
1737
# which provides some (all?) of the desired functions.
1740
AC_MSG_CHECKING([for inet_ntop with IPv6 support])
1742
#include <sys/types.h>
1743
#include <sys/socket.h>
1744
#include <netinet/in.h>
1745
#include <arpa/inet.h>
1747
char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
1749
ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
1752
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
1753
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
1754
ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
1755
[AC_MSG_RESULT(assuming inet_ntop needed)
1756
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
1757
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
1758
ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
1761
# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
1762
# addresses with less than four octets, like "1.2.3". Also leading
1763
# zeros should also be rejected.
1765
AC_MSG_CHECKING([for working inet_pton with IPv6 support])
1767
#include <sys/types.h>
1768
#include <sys/socket.h>
1769
#include <netinet/in.h>
1770
#include <arpa/inet.h>
1771
main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
1772
inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
1773
(inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
1775
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
1777
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
1778
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1779
ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
1780
[AC_MSG_RESULT(assuming target platform has working inet_pton)
1781
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
1782
[AC_MSG_RESULT(assuming inet_pton needed)
1783
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
1784
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1785
ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
1786
[AC_MSG_RESULT(assuming target platform has working inet_pton)
1787
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
1789
AC_SUBST(ISC_PLATFORM_NEEDNTOP)
1790
AC_SUBST(ISC_PLATFORM_NEEDPTON)
1793
# Look for a 4.4BSD-style sa_len member in struct sockaddr.
1797
# Turn on 4.4BSD style sa_len support.
1798
AC_DEFINE(_SOCKADDR_LEN)
1802
AC_MSG_CHECKING(for sa_len in struct sockaddr)
1804
#include <sys/types.h>
1805
#include <sys/socket.h>],
1806
[struct sockaddr sa; sa.sa_len = 0; return (0);],
1808
ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"
1809
LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"],
1811
ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"
1812
LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"])
1813
AC_SUBST(ISC_PLATFORM_HAVESALEN)
1814
AC_SUBST(LWRES_PLATFORM_HAVESALEN)
1817
# Look for a 4.4BSD or 4.3BSD struct msghdr
1819
AC_MSG_CHECKING(for struct msghdr flavor)
1821
#include <sys/types.h>
1822
#include <sys/socket.h>],
1823
[struct msghdr msg; msg.msg_flags = 0; return (0);],
1824
[AC_MSG_RESULT(4.4BSD)
1825
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
1826
[AC_MSG_RESULT(4.3BSD)
1827
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
1828
AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
1831
# Look for in_port_t.
1833
AC_MSG_CHECKING(for type in_port_t)
1835
#include <sys/types.h>
1836
#include <netinet/in.h>],
1837
[in_port_t port = 25; return (0);],
1839
ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
1841
ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
1842
AC_SUBST(ISC_PLATFORM_NEEDPORTT)
1845
# Check for addrinfo
1847
AC_MSG_CHECKING(for struct addrinfo)
1849
#include <netdb.h>],
1850
[struct addrinfo a; return (0);],
1852
ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"
1853
ISC_IRS_NEEDADDRINFO="#undef ISC_IRS_NEEDADDRINFO"
1854
AC_DEFINE(HAVE_ADDRINFO)],
1856
ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"
1857
ISC_IRS_NEEDADDRINFO="#define ISC_IRS_NEEDADDRINFO 1"])
1858
AC_SUBST(ISC_LWRES_NEEDADDRINFO)
1859
AC_SUBST(ISC_IRS_NEEDADDRINFO)
1862
# Check for rrsetinfo
1864
AC_MSG_CHECKING(for struct rrsetinfo)
1866
#include <netdb.h>],
1867
[struct rrsetinfo r; return (0);],
1869
ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
1871
ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
1872
AC_SUBST(ISC_LWRES_NEEDRRSETINFO)
1874
AC_MSG_CHECKING(for int sethostent)
1876
#include <netdb.h>],
1877
[int i = sethostent(0); return(0);],
1879
ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"],
1881
ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"])
1882
AC_SUBST(ISC_LWRES_SETHOSTENTINT)
1884
AC_MSG_CHECKING(for int endhostent)
1886
#include <netdb.h>],
1887
[int i = endhostent(); return(0);],
1889
ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
1891
ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
1892
AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
1894
AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
1897
struct netent *getnetbyaddr(in_addr_t, int);],
1900
ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"],
1902
ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"])
1903
AC_SUBST(ISC_LWRES_GETNETBYADDRINADDR)
1905
AC_MSG_CHECKING(for int setnetent)
1907
#include <netdb.h>],
1908
[int i = setnetent(0); return(0);],
1910
ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
1912
ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
1913
AC_SUBST(ISC_LWRES_SETNETENTINT)
1915
AC_MSG_CHECKING(for int endnetent)
1917
#include <netdb.h>],
1918
[int i = endnetent(); return(0);],
1920
ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
1922
ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
1923
AC_SUBST(ISC_LWRES_ENDNETENTINT)
1925
AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
1928
struct hostent *gethostbyaddr(const void *, size_t, int);],
1931
ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
1933
ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
1934
AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
1936
AC_MSG_CHECKING(for h_errno in netdb.h)
1938
#include <netdb.h>],
1939
[h_errno = 1; return(0);],
1941
ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
1943
ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
1944
AC_SUBST(ISC_LWRES_NEEDHERRNO)
1947
# Sadly, the definitions of system-supplied getnameinfo(3) vary. Try to catch
1948
# known variations here:
1950
AC_MSG_CHECKING(for getnameinfo prototype definitions)
1952
#include <sys/types.h>
1953
#include <sys/socket.h>
1955
int getnameinfo(const struct sockaddr *, socklen_t, char *,
1956
socklen_t, char *, socklen_t, unsigned int);],
1958
[AC_MSG_RESULT(socklen_t for buflen; u_int for flags)
1959
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t,
1960
[Define to the buffer length type used by getnameinfo(3).])
1961
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int,
1962
[Define to the flags type used by getnameinfo(3).])],
1964
#include <sys/types.h>
1965
#include <sys/socket.h>
1967
int getnameinfo(const struct sockaddr *, socklen_t, char *,
1968
size_t, char *, size_t, int);],
1970
[AC_MSG_RESULT(size_t for buflen; int for flags)
1971
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
1972
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
1973
[AC_MSG_RESULT(not match any subspecies; assume standard definition)
1974
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
1975
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])
1978
# ...and same for gai_strerror().
1980
AC_MSG_CHECKING(for gai_strerror prototype definitions)
1982
#include <sys/types.h>
1983
#include <sys/socket.h>
1985
char *gai_strerror(int ecode);],
1987
[AC_MSG_RESULT(returning char *)
1988
AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [char *],
1989
[return type of gai_strerror])],
1990
[AC_MSG_RESULT(not match any subspecies; assume standard definition)
1991
AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [const char *])])
1993
AC_CHECK_FUNC(getipnodebyname,
1994
[ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
1995
[ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
1996
AC_CHECK_FUNC(getnameinfo,
1997
[ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
1998
[ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
1999
AC_CHECK_FUNC(getaddrinfo,
2000
[ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
2001
AC_DEFINE(HAVE_GETADDRINFO)],
2002
[ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
2003
AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
2004
AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
2005
AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
2006
AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
2007
AC_SUBST(ISC_IRS_GETNAMEINFOSOCKLEN)
2009
AC_ARG_ENABLE(getifaddrs,
2010
[ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no]].],
2011
want_getifaddrs="$enableval", want_getifaddrs="yes")
2014
# This interface iteration code for getifaddrs() will fall back to using
2015
# /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6
2018
case $want_getifaddrs in
2020
AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required")
2021
AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
2024
AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
2031
# Look for a sysctl call to get the list of network interfaces.
2033
case $ac_cv_header_sys_sysctl_h in
2035
AC_MSG_CHECKING(for interface list sysctl)
2036
AC_EGREP_CPP(found_rt_iflist, [
2037
#include <sys/param.h>
2038
#include <sys/sysctl.h>
2039
#include <sys/socket.h>
2040
#ifdef NET_RT_IFLIST
2045
AC_DEFINE(HAVE_IFLIST_SYSCTL)],
2046
[AC_MSG_RESULT(no)])
2051
# Check for some other useful functions that are not ever-present.
2054
# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC
2055
# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77
2056
# reportedly defines strsep() without declaring it in <string.h> when
2057
# -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and
2058
# AC_CHECK_FUNC() incorrectly succeeds because it declares
2059
# the function itself.
2060
AC_MSG_CHECKING(for correctly declared strsep())
2061
AC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");],
2062
[AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
2063
[AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
2064
AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
2066
AC_CHECK_FUNC(memmove,
2067
[ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
2068
[ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
2069
AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
2071
AC_CHECK_FUNC(strtoul,
2072
[ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
2073
LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
2075
[ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
2076
LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
2077
GENRANDOMLIB='${ISCLIBS}'])
2078
AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
2079
AC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
2080
AC_SUBST(GENRANDOMLIB)
2082
AC_CHECK_FUNC(strlcpy,
2083
[ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
2084
[ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
2085
AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
2087
AC_CHECK_FUNC(strlcat,
2088
[ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
2089
[ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
2090
AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
2094
AC_MSG_CHECKING(sprintf)
2098
[ char buf[2]; return(*sprintf(buf,"x"));],
2100
ISC_PRINT_OBJS="print.$O"
2101
ISC_PRINT_SRCS="print.c"
2102
ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
2103
LWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF"
2105
[ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"
2106
LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"]
2108
AC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
2109
AC_SUBST(LWRES_PLATFORM_NEEDSPRINTF)
2111
AC_CHECK_FUNC(vsnprintf,
2112
[ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
2113
LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
2114
[ISC_PRINT_OBJS="print.$O"
2115
ISC_PRINT_SRCS="print.c"
2116
ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
2117
LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"])
2118
AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
2119
AC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF)
2120
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
2121
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
2123
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
2125
AC_SUBST(ISC_EXTRA_OBJS)
2126
AC_SUBST(ISC_EXTRA_SRCS)
2129
# Use our own SPNEGO implementation?
2131
AC_ARG_ENABLE(isc-spnego,
2132
[ --disable-isc-spnego use SPNEGO from GSSAPI library])
2134
if test -n "$USE_GSSAPI"
2136
case "$enable_isc_spnego" in
2138
USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
2139
DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
2140
DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c"
2141
AC_MSG_RESULT(using SPNEGO from lib/dns)
2144
AC_MSG_RESULT(using SPNEGO from GSSAPI library)
2149
AC_SUBST(USE_ISC_SPNEGO)
2151
AC_SUBST(DST_EXTRA_OBJS)
2152
AC_SUBST(DST_EXTRA_SRCS)
2154
# Determine the printf format characters to use when printing
2155
# values of type isc_int64_t. This will normally be "ll", but where
2156
# the compiler treats "long long" as a alias for "long" and printf
2157
# doesn't know about "long long" use "l". Hopefully the sprintf
2158
# will produce a inconsistent result in the later case. If the compiler
2159
# fails due to seeing "%lld" we fall back to "l".
2161
# Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
2162
# %ld even for (long long)/
2164
# Win32 uses "%I64d", but that's defined elsewhere since we don't use
2165
# configure on Win32.
2167
AC_MSG_CHECKING(printf format modifier for 64-bit integers)
2171
long long int j = 0;
2174
sprintf(buf, "%lld", j);
2175
exit((sizeof(long long int) != sizeof(long int))? 0 :
2176
(strcmp(buf, "0") != 0));
2180
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
2181
LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
2183
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
2184
LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
2185
[AC_MSG_RESULT(assuming target platform uses ll)
2186
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
2187
LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
2188
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
2189
AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
2194
# Note it is very recommended to *not* disable chroot(),
2195
# this is only because chroot() was made obsolete by Posix.
2196
AC_ARG_ENABLE(chroot,
2197
[ --disable-chroot disable chroot])
2198
case "$enable_chroot" in
2200
AC_CHECK_FUNCS(chroot)
2205
AC_ARG_ENABLE(linux-caps,
2206
[ --disable-linux-caps disable linux capabilities])
2207
case "$enable_linux_caps" in
2209
AC_CHECK_HEADERS(linux/capability.h sys/capability.h)
2210
AC_CHECK_LIB(cap, cap_set_proc)
2215
AC_CHECK_HEADERS(sys/prctl.h)
2217
AC_CHECK_HEADERS(sys/un.h,
2218
ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
2220
ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
2222
AC_SUBST(ISC_PLATFORM_HAVESYSUNH)
2226
AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2227
[Define if connect does not honour the permission on the UNIX domain socket.])
2230
AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
2231
[Define if connect does not honour the permission on the UNIX domain socket.])
2238
AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
2240
AC_MSG_CHECKING(for optarg declaration)
2245
[AC_MSG_RESULT(yes)],
2247
GEN_NEED_OPTARG="-DNEED_OPTARG=1"
2248
AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
2251
# BSD/OS, and perhaps some others, don't define rlim_t.
2253
AC_MSG_CHECKING(for type rlim_t)
2255
#include <sys/types.h>
2256
#include <sys/time.h>
2257
#include <sys/resource.h>],
2258
[rlim_t rl = 19671212; return (0);],
2260
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
2263
AC_MSG_CHECKING(type of rlim_cur)
2265
#include <sys/types.h>
2266
#include <sys/time.h>
2267
#include <sys/resource.h>
2268
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
2270
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
2273
#include <sys/types.h>
2274
#include <sys/time.h>
2275
#include <sys/resource.h>
2276
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
2277
[AC_MSG_RESULT(long int)
2278
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
2281
#include <sys/types.h>
2282
#include <sys/time.h>
2283
#include <sys/resource.h>
2284
main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
2285
[AC_MSG_RESULT(long long int)
2286
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
2287
[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
2288
],[AC_MSG_ERROR(this cannot happen)])
2289
],[AC_MSG_ERROR(this cannot happen)])
2291
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
2292
AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming long long int)])
2294
AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
2297
# Older HP-UX doesn't have gettune
2301
AC_CHECK_HEADERS(sys/dyntune.h)
2309
# Compaq TruCluster requires more code for handling cluster IP aliases
2313
AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
2314
AC_CHECK_FUNC(clua_getaliasaddress,
2315
AC_DEFINE(HAVE_TRUCLUSTER, 1,
2316
[Define if running under Compaq TruCluster]))
2323
# Some hosts need msg_namelen to match the size of the socket structure.
2324
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
2328
AC_DEFINE(BROKEN_RECVMSG, 1,
2329
[Define if recvmsg() does not meet all of the BSD socket API specifications.])
2334
# Microsoft has their own way of handling shared libraries that requires
2335
# additional qualifiers on extern variables. Unix systems don't need it.
2337
AC_SUBST(ISC_PLATFORM_USEDECLSPEC)
2338
ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
2339
AC_SUBST(LWRES_PLATFORM_USEDECLSPEC)
2340
LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC"
2341
AC_SUBST(IRS_PLATFORM_USEDECLSPEC)
2342
IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC"
2345
# Random remaining OS-specific issues involving compiler warnings.
2346
# XXXDCL print messages to indicate some compensation is being done?
2348
AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
2349
ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
2353
hack_shutup_pthreadonceinit=yes
2356
hack_shutup_sputaux=yes
2359
hack_shutup_sigwait=yes
2360
hack_shutup_sputaux=yes
2363
hack_shutup_stdargcast=yes
2366
hack_shutup_pthreadonceinit=yes
2368
*-solaris2.1[[0-9]])
2369
AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
2373
case "$hack_shutup_pthreadonceinit" in
2376
# Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
2378
ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
2382
case "$hack_shutup_sigwait" in
2385
# Shut up a -Wmissing-prototypes warning for sigwait().
2387
AC_DEFINE(SHUTUP_SIGWAIT)
2391
case "$hack_shutup_sputaux" in
2394
# Shut up a -Wmissing-prototypes warning from <stdio.h>.
2396
AC_DEFINE(SHUTUP_SPUTAUX)
2400
case "$hack_shutup_stdargcast" in
2403
# Shut up a -Wcast-qual warning from va_start().
2405
AC_DEFINE(SHUTUP_STDARG_CAST)
2409
AC_CHECK_HEADERS(strings.h,
2410
ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
2412
ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH"
2414
AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
2417
# Check for if_nametoindex() for IPv6 scoped addresses support
2419
AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
2420
ac_cv_have_if_nametoindex=no)
2421
case $ac_cv_have_if_nametoindex in
2425
AC_CHECK_LIB(ipv6, if_nametoindex,
2426
ac_cv_have_if_nametoindex=yes
2427
LIBS="-lipv6 $LIBS",)
2431
case $ac_cv_have_if_nametoindex in
2433
ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
2436
ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
2439
AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
2441
AC_CHECK_FUNCS(nanosleep)
2444
# Machine architecture dependent features
2446
AC_ARG_ENABLE(atomic,
2447
[ --enable-atomic enable machine specific atomic operations
2448
[[default=autodetect]]],
2449
enable_atomic="$enableval",
2450
enable_atomic="autodetect")
2451
case "$enable_atomic" in
2455
if test "X$GCC" = "Xyes"; then
2456
AC_MSG_CHECKING([if asm("isc"); works])
2458
main() { asm("ics"); exit(0); }
2463
saved_cflags="$CFLAGS"
2464
CFLAGS="$CFLAGS -Wa,-many"
2466
main() { asm("ics"); exit(0); }
2468
[AC_MSG_RESULT([yes, required -Wa,-many])
2470
[AC_MSG_RESULT([no, use_atomic disabled])
2471
CFLAGS="$saved_cflags"
2473
[AC_MSG_RESULT([cross compile, assume yes])
2474
CFLAGS="$saved_cflags"
2493
ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
2494
if test "$use_atomic" = "yes"; then
2495
AC_MSG_CHECKING([architecture type for atomic operations])
2496
have_atomic=yes # set default
2499
# XXX: some old x86 architectures actually do not support
2500
# (some of) these operations. Do we need stricter checks?
2503
exit((sizeof(void *) == 8) ? 0 : 1);
2514
exit((sizeof(void *) == 8) ? 0 : 1);
2529
mips-*|mipsel-*|mips64-*|mips64el-*)
2540
AC_MSG_RESULT($arch)
2543
if test "$have_atomic" = "yes"; then
2544
AC_MSG_CHECKING([compiler support for inline assembly code])
2547
# Check whether the compiler supports the assembly syntax we provide.
2548
if test "X$GCC" = "Xyes"; then
2549
# GCC's ASM extension always works
2551
if test $arch = "x86_64"; then
2552
# We can share the same code for gcc with x86_32
2555
if test $arch = "powerpc"; then
2557
# The MacOS (and maybe others) uses "r0" for register
2558
# zero. Under linux/ibm it is "0" for register 0.
2559
# Probe to see if we have a MacOS style assembler.
2561
AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
2563
__asm__ volatile ("li r0, 0x0\n"::);
2567
ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
2568
], [AC_MSG_RESULT(no)])
2573
# Tru64 compiler has its own syntax for inline
2577
#error "unexpected compiler"
2589
ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
2592
ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
2599
# See if the generic __asm function works. If not,
2600
# we need to disable the atomic operations.
2604
[compiler="standard"
2605
ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
2606
[compiler="not supported (atomic operations disabled)"
2612
AC_MSG_RESULT($compiler)
2615
if test "$have_atomic" = "yes"; then
2616
ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
2617
ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
2618
ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
2620
ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
2621
ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
2622
ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
2625
if test "$have_xaddq" = "yes"; then
2626
ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1"
2628
ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
2631
AC_SUBST(ISC_PLATFORM_HAVEXADD)
2632
AC_SUBST(ISC_PLATFORM_HAVEXADDQ)
2633
AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
2634
AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
2636
AC_SUBST(ISC_PLATFORM_USEGCCASM)
2637
AC_SUBST(ISC_PLATFORM_USEOSFASM)
2638
AC_SUBST(ISC_PLATFORM_USESTDASM)
2639
AC_SUBST(ISC_PLATFORM_USEMACASM)
2642
AC_SUBST(ISC_ARCH_DIR)
2645
# Activate "rrset-order fixed" or not?
2647
AC_ARG_ENABLE(fixed-rrset,
2648
[ --enable-fixed-rrset enable fixed rrset ordering
2650
enable_fixed="$enableval",
2652
case "$enable_fixed" in
2654
AC_DEFINE(DNS_RDATASET_FIXED, 1,
2655
[Define to enable "rrset-order fixed" syntax.])
2664
# Activate "filter-aaaa-on-v4" or not?
2666
AC_ARG_ENABLE(filter-aaaa,
2667
[ --enable-filter-aaaa enable filtering of AAAA records over IPv4
2669
enable_filter="$enableval",
2671
case "$enable_filter" in
2673
AC_DEFINE(ALLOW_FILTER_AAAA_ON_V4, 1,
2674
[Define to enable the "filter-aaaa-on-v4" option.])
2683
# The following sets up how non-blocking i/o is established.
2684
# Sunos, cygwin and solaris 2.x (x<5) require special handling.
2687
*-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2688
*-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2689
*-solaris2.[[01234]])
2690
AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
2691
AC_DEFINE(USE_FIONBIO_IOCTL, 1,
2692
[Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
2694
*) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
2695
[Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
2699
# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
2700
# This prevents the source address being set.
2703
*-solaris2.[[012345]]|*-solaris2.5.1)
2704
AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
2705
[Define if you cannot bind() before connect() for TCP sockets.])
2709
# The following sections deal with tools used for formatting
2710
# the documentation. They are all optional, unless you are
2711
# a developer editing the documentation source.
2718
AC_PATH_PROGS(LATEX, latex, latex)
2721
AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
2728
AC_PATH_PROGS(W3M, w3m, w3m)
2732
# Look for xsltproc (libxslt)
2735
AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
2739
# Look for xmllint (libxml2)
2742
AC_PATH_PROG(XMLLINT, xmllint, xmllint)
2749
AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
2753
# Subroutine for searching for an ordinary file (e.g., a stylesheet)
2754
# in a number of directories:
2756
# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
2758
# If the file FILENAME is found in one of the DIRECTORIES, the shell
2759
# variable VARIABLE is defined to its absolute pathname. Otherwise,
2760
# it is set to FILENAME, with no directory prefix (that's not terribly
2761
# useful, but looks less confusing in substitutions than leaving it
2762
# empty). The variable VARIABLE will be substituted into output files.
2765
AC_DEFUN(NOM_PATH_FILE, [
2767
AC_MSG_CHECKING(for $2)
2778
if test "X[$]$1" = "X"
2780
AC_MSG_RESULT("not found");
2787
# Look for Docbook-XSL stylesheets. Location probably varies by system.
2788
# If it's not explicitly specified, guess where it might be found, based on
2789
# where SGML stuff lives on some systems (FreeBSD is the only one we're sure
2790
# of at the moment).
2792
AC_MSG_CHECKING(for Docbook-XSL path)
2793
AC_ARG_WITH(docbook-xsl,
2794
[ --with-docbook-xsl=PATH Specify path for Docbook-XSL stylesheets],
2795
docbook_path="$withval", docbook_path="auto")
2796
case "$docbook_path" in
2799
docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook /usr/share/xsl/docbook"
2802
docbook_xsl_trees="$withval"
2803
AC_MSG_RESULT($docbook_xsl_trees)
2808
# Look for stylesheets we need.
2811
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees)
2812
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees)
2813
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees)
2814
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, html/chunk.xsl, $docbook_xsl_trees)
2815
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, xhtml/chunk.xsl, $docbook_xsl_trees)
2816
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees)
2817
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees)
2818
NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees)
2819
NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees)
2822
# Same dance for db2latex
2824
# No idea where this lives except on FreeBSD.
2827
db2latex_xsl_trees="/usr/local/share"
2830
# Look for stylesheets we need.
2833
NOM_PATH_FILE(XSLT_DB2LATEX_STYLE, db2latex/xsl/docbook.xsl, $db2latex_xsl_trees)
2836
# Look for "admonition" image directory. Can't use NOM_PATH_FILE()
2837
# because it's a directory, so just do the same things, inline.
2840
AC_MSG_CHECKING(for db2latex/xsl/figures)
2841
for d in $db2latex_xsl_trees
2843
dd=$d/db2latex/xsl/figures
2846
XSLT_DB2LATEX_ADMONITIONS=$dd
2851
if test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
2853
AC_MSG_RESULT(not found)
2854
XSLT_DB2LATEX_ADMONITIONS=db2latex/xsl/figures
2856
AC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
2862
[ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]],
2863
use_idn="$withval", use_idn="no")
2866
if test X$prefix = XNONE ; then
2881
AC_ARG_WITH(libiconv,
2882
[ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]],
2883
use_libiconv="$withval", use_libiconv="no")
2884
case "$use_libiconv" in
2886
if test X$prefix = XNONE ; then
2887
iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
2889
iconvlib="-L$prefix/lib -R$prefix/lib -liconv"
2896
iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
2901
[ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]],
2902
iconvlib="$withval")
2913
[ --with-idnlib=ARG specify libidnkit],
2914
idnlib="$withval", idnlib="no")
2915
if test "$idnlib" = yes; then
2916
AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
2920
if test "$use_idn" != no; then
2921
AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.])
2922
STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include"
2923
if test "$idnlib" != no; then
2924
IDNLIBS="$idnlib $iconvlib"
2926
IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib"
2931
AC_CHECK_HEADERS(locale.h)
2932
AC_CHECK_FUNCS(setlocale)
2937
AC_SUBST(BIND9_TOP_BUILDDIR)
2938
BIND9_TOP_BUILDDIR=`pwd`
2940
AC_SUBST(BIND9_ISC_BUILDINCLUDE)
2941
AC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
2942
AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
2943
AC_SUBST(BIND9_DNS_BUILDINCLUDE)
2944
AC_SUBST(BIND9_LWRES_BUILDINCLUDE)
2945
AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
2946
if test "X$srcdir" != "X"; then
2947
BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
2948
BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
2949
BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
2950
BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
2951
BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
2952
BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
2954
BIND9_ISC_BUILDINCLUDE=""
2955
BIND9_ISCCC_BUILDINCLUDE=""
2956
BIND9_ISCCFG_BUILDINCLUDE=""
2957
BIND9_DNS_BUILDINCLUDE=""
2958
BIND9_LWRES_BUILDINCLUDE=""
2959
BIND9_BIND9_BUILDINCLUDE=""
2962
AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
2963
BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
2965
AC_SUBST_FILE(BIND9_MAKE_RULES)
2966
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
2969
BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}"
2970
AC_SUBST(BIND9_VERSION)
2972
if test -z "$ac_configure_args"; then
2973
BIND9_CONFIGARGS="defaults"
2975
for a in $ac_configure_args
2977
BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
2980
BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
2981
BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
2982
AC_SUBST(BIND9_CONFIGARGS)
2984
AC_SUBST_FILE(LIBISC_API)
2985
LIBISC_API=$srcdir/lib/isc/api
2987
AC_SUBST_FILE(LIBISCCC_API)
2988
LIBISCCC_API=$srcdir/lib/isccc/api
2990
AC_SUBST_FILE(LIBISCCFG_API)
2991
LIBISCCFG_API=$srcdir/lib/isccfg/api
2993
AC_SUBST_FILE(LIBDNS_API)
2994
LIBDNS_API=$srcdir/lib/dns/api
2996
AC_SUBST_FILE(LIBBIND9_API)
2997
LIBBIND9_API=$srcdir/lib/bind9/api
2999
AC_SUBST_FILE(LIBLWRES_API)
3000
LIBLWRES_API=$srcdir/lib/lwres/api
3002
AC_SUBST_FILE(LIBIRS_API)
3003
LIBIRS_API=$srcdir/lib/irs/api
3006
# Configure any DLZ drivers.
3008
# If config.dlz.in selects one or more DLZ drivers, it will set
3009
# USE_DLZ to a non-empty value, which will be our clue to
3010
# enable the DLZ core functions.
3012
# This section has to come after the libtool stuff because it needs to
3013
# know how to name the driver object files.
3017
DLZ_DRIVER_INCLUDES=""
3022
sinclude(contrib/dlz/config.dlz.in)
3024
AC_MSG_CHECKING(for DLZ)
3026
if test -n "$USE_DLZ"
3029
USE_DLZ="-DDLZ $USE_DLZ"
3030
DLZ_DRIVER_RULES=contrib/dlz/drivers/rules
3031
AC_CONFIG_FILES([$DLZ_DRIVER_RULES])
3034
DLZ_DRIVER_RULES=/dev/null
3038
AC_SUBST(DLZ_DRIVER_INCLUDES)
3039
AC_SUBST(DLZ_DRIVER_LIBS)
3040
AC_SUBST(DLZ_DRIVER_SRCS)
3041
AC_SUBST(DLZ_DRIVER_OBJS)
3042
AC_SUBST_FILE(DLZ_DRIVER_RULES)
3044
if test "$cross_compiling" = "yes"; then
3045
if test -z "$BUILD_CC"; then
3046
AC_ERROR([BUILD_CC not set])
3048
BUILD_CFLAGS="$BUILD_CFLAGS"
3049
BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
3050
BUILD_LDFLAGS="$BUILD_LDFLAGS"
3051
BUILD_LIBS="$BUILD_LIBS"
3054
BUILD_CFLAGS="$CFLAGS"
3055
BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
3056
BUILD_LDFLAGS="$LDFLAGS"
3061
for e in $BUILD_LDFLAGS ; do
3066
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3067
NEWFLAGS="$NEWFLAGS $e $ee"
3070
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3071
NEWFLAGS="$NEWFLAGS $e $ee"
3074
ee=`echo $e | sed -e 's%^-L%-R%'`
3075
NEWFLAGS="$NEWFLAGS $e $ee"
3078
NEWFLAGS="$NEWFLAGS $e"
3083
NEWFLAGS="$NEWFLAGS $e"
3087
BUILD_LDFLAGS="$NEWFLAGS"
3090
for e in $DNS_GSSAPI_LIBS ; do
3095
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3096
NEWFLAGS="$NEWFLAGS $e $ee"
3099
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3100
NEWFLAGS="$NEWFLAGS $e $ee"
3103
ee=`echo $e | sed -e 's%^-L%-R%'`
3104
NEWFLAGS="$NEWFLAGS $e $ee"
3107
NEWFLAGS="$NEWFLAGS $e"
3112
NEWFLAGS="$NEWFLAGS $e"
3116
DNS_GSSAPI_LIBS="$NEWFLAGS"
3119
for e in $DNS_CRYPTO_LIBS ; do
3124
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3125
NEWFLAGS="$NEWFLAGS $e $ee"
3128
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
3129
NEWFLAGS="$NEWFLAGS $e $ee"
3132
ee=`echo $e | sed -e 's%^-L%-R%'`
3133
NEWFLAGS="$NEWFLAGS $e $ee"
3136
NEWFLAGS="$NEWFLAGS $e"
3141
NEWFLAGS="$NEWFLAGS $e"
3145
DNS_CRYPTO_LIBS="$NEWFLAGS"
3148
AC_SUBST(BUILD_CFLAGS)
3149
AC_SUBST(BUILD_CPPFLAGS)
3150
AC_SUBST(BUILD_LDFLAGS)
3151
AC_SUBST(BUILD_LIBS)
3154
# Commands to run at the end of config.status.
3155
# Don't just put these into configure, it won't work right if somebody
3156
# runs config.status directly (which autoconf allows).
3161
[chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter])
3164
# Files to configure. These are listed here because we used to
3165
# specify them as arguments to AC_OUTPUT. It's (now) ok to move these
3166
# elsewhere if there's a good reason for doing so.
3175
lib/isc/include/Makefile
3176
lib/isc/include/isc/Makefile
3177
lib/isc/include/isc/platform.h
3178
lib/isc/unix/Makefile
3179
lib/isc/unix/include/Makefile
3180
lib/isc/unix/include/isc/Makefile
3181
lib/isc/nls/Makefile
3182
lib/isc/$thread_dir/Makefile
3183
lib/isc/$thread_dir/include/Makefile
3184
lib/isc/$thread_dir/include/isc/Makefile
3185
lib/isc/$arch/Makefile
3186
lib/isc/$arch/include/Makefile
3187
lib/isc/$arch/include/isc/Makefile
3189
lib/isccc/include/Makefile
3190
lib/isccc/include/isccc/Makefile
3192
lib/isccfg/include/Makefile
3193
lib/isccfg/include/isccfg/Makefile
3195
lib/irs/include/Makefile
3196
lib/irs/include/irs/Makefile
3197
lib/irs/include/irs/netdb.h
3198
lib/irs/include/irs/platform.h
3200
lib/dns/include/Makefile
3201
lib/dns/include/dns/Makefile
3202
lib/dns/include/dst/Makefile
3204
lib/export/isc/Makefile
3205
lib/export/isc/include/Makefile
3206
lib/export/isc/include/isc/Makefile
3207
lib/export/isc/unix/Makefile
3208
lib/export/isc/unix/include/Makefile
3209
lib/export/isc/unix/include/isc/Makefile
3210
lib/export/isc/nls/Makefile
3211
lib/export/isc/$thread_dir/Makefile
3212
lib/export/isc/$thread_dir/include/Makefile
3213
lib/export/isc/$thread_dir/include/isc/Makefile
3214
lib/export/dns/Makefile
3215
lib/export/dns/include/Makefile
3216
lib/export/dns/include/dns/Makefile
3217
lib/export/dns/include/dst/Makefile
3218
lib/export/irs/Makefile
3219
lib/export/irs/include/Makefile
3220
lib/export/irs/include/irs/Makefile
3221
lib/export/isccfg/Makefile
3222
lib/export/isccfg/include/Makefile
3223
lib/export/isccfg/include/isccfg/Makefile
3224
lib/export/samples/Makefile
3225
lib/export/samples/Makefile-postinstall
3227
lib/bind9/include/Makefile
3228
lib/bind9/include/bind9/Makefile
3230
lib/lwres/include/Makefile
3231
lib/lwres/include/lwres/Makefile
3232
lib/lwres/include/lwres/netdb.h
3233
lib/lwres/include/lwres/platform.h
3234
lib/lwres/man/Makefile
3235
lib/lwres/unix/Makefile
3236
lib/lwres/unix/include/Makefile
3237
lib/lwres/unix/include/lwres/Makefile
3239
lib/tests/include/Makefile
3240
lib/tests/include/tests/Makefile
3243
bin/confgen/Makefile
3244
bin/confgen/unix/Makefile
3246
bin/named/unix/Makefile
3249
bin/nsupdate/Makefile
3251
bin/tests/names/Makefile
3252
bin/tests/master/Makefile
3253
bin/tests/rbt/Makefile
3254
bin/tests/db/Makefile
3255
bin/tests/tasks/Makefile
3256
bin/tests/timers/Makefile
3257
bin/tests/dst/Makefile
3258
bin/tests/mem/Makefile
3259
bin/tests/net/Makefile
3260
bin/tests/sockaddr/Makefile
3261
bin/tests/system/Makefile
3262
bin/tests/system/conf.sh
3263
bin/tests/system/lwresd/Makefile
3264
bin/tests/system/tkey/Makefile
3265
bin/tests/headerdep_test.sh
3274
doc/xsl/isc-docbook-chunk.xsl
3275
doc/xsl/isc-docbook-html.xsl
3276
doc/xsl/isc-docbook-latex.xsl
3277
doc/xsl/isc-manpage.xsl
3278
doc/doxygen/Doxyfile
3279
doc/doxygen/Makefile
3280
doc/doxygen/doxygen-input-filter
3290
# Now that the Makefiles exist we can ensure that everything is rebuilt.
3292
AC_ARG_WITH(make-clean,
3293
[ --with-make-clean Run "make clean" at end of configure [[yes|no]].],
3294
make_clean="$withval", make_clean="yes")
3295
case "$make_clean" in
3301
if test "X$USE_OPENSSL" = "X"; then
3303
BIND is being built without OpenSSL. This means it will not have DNSSEC support.
3307
if test "X$OPENSSL_WARNING" != "X"; then
3309
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3310
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3312
WARNING Your OpenSSL crypto library may be vulnerable to WARNING
3313
WARNING one or more of the the following known security WARNING
3314
WARNING flaws: WARNING
3316
WARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
3317
WARNING CVE-2006-2940. WARNING
3319
WARNING It is recommended that you upgrade to OpenSSL WARNING
3320
WARNING version 0.9.8d/0.9.7l (or greater). WARNING
3322
WARNING You can disable this warning by specifying: WARNING
3324
WARNING --disable-openssl-version-check WARNING
3326
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3327
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3331
# Tell Emacs to edit this file in shell mode.