# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_REVISION($Revision: 1.498 $)
# Just set the maximum command line length for sunos as it otherwise
# takes a exceptionally long time to work it out. Required for libtool.
lt_cv_sys_max_cmd_len=4096;
# Warn if the user specified libbind, which is now deprecated
AC_ARG_ENABLE(libbind, [ --enable-libbind deprecated])
case "$enable_libbind" in
AC_MSG_ERROR(['libbind' is no longer part of the BIND 9 distribution.
# Make very sure that these are the first files processed by
#
config.status, since we use the processed output as the input for
# AC_SUBST_FILE() substitutions in other files.
# The POSIX ln(1) program. Non-POSIX systems may substitute
ar program not found. Please fix your PATH to include the directory in
which ar resides, or set AR in the environment with the full path to ar.
AC_PATH_PROGS(ETAGS, etags emacs-etags)
# Some systems,
e.g. RH7, have the Exuberant Ctags etags instead of
# GNU emacs etags, and it requires the -L flag.
if test "X$ETAGS" != "X"; then
AC_MSG_CHECKING(for Exuberant Ctags etags)
if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >
/dev/null 2>&1; then
# Perl is optional; it is used only by some of the system test scripts.
# Note: the backtrace feature (see below) uses perl to build the symbol table,
# but it still compiles without perl, in which case an empty table will be used.
AC_PATH_PROGS(PERL, perl5 perl)
# Special processing of paths depending on whether --prefix,
# --sysconfdir or --localstatedir arguments were given. What's
# desired is some compatibility with the way previous versions
# of BIND built; they defaulted to
/usr/local for most parts of
# So ... if none of --prefix, --sysconfdir or --localstatedir are
# specified, set things up that way. If --prefix is given, use
# it for sysconfdir and localstatedir the way configure normally
# would. To change the prefix for everything but leave
named.conf# ./configure --prefix=/somewhere --sysconfdir=/etc
# ./configure --prefix=/somewhere --localstatedir=/var
# set the prefix explicitly to
/usr/local even though that's the default:
# Make sure INSTALL uses an absolute path, else it will be wrong in all
# Makefiles, since they use
make/rules.in and INSTALL will be adjusted by
# configure based on the location of the file where it is substituted.
# Since in BIND9 INSTALL is only substituted into
make/rules.in, an immediate
# subdirectory of install-sh, This relative path will be wrong for all
# directories more than one level down from install-sh.
# Not all systems have dirname.
ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
test "$ac_dir" = "$ac_prog" && ac_dir=.
test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
INSTALL="$ac_dir/$ac_prog"
# On these hosts, we really want to use cc, not gcc, even if it is
# found. The gcc that these systems have will not correctly handle
# However, if the user sets $CC to be something, let that override
if test "X$CC" = "X" ; then
# Use Sun's cc if it is available, but watch
# If setting CC here fails, the AC_PROG_CC done
# below might still find gcc.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
test -z "$ac_dir" && ac_dir=.
# gcc's optimiser is broken at -02 for ultrasparc
if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
# OSF 5.0:
recv/send are only available with -D_POSIX_PII_SOCKET or
# -D_XOPEN_SOURCE_EXTENDED.
STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
#HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
# Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
# POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
# parts of the IPv6 Advanced Socket API as a result. This is stupid
# as it breaks how the two halves (Basic and Advanced) of the IPv6
# Socket API were designed to be used but we have to live with it.
# Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
AC_C_FLEXIBLE_ARRAY_MEMBER
# Older versions of
HP/UX don't define seteuid() and setegid()
AC_CHECK_FUNCS(seteuid setresuid)
AC_CHECK_FUNCS(setegid setresgid)
# UnixWare 7.1.1 with the feature supplement to the UDK compiler
# is reported to not support "static inline" (RT #1212).
AC_MSG_CHECKING(for static inline breakage)
static inline int foo1() {
static inline int foo2() {
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(uintptr_t,unsigned long)
[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
int getsockname(int, struct sockaddr *, size_t *);
[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
AC_SUBST(ISC_SOCKADDR_LEN_T)
AC_MSG_CHECKING(for long long)
AC_TRY_COMPILE([],[long long i = 0; return (0);],
ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
# check for GCC noreturn attribute
AC_MSG_CHECKING(for GCC noreturn attribute)
AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));],
ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"],
ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST"])
AC_SUBST(ISC_PLATFORM_NORETURN_PRE)
AC_SUBST(ISC_PLATFORM_NORETURN_POST)
# check if we have lifconf
AC_MSG_CHECKING(for struct lifconf)
ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
# check if we have kqueue
[ --enable-kqueue use BSD kqueue when available [[default=yes]]],
want_kqueue="$enableval", want_kqueue="yes")
AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
case $ac_cv_have_kqueue in
ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
# so we need to try running the code, not just test its existence.
[ --enable-epoll use Linux epoll when available [[default=auto]]],
want_epoll="$enableval", want_epoll="auto")
AC_MSG_CHECKING(epoll support)
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
[ --enable-devpoll use
/dev/poll when available [[default=yes]]],
want_devpoll="$enableval", want_devpoll="yes")
ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
case $ac_cv_header_unistd_h in
[fd_set read_set; return (0);],
ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
case $ac_cv_header_sys_select_h in
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
case $ac_cv_header_sys_select_h in
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
# Find the machine's endian flavor.
# was --with-openssl specified?
AC_MSG_CHECKING(for OpenSSL library)
[ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
use_openssl="$withval", use_openssl="auto")
if test "$use_openssl" = "auto"
[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
If you don't want OpenSSL, use --without-openssl])
if test "$use_openssl" = "yes"
# User did not specify a path - guess it
if test "$use_openssl" = "yes"
[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
if test "$use_openssl" = "/usr"
DNS_OPENSSL_LIBS="-lcrypto"
# Apple's ld seaches for serially for dynamic
# then static libraries. This means you can't
# use -L to override dynamic system libraries
# with static ones when linking. Instead
# we specify a absolute path.
CFLAGS="$CFLAGS $DST_OPENSSL_INC"
LIBS="$LIBS $DNS_OPENSSL_LIBS"
AC_MSG_CHECKING(whether linking with OpenSSL works)
AC_MSG_ERROR(Could not run test program using OpenSSL from
Please check the argument to --with-openssl and your
shared library configuration (
e.g., LD_LIBRARY_PATH).)],
[AC_MSG_RESULT(assuming it does work on target platform)])
AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
],[ DSO_METHOD_dlfcn(); ],
DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl"
AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
[AC_MSG_RESULT(assuming it does work on target platform)])
[AC_MSG_RESULT(assuming it does work on target platform)]
AC_ARG_ENABLE(openssl-version-check,
[AC_HELP_STRING([--enable-openssl-version-check],
[Check OpenSSL Version @<:@default=yes@:>@])])
case "$enable_openssl_version_check" in
AC_MSG_CHECKING(OpenSSL library version)
if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
OPENSSL_VERSION_NUMBER < 0x00908000L) ||
OPENSSL_VERSION_NUMBER >= 0x0090804fL)
printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n"
"Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n");
[AC_MSG_RESULT(not compatible)
[AC_MSG_RESULT(assuming target platform has compatible version)])
AC_MSG_RESULT(Skipped OpenSSL version check)
AC_MSG_CHECKING(for OpenSSL DSA support)
AC_DEFINE(HAVE_OPENSSL_DSA)
AC_CHECK_FUNCS(EVP_sha256 EVP_sha512)
OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
# This would include the system openssl path (and linker options to use
# it as needed) if it is found.
AC_SUBST(DST_OPENSSL_INC)
AC_SUBST(OPENSSLLINKOBJS)
AC_SUBST(OPENSSLLINKSRCS)
DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
# Use OpenSSL for hash functions
AC_ARG_ENABLE(openssl-hash,
[ --enable-openssl-hash use OpenSSL for hash functions [[default=no]]],
want_openssl_hash="$enableval", want_openssl_hash="no")
case $want_openssl_hash in
if test "$USE_OPENSSL" = ""
AC_MSG_ERROR([No OpenSSL for hash functions])
ISC_PLATFORM_OPENSSLHASH="#define ISC_PLATFORM_OPENSSLHASH 1"
ISC_OPENSSL_INC="$DST_OPENSSL_INC"
ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH"
AC_SUBST(ISC_PLATFORM_OPENSSLHASH)
AC_SUBST(ISC_OPENSSL_INC)
# PKCS11 (aka crypto hardware) support
# This works only with the right OpenSSL with PKCS11 engine!
AC_MSG_CHECKING(for PKCS11 support)
[ --with-pkcs11[=PATH] Build with PKCS11 support [yes|no|path]
(PATH is for the PKCS11 provider)],
use_pkcs11="$withval", use_pkcs11="no")
AC_MSG_RESULT(using OpenSSL with PKCS11 support)
USE_PKCS11='-DUSE_PKCS11'
AC_MSG_CHECKING(for PKCS11 tools)
PKCS11_PROVIDER="undefined"
AC_MSG_RESULT(PKCS11 provider is "$use_pkcs11")
PKCS11_PROVIDER="$use_pkcs11"
AC_SUBST(PKCS11_PROVIDER)
AC_MSG_CHECKING(for GSSAPI library)
[ --with-gssapi=PATH Specify path for system-supplied GSSAPI],
use_gssapi="$withval", use_gssapi="no")
if test "$use_gssapi" = "yes"
AC_MSG_ERROR([--with-gssapi must specify a path])
saved_cppflags="$CPPFLAGS"
[ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
if test "$ISC_PLATFORM_GSSAPIHEADER" = ""; then
[ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"])
if test "$ISC_PLATFORM_KRB5HEADER" = ""; then
AC_MSG_ERROR([
krb5.h not found])
CPPFLAGS="$saved_cppflags"
# XXXDCL This probably doesn't work right on all systems.
# It will need to be worked on as problems become evident.
# Essentially the problems here relate to two different
# areas. The first area is building with either KTH
# or MIT Kerberos, particularly when both are present on
# the machine. The other is static versus dynamic linking.
# On the KTH vs MIT issue, Both have libkrb5 that can mess
# up the works if one implementation ends up trying to
# use the other's krb. This is unfortunately a situation
# that very easily arises.
# Dynamic linking when the dependency information is built
# into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
# all such problems go away, but when that setup is not
# present, because either the dynamic libraries lack
# dependencies or static linking is being done, then the
# problems start to show up.
"-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
"-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
"-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
"-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
# Note that this does not include $saved_libs, because
# on FreeBSD machines this configure script has added
# -lgssapi_krb5 test succeed with shared libraries even
# when you are trying to build with KTH in
/usr/lib.
AC_MSG_CHECKING(linking as $TRY_LIBS)
AC_TRY_LINK( , [gss_acquire_cred();krb5_init_context()],
gssapi_linked=yes, gssapi_linked=no)
yes) AC_MSG_RESULT(yes); break ;;
no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
# XXXDCL Major kludge. Tries to cope with KTH in
/usr/lib # Like most kludges, this one is not only inelegant it
# is also likely to be the wrong thing to do at least as
# many times as it is the right thing. Something better
if test "$use_gssapi" = "/usr" -a \
case "$FIX_KTH_VS_MIT" in
case "$enable_static_linking" in
yes) gssapi_lib_suffix=".a" ;;
*) gssapi_lib_suffix=".so" ;;
-e s%$%$gssapi_lib_suffix%`
NEW_LIBS="$NEW_LIBS $new_lib"
AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
AC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
AC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
AC_SUBST(ISC_PLATFORM_KRB5HEADER)
AC_SUBST(DNS_GSSAPI_LIBS)
DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS"
# Applications linking with libdns also need to link with these libraries.
AC_SUBST(DNS_CRYPTO_LIBS)
# was --with-randomdev specified?
AC_MSG_CHECKING(for random device)
[ --with-randomdev=PATH Specify path for random device],
use_randomdev="$withval", use_randomdev="unspec")
AC_MSG_RESULT($devrandom)
AC_CHECK_FILE($devrandom,
AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
AC_MSG_ERROR([--with-randomdev must specify a path])
AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
AC_MSG_RESULT(using "$use_randomdev")
# Do we have arc4random() ?
AC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM))
if test "X$GCC" = "Xyes"; then
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
*-sco-sysv*uw*|*-*-sysv*UnixWare*)
ALWAYS_DEFINES="-D_REENTRANT"
ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
THREADOPTOBJS='${THREADOPTOBJS}'
THREADOPTSRCS='${THREADOPTSRCS}'
# We'd like to use sigwait() too
AC_CHECK_LIB(pthread, sigwait,
AC_CHECK_LIB(pthread, _Psigwait,
AC_DEFINE(HAVE_SIGWAIT),))))
AC_CHECK_FUNC(pthread_attr_getstacksize,
AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
AC_CHECK_FUNC(pthread_attr_setstacksize,
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
# Additional OS-specific issues related to pthreads and sigwait.
# One more place to look for sigwait.
AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
*-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
*-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
# BSDI 3.0 through 4.0.1 needs pthread_init() to be
# called before certain pthreads calls. This is deprecated
AC_DEFINE(NEED_PTHREAD_INIT)
# LinuxThreads requires some changes to the way we
AC_DEFINE(HAVE_LINUXTHREADS)
# Ensure the right sigwait() semantics on Solaris and make
# sure we call pthread_setconcurrency.
AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
AC_CHECK_FUNC(pthread_setconcurrency,
AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
# UnixWare does things its own way.
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
# Look for sysconf to allow detection of the number of processors.
AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
AC_SUBST(ISC_PLATFORM_USETHREADS)
ISC_THREAD_DIR=$thread_dir
# was --with-libxml2 specified?
AC_MSG_CHECKING(for libxml2 library)
[ --with-libxml2[=PATH] Build with libxml2 library [yes|no|path]],
use_libxml2="$withval", use_libxml2="auto")
case X`(xml2-config --version) 2>
/dev/null` in
libxml2_libs=`xml2-config --libs`
libxml2_cflags=`xml2-config --cflags`
if test "X$libxml2_libs" != "X"
CFLAGS="$CFLAGS $libxml2_cflags"
LIBS="$LIBS $libxml2_libs"
AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
# In solaris 10, SMF can manage named service
AC_CHECK_LIB(scf, smf_enable_instance)
# flockfile is usually provided by pthreads, but we may want to use it
# even if compiled with --disable-threads. getc_unlocked might also not
AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
# Indicate what the final decision was regarding threads.
AC_MSG_CHECKING(whether to build with threads)
AC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
want_largefile="yes", want_largefile="no")
ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
# Additional compiler settings.
IRIX_DNSSEC_WARNINGS_HACK=""
if test "X$GCC" = "Xyes"; then
AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
CFLAGS="$CFLAGS -fno-strict-aliasing"
AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
if test "$FNOSTRICTALIASING" = "yes"; then
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
# The version of the C compiler that constantly warns about
# 'const' as well as alignment issues is unfortunately not
# able to be discerned via the version of the operating
# system, nor does cc have a version flag.
case "`$CC +W 123 2>&1`" in
# Turn off the pointlessly noisy warnings.
STD_CWARNINGS="+w1 +W 474,530,2193,2236"
LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
MKDEPPROG='cc -Ae -E -Wp,-M >
/dev/null 2>>$TMP'
STD_CWARNINGS="-fullwarn -woff 1209"
# Silence more than 250 instances of
# "prototyped function redeclared without prototype"
# "variable ... was set but never used"
IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
# -lxnet buys us one big porting headache... standards, gotta love 'em.
# AC_CHECK_LIB(xnet, socket, ,
# AC_CHECK_LIB(socket, socket)
# Use this for now, instead:
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_addr)
# Work around Solaris's select() limitations.
*-solaris2.[[89]]|*-solaris2.1?)
AC_DEFINE(FD_SETSIZE, 65536,
[Solaris hack to get select_large_fdset.])
AC_MSG_CHECKING(whether to use purify)
[ --with-purify[=PATH] use Rational purify],
use_purify="$withval", use_purify="no")
AC_PATH_PROG(purify_path, purify, purify)
purify_path="$use_purify"
if test -f $purify_path || test $purify_path = purify; then
AC_MSG_RESULT($purify_path)
PURIFYFLAGS="`echo $PURIFYOPTIONS`"
PURIFY="$purify_path $PURIFYFLAGS"
AC_MSG_ERROR([$purify_path not found.
Please choose the proper path with the following command:
configure --with-purify=PATH
[ --with-libtool use GNU libtool],
use_libtool="$withval", use_libtool="no")
LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
LIBTOOL_MODE_COMPILE='--mode=compile'
LIBTOOL_MODE_INSTALL='--mode=install'
LIBTOOL_MODE_LINK='--mode=link'
*) LIBTOOL_ALLOW_UNDEFINED= ;;
#
enable/disable dumping stack backtrace. Also check if the system supports
# glibc-compatible backtrace() function.
[ --enable-backtrace log stack backtrace on abort [[default=yes]]],
want_backtrace="$enableval", want_backtrace="yes")
ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1"
[return (backtrace((void **)0, 0));],
[AC_DEFINE([HAVE_LIBCTRACE], [], [if system have backtrace function])],)
ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE"
AC_SUBST(ISC_PLATFORM_USEBACKTRACE)
[ --enable-symtable use internal symbol table for backtrace
[[all|minimal(default)|none]]],
want_symtable="$enableval", want_symtable="minimal")
yes|all|minimal) # "yes" is a hidden value equivalent to "minimal"
AC_MSG_ERROR([Internal symbol table requires perl but no perl is found.
Install perl or explicitly disable the feature by --disable-symtable.])
if test "$use_libtool" = "yes"; then
AC_MSG_WARN([Internal symbol table does not work with libtool. Disabling symbol table.])
# we generate the internal symbol table only for those systems
# known to work to avoid unexpected build failure. Also, warn
# about unsupported systems when the feature is enabled
freebsd*|netbsd*|openbsd*|linux*|solaris*|darwin*)
if test $want_symtable = all; then
ALWAYS_MAKE_SYMTABLE="yes"
if test $want_symtable = yes -o $want_symtable = all
AC_MSG_WARN([this system is not known to generate internal symbol table safely; disabling it])
AC_SUBST(MKSYMTBL_PROGRAM)
AC_SUBST(ALWAYS_MAKE_SYMTABLE)
# File name extension for static archive files, for those few places
# where they are treated differently from dynamic ones.
AC_SUBST(LIBTOOL_MKDEP_SED)
AC_SUBST(LIBTOOL_MODE_COMPILE)
AC_SUBST(LIBTOOL_MODE_INSTALL)
AC_SUBST(LIBTOOL_MODE_LINK)
AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
AC_SUBST(LIBTOOL_IN_MAIN)
# build exportable DNS library?
[ --enable-exportlib build exportable library (GNU make required)
case "$enable_exportlib" in
for x in gmake gnumake make; do
if test -z "$gmake"; then
AC_MSG_ERROR([exportlib requires GNU make. Install it or disable the feature.])
BIND9_CO_RULE="%.$O: \${srcdir}/%.c"
AC_ARG_WITH(export-libdir,
[ --with-export-libdir[=PATH]
installation directory for the export library
export_libdir="$withval",)
if test -z "$export_libdir"; then
AC_ARG_WITH(export-includedir,
[ --with-export-includedir[=PATH]
installation directory for the header files of the
export_includedir="$withval",)
if test -z "$export_includedir"; then
AC_SUBST(export_includedir)
# Here begins a very long section to determine the system's networking
# capabilities. The order of the tests is significant.
[ --enable-ipv6 use IPv6 [default=autodetect]])
# We do the IPv6 compilation checking after libtool so that we can put
# the right suffix on the files.
AC_MSG_CHECKING(for IPv6 structures)
[struct sockaddr_in6 sin6; return (0);],
# See whether IPv6 support is provided via a Kame add-on.
# This is done before other IPv6 linking tests to LIBS is properly set.
AC_MSG_CHECKING(for Kame IPv6 support)
[ --with-kame[=PATH] use Kame IPv6 [default path
/usr/local/v6]],
use_kame="$withval", use_kame="no")
Please choose the proper path with the following command:
configure --with-kame=PATH
# Including it on Kame-using platforms is very bad, though, because
# Kame uses #error against direct inclusion. So include it on only
# the platform that is otherwise broken without it --
BSD/OS 4.0 through 4.1.
# This is done before the in6_pktinfo check because that's what
ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
# Now delve deeper into the suitability of the IPv6 support.
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
AC_MSG_CHECKING(for in6_addr)
[struct in6_addr in6; return (0);],
ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
isc_in_addr6_hack="#define in6_addr in_addr6"])
AC_MSG_CHECKING(for in6addr_any)
[struct in6_addr in6; in6 = in6addr_any; return (
in6.s6_addr[0]);],
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
AC_MSG_CHECKING(for in6addr_loopback)
[struct in6_addr in6; in6 = in6addr_loopback; return (
in6.s6_addr[0]);],
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
LWRES_HAVE_SIN6_SCOPE_ID="$result"
AC_MSG_CHECKING(for in6_pktinfo)
[struct in6_pktinfo xyzzy; return (0);],
ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
AC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
AC_MSG_CHECKING([for struct if_laddrreq])
],[ struct if_laddrreq a; ],
ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
AC_MSG_CHECKING([for struct if_laddrconf])
],[ struct if_laddrconf a; ],
ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
# Check for network functions that are often missing. We do this
# after the libtool checking, so we can put the right suffix on
# the files. It also needs to come after checking for a Kame add-on,
# which provides some (all?) of the desired functions.
AC_MSG_CHECKING([for inet_ntop with IPv6 support])
char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
[AC_MSG_RESULT(assuming inet_ntop needed)
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
# addresses with less than four octets, like "1.2.3". Also leading
# zeros should also be rejected.
AC_MSG_CHECKING([for working inet_pton with IPv6 support])
main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
(inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
[AC_MSG_RESULT(assuming target platform has working inet_pton)
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
[AC_MSG_RESULT(assuming inet_pton needed)
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
[AC_MSG_RESULT(assuming target platform has working inet_pton)
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
AC_SUBST(ISC_PLATFORM_NEEDNTOP)
AC_SUBST(ISC_PLATFORM_NEEDPTON)
# Look for a 4.4BSD-style sa_len member in struct sockaddr.
# Turn on 4.4BSD style sa_len support.
AC_MSG_CHECKING(for sa_len in struct sockaddr)
[struct sockaddr sa;
sa.sa_len = 0; return (0);],
ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"
LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"],
ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"
LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"])
AC_SUBST(ISC_PLATFORM_HAVESALEN)
AC_SUBST(LWRES_PLATFORM_HAVESALEN)
# Look for a 4.4BSD or 4.3BSD struct msghdr
AC_MSG_CHECKING(for struct msghdr flavor)
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
AC_MSG_CHECKING(for type in_port_t)
[in_port_t port = 25; return (0);],
ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
AC_SUBST(ISC_PLATFORM_NEEDPORTT)
AC_MSG_CHECKING(for struct addrinfo)
[struct addrinfo a; return (0);],
ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"
ISC_IRS_NEEDADDRINFO="#undef ISC_IRS_NEEDADDRINFO"
AC_DEFINE(HAVE_ADDRINFO)],
ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"
ISC_IRS_NEEDADDRINFO="#define ISC_IRS_NEEDADDRINFO 1"])
AC_SUBST(ISC_LWRES_NEEDADDRINFO)
AC_SUBST(ISC_IRS_NEEDADDRINFO)
AC_MSG_CHECKING(for struct rrsetinfo)
[struct rrsetinfo r; return (0);],
ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
AC_SUBST(ISC_LWRES_NEEDRRSETINFO)
AC_MSG_CHECKING(for int sethostent)
[int i = sethostent(0); return(0);],
ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"],
ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"])
AC_SUBST(ISC_LWRES_SETHOSTENTINT)
AC_MSG_CHECKING(for int endhostent)
[int i = endhostent(); return(0);],
ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
struct netent *getnetbyaddr(in_addr_t, int);],
ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"],
ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"])
AC_SUBST(ISC_LWRES_GETNETBYADDRINADDR)
AC_MSG_CHECKING(for int setnetent)
[int i = setnetent(0); return(0);],
ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
AC_SUBST(ISC_LWRES_SETNETENTINT)
AC_MSG_CHECKING(for int endnetent)
[int i = endnetent(); return(0);],
ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
AC_SUBST(ISC_LWRES_ENDNETENTINT)
AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
struct hostent *gethostbyaddr(const void *, size_t, int);],
ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
AC_MSG_CHECKING(for h_errno in
netdb.h)
[h_errno = 1; return(0);],
ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
AC_SUBST(ISC_LWRES_NEEDHERRNO)
# Sadly, the definitions of system-supplied getnameinfo(3) vary. Try to catch
AC_MSG_CHECKING(for getnameinfo prototype definitions)
int getnameinfo(const struct sockaddr *, socklen_t, char *,
socklen_t, char *, socklen_t, unsigned int);],
[AC_MSG_RESULT(socklen_t for buflen; u_int for flags)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t,
[Define to the buffer length type used by getnameinfo(3).])
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int,
[Define to the flags type used by getnameinfo(3).])],
int getnameinfo(const struct sockaddr *, socklen_t, char *,
size_t, char *, size_t, int);],
[AC_MSG_RESULT(size_t for buflen; int for flags)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
[AC_MSG_RESULT(not match any subspecies; assume standard definition)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])
#
...and same for gai_strerror().
AC_MSG_CHECKING(for gai_strerror prototype definitions)
char *gai_strerror(int ecode);],
[AC_MSG_RESULT(returning char *)
AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [char *],
[return type of gai_strerror])],
[AC_MSG_RESULT(not match any subspecies; assume standard definition)
AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [const char *])])
AC_CHECK_FUNC(getipnodebyname,
[ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
[ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
AC_CHECK_FUNC(getnameinfo,
[ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
[ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
AC_CHECK_FUNC(getaddrinfo,
[ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
AC_DEFINE(HAVE_GETADDRINFO)],
[ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
AC_SUBST(ISC_IRS_GETNAMEINFOSOCKLEN)
AC_ARG_ENABLE(getifaddrs,
[ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no]].],
want_getifaddrs="$enableval", want_getifaddrs="yes")
# This interface iteration code for getifaddrs() will fall back to using
AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required")
AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
# Look for a sysctl call to get the list of network interfaces.
case $ac_cv_header_sys_sysctl_h in
AC_MSG_CHECKING(for interface list sysctl)
AC_EGREP_CPP(found_rt_iflist, [
AC_DEFINE(HAVE_IFLIST_SYSCTL)],
# Check for some other useful functions that are not ever-present.
# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC
# reportedly defines strsep() without declaring it in <
string.h> when
# -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and
# AC_CHECK_FUNC() incorrectly succeeds because it declares
AC_MSG_CHECKING(for correctly declared strsep())
AC_TRY_LINK([#include <
string.h>], [char *sp; char *foo = strsep(&sp, ".");],
[AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
[AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
[ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
[ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
[ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
[ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
GENRANDOMLIB='${ISCLIBS}'])
AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
AC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
[ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
[ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
[ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
[ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
[ char buf[2]; return(*sprintf(buf,"x"));],
ISC_PRINT_OBJS="print.$O"
ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
LWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF"
[ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"
LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"]
AC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
AC_SUBST(LWRES_PLATFORM_NEEDSPRINTF)
[ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
[ISC_PRINT_OBJS="print.$O"
ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"])
AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
AC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF)
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
# Use our own SPNEGO implementation?
AC_ARG_ENABLE(isc-spnego,
[ --disable-isc-spnego use SPNEGO from GSSAPI library])
case "$enable_isc_spnego" in
USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
DST_EXTRA_SRCS="$DST_EXTRA_SRCS
spnego.c"
AC_MSG_RESULT(using SPNEGO from
lib/dns)
AC_MSG_RESULT(using SPNEGO from GSSAPI library)
# Determine the printf format characters to use when printing
# values of type isc_int64_t. This will normally be "ll", but where
# the compiler treats "long long" as a alias for "long" and printf
# doesn't know about "long long" use "l". Hopefully the sprintf
# will produce a inconsistent result in the later case. If the compiler
# fails due to seeing "%lld" we fall back to "l".
# Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
# %ld even for (long long)/
# Win32 uses "%I64d", but that's defined elsewhere since we don't use
AC_MSG_CHECKING(printf format modifier for 64-bit integers)
exit((sizeof(long long int) != sizeof(long int))? 0 :
(strcmp(buf, "0") != 0));
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
[AC_MSG_RESULT(assuming target platform uses ll)
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
# Note it is very recommended to *not* disable chroot(),
# this is only because chroot() was made obsolete by Posix.
[ --disable-chroot disable chroot])
AC_ARG_ENABLE(linux-caps,
[ --disable-linux-caps disable linux capabilities])
case "$enable_linux_caps" in
AC_CHECK_LIB(cap, cap_set_proc)
ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
AC_SUBST(ISC_PLATFORM_HAVESYSUNH)
AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
[Define if connect does not honour the permission on the UNIX domain socket.])
AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
[Define if connect does not honour the permission on the UNIX domain socket.])
AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
AC_MSG_CHECKING(for optarg declaration)
GEN_NEED_OPTARG="-DNEED_OPTARG=1"
AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
#
BSD/OS, and perhaps some others, don't define rlim_t.
AC_MSG_CHECKING(for type rlim_t)
[rlim_t rl = 19671212; return (0);],
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
AC_MSG_CHECKING(type of rlim_cur)
main() { struct rlimit r; exit(!(sizeof(
r.rlim_cur) == sizeof(int)));}],
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
main() { struct rlimit r; exit(!(sizeof(
r.rlim_cur) == sizeof(long int)));}],
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
main() { struct rlimit r; exit((!sizeof(
r.rlim_cur) == sizeof(long long int)));}],
[AC_MSG_RESULT(long long int)
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
],[AC_MSG_ERROR(this cannot happen)])
],[AC_MSG_ERROR(this cannot happen)])
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming long long int)])
AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
# Older HP-UX doesn't have gettune
# Compaq TruCluster requires more code for handling cluster IP aliases
AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
AC_CHECK_FUNC(clua_getaliasaddress,
AC_DEFINE(HAVE_TRUCLUSTER, 1,
[Define if running under Compaq TruCluster]))
# Some hosts need msg_namelen to match the size of the socket structure.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
AC_DEFINE(BROKEN_RECVMSG, 1,
[Define if recvmsg() does not meet all of the BSD socket API specifications.])
# Microsoft has their own way of handling shared libraries that requires
# additional qualifiers on extern variables. Unix systems don't need it.
AC_SUBST(ISC_PLATFORM_USEDECLSPEC)
ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
AC_SUBST(LWRES_PLATFORM_USEDECLSPEC)
LWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC"
AC_SUBST(IRS_PLATFORM_USEDECLSPEC)
IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC"
# Random remaining OS-specific issues involving compiler warnings.
# XXXDCL print messages to indicate some compensation is being done?
AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
hack_shutup_pthreadonceinit=yes
hack_shutup_stdargcast=yes
hack_shutup_pthreadonceinit=yes
AC_TRY_COMPILE([ #include <
pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
case "$hack_shutup_pthreadonceinit" in
# Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
case "$hack_shutup_sigwait" in
# Shut up a -Wmissing-prototypes warning for sigwait().
AC_DEFINE(SHUTUP_SIGWAIT)
case "$hack_shutup_sputaux" in
# Shut up a -Wmissing-prototypes warning from <
stdio.h>.
AC_DEFINE(SHUTUP_SPUTAUX)
case "$hack_shutup_stdargcast" in
# Shut up a -Wcast-qual warning from va_start().
AC_DEFINE(SHUTUP_STDARG_CAST)
ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH"
AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
# Check for if_nametoindex() for IPv6 scoped addresses support
AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
ac_cv_have_if_nametoindex=no)
case $ac_cv_have_if_nametoindex in
AC_CHECK_LIB(ipv6, if_nametoindex,
ac_cv_have_if_nametoindex=yes
case $ac_cv_have_if_nametoindex in
ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
AC_CHECK_FUNCS(nanosleep)
# Machine architecture dependent features
[ --enable-atomic enable machine specific atomic operations
enable_atomic="$enableval",
enable_atomic="autodetect")
if test "X$GCC" = "Xyes"; then
AC_MSG_CHECKING([if asm("isc"); works])
main() { asm("ics"); exit(0); }
CFLAGS="$CFLAGS -Wa,-many"
main() { asm("ics"); exit(0); }
[AC_MSG_RESULT([yes, required -Wa,-many])
[AC_MSG_RESULT([no, use_atomic disabled])
[AC_MSG_RESULT([cross compile, assume yes])
ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
if test "$use_atomic" = "yes"; then
AC_MSG_CHECKING([architecture type for atomic operations])
have_atomic=yes # set default
# XXX: some old x86 architectures actually do not support
# (some of) these operations. Do we need stricter checks?
exit((sizeof(void *) == 8) ? 0 : 1);
exit((sizeof(void *) == 8) ? 0 : 1);
mips-*|mipsel-*|mips64-*|mips64el-*)
if test "$have_atomic" = "yes"; then
AC_MSG_CHECKING([compiler support for inline assembly code])
# Check whether the compiler supports the assembly syntax we provide.
if test "X$GCC" = "Xyes"; then
# GCC's ASM extension always works
if test $arch = "x86_64"; then
# We can share the same code for gcc with x86_32
if test $arch = "powerpc"; then
# The MacOS (and maybe others) uses "r0" for register
# zero. Under
linux/ibm it is "0" for register 0.
# Probe to see if we have a MacOS style assembler.
AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
__asm__ volatile ("li r0, 0x0\n"::);
ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
# Tru64 compiler has its own syntax for inline
#error "unexpected compiler"
ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
# See if the generic __asm function works. If not,
# we need to disable the atomic operations.
ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
[compiler="not supported (atomic operations disabled)"
if test "$have_atomic" = "yes"; then
ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
if test "$have_xaddq" = "yes"; then
ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1"
ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
AC_SUBST(ISC_PLATFORM_HAVEXADD)
AC_SUBST(ISC_PLATFORM_HAVEXADDQ)
AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
AC_SUBST(ISC_PLATFORM_USEGCCASM)
AC_SUBST(ISC_PLATFORM_USEOSFASM)
AC_SUBST(ISC_PLATFORM_USESTDASM)
AC_SUBST(ISC_PLATFORM_USEMACASM)
# Activate "rrset-order fixed" or not?
AC_ARG_ENABLE(fixed-rrset,
[ --enable-fixed-rrset enable fixed rrset ordering
enable_fixed="$enableval",
AC_DEFINE(DNS_RDATASET_FIXED, 1,
[Define to enable "rrset-order fixed" syntax.])
# Activate "filter-aaaa-on-v4" or not?
AC_ARG_ENABLE(filter-aaaa,
[ --enable-filter-aaaa enable filtering of AAAA records over IPv4
enable_filter="$enableval",
AC_DEFINE(ALLOW_FILTER_AAAA_ON_V4, 1,
[Define to enable the "filter-aaaa-on-v4" option.])
# The following sets up how non-blocking i/o is established.
# Sunos, cygwin and solaris
2.x (x<5) require special handling.
*-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
*-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
AC_DEFINE(USE_FIONBIO_IOCTL, 1,
[Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
*) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
# This prevents the source address being set.
*-solaris2.[[012345]]|*-solaris2.5.1)
AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
[Define if you cannot bind() before connect() for TCP sockets.])
# The following sections deal with tools used for formatting
# the documentation. They are all optional, unless you are
# a developer editing the documentation source.
AC_PATH_PROGS(LATEX, latex, latex)
AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
AC_PATH_PROGS(W3M, w3m, w3m)
# Look for xsltproc (libxslt)
AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
# Look for xmllint (libxml2)
AC_PATH_PROG(XMLLINT, xmllint, xmllint)
AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
# Subroutine for searching for an ordinary file (
e.g., a stylesheet)
# in a number of directories:
# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
# If the file FILENAME is found in one of the DIRECTORIES, the shell
# variable VARIABLE is defined to its absolute pathname. Otherwise,
# it is set to FILENAME, with no directory prefix (that's not terribly
# useful, but looks less confusing in substitutions than leaving it
# empty). The variable VARIABLE will be substituted into output files.
AC_DEFUN(NOM_PATH_FILE, [
AC_MSG_RESULT("not found");
# Look for Docbook-XSL stylesheets. Location probably varies by system.
# If it's not explicitly specified, guess where it might be found, based on
# where SGML stuff lives on some systems (FreeBSD is the only one we're sure
AC_MSG_CHECKING(for Docbook-XSL path)
[ --with-docbook-xsl=PATH Specify path for Docbook-XSL stylesheets],
docbook_path="$withval", docbook_path="auto")
docbook_xsl_trees="$withval"
AC_MSG_RESULT($docbook_xsl_trees)
# Look for stylesheets we need.
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML,
html/chunk.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML,
xhtml/chunk.xsl, $docbook_xsl_trees)
# Same dance for db2latex
# No idea where this lives except on FreeBSD.
# Look for stylesheets we need.
# Look for "admonition" image directory. Can't use NOM_PATH_FILE()
# because it's a directory, so just do the same things, inline.
for d in $db2latex_xsl_trees
XSLT_DB2LATEX_ADMONITIONS=$dd
if test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
AC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
[ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]],
use_idn="$withval", use_idn="no")
if test X$prefix = XNONE ; then
[ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]],
use_libiconv="$withval", use_libiconv="no")
if test X$prefix = XNONE ; then
[ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]],
[ --with-idnlib=ARG specify libidnkit],
idnlib="$withval", idnlib="no")
if test "$idnlib" = yes; then
AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
if test "$use_idn" != no; then
AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.])
if test "$idnlib" != no; then
IDNLIBS="$idnlib $iconvlib"
AC_CHECK_FUNCS(setlocale)
AC_SUBST(BIND9_TOP_BUILDDIR)
AC_SUBST(BIND9_ISC_BUILDINCLUDE)
AC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
AC_SUBST(BIND9_DNS_BUILDINCLUDE)
AC_SUBST(BIND9_LWRES_BUILDINCLUDE)
AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
if test "X$srcdir" != "X"; then
BIND9_ISC_BUILDINCLUDE=""
BIND9_ISCCC_BUILDINCLUDE=""
BIND9_ISCCFG_BUILDINCLUDE=""
BIND9_DNS_BUILDINCLUDE=""
BIND9_LWRES_BUILDINCLUDE=""
BIND9_BIND9_BUILDINCLUDE=""
AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
AC_SUBST_FILE(BIND9_MAKE_RULES)
BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}"
if test -z "$ac_configure_args"; then
BIND9_CONFIGARGS="defaults"
for a in $ac_configure_args
BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
AC_SUBST(BIND9_CONFIGARGS)
AC_SUBST_FILE(LIBISC_API)
AC_SUBST_FILE(LIBISCCC_API)
AC_SUBST_FILE(LIBISCCFG_API)
AC_SUBST_FILE(LIBDNS_API)
AC_SUBST_FILE(LIBBIND9_API)
AC_SUBST_FILE(LIBLWRES_API)
AC_SUBST_FILE(LIBIRS_API)
# Configure any DLZ drivers.
# USE_DLZ to a non-empty value, which will be our clue to
# enable the DLZ core functions.
# This section has to come after the libtool stuff because it needs to
# know how to name the driver object files.
AC_CONFIG_FILES([$DLZ_DRIVER_RULES])
AC_SUBST(DLZ_DRIVER_INCLUDES)
AC_SUBST(DLZ_DRIVER_LIBS)
AC_SUBST(DLZ_DRIVER_SRCS)
AC_SUBST(DLZ_DRIVER_OBJS)
AC_SUBST_FILE(DLZ_DRIVER_RULES)
if test "$cross_compiling" = "yes"; then
if test -z "$BUILD_CC"; then
AC_ERROR([BUILD_CC not set])
BUILD_CFLAGS="$BUILD_CFLAGS"
BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
BUILD_LDFLAGS="$BUILD_LDFLAGS"
BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
for e in $BUILD_LDFLAGS ; do
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
ee=`echo $e | sed -e 's%^-L%-R%'`
NEWFLAGS="$NEWFLAGS $e $ee"
BUILD_LDFLAGS="$NEWFLAGS"
for e in $DNS_GSSAPI_LIBS ; do
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
ee=`echo $e | sed -e 's%^-L%-R%'`
NEWFLAGS="$NEWFLAGS $e $ee"
DNS_GSSAPI_LIBS="$NEWFLAGS"
for e in $DNS_CRYPTO_LIBS ; do
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
ee=`echo $e | sed -e 's%^-L%-R%'`
NEWFLAGS="$NEWFLAGS $e $ee"
DNS_CRYPTO_LIBS="$NEWFLAGS"
# Don't just put these into configure, it won't work right if somebody
# Files to configure. These are listed here because we used to
# specify them as arguments to AC_OUTPUT. It's (now) ok to move these
# elsewhere if there's a good reason for doing so.
# Now that the Makefiles exist we can ensure that everything is rebuilt.
[ --with-make-clean Run "make clean" at end of configure [[yes|no]].],
make_clean="$withval", make_clean="yes")
if test "X$USE_OPENSSL" = "X"; then
BIND is being built without OpenSSL. This means it will not have DNSSEC support.
if test "X$OPENSSL_WARNING" != "X"; then
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
WARNING Your OpenSSL crypto library may be vulnerable to WARNING
WARNING one or more of the the following known security WARNING
WARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
WARNING CVE-2006-2940. WARNING
WARNING It is recommended that you upgrade to OpenSSL WARNING
WARNING version 0.9.8d/0.9.7l (or greater). WARNING
WARNING You can disable this warning by specifying: WARNING
WARNING --disable-openssl-version-check WARNING
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
# Tell Emacs to edit this file in shell mode.