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.
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 compatability 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=.
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)
case $ac_cv_header_unistd_h in
AC_MSG_CHECKING(if
unistd.h defines fd_set)
[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 compatible OpenSSL library)
[ --with-openssl=PATH Specify path for system-supplied openssl
(rather than using bind-9 internal openssl)],
use_openssl="$withval", use_openssl="no")
# If the user didn't specify where openssl is, and we didn't find or it
# is incompatible with our code, use our internal one.
# XXX This appears to assume that the user specified path is correct,
DST_PRIVATEOPENSSL='-DDST_USE_PRIVATE_OPENSSL'
dst_privateopenssl='openssl'
DST_OPENSSL_OBJS='${OPENSSLOBJS}'
AC_MSG_RESULT(using private library)
AC_MSG_ERROR([--with-openssl must specify a path])
AC_SUBST(DST_PRIVATEOPENSSL)
AC_SUBST(dst_privateopenssl)
AC_SUBST(DST_OPENSSL_INC)
AC_SUBST(DST_OPENSSL_LIB)
AC_SUBST(DST_OPENSSL_OBJS)
# This would include the system openssl path (and linker options to use
# it as needed) if it is found.
AC_SUBST(DNS_OPENSSL_LIBS)
# was --with-gssapi specified?
AC_MSG_CHECKING(for GSSAPI library)
[ --with-gssapi=PATH Specify path for system-supplied GSSAPI],
use_gssapi="$withval", use_gssapi="no")
AC_MSG_RESULT(not specified)
AC_MSG_ERROR([--with-gssapi must specify a path])
AC_SUBST(DNS_GSSAPI_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_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")
# Begin pthreads checking.
# First, decide whether to use multithreading or not.
AC_MSG_CHECKING(whether to look for thread support)
[ --disable-threads disable multithreading])
case "$enable_threads" in
AC_MSG_ERROR([--enable-threads takes yes or no])
# Search for / configure pthreads in a system-dependent fashion.
# NetBSD has multiple pthreads implementations. The
# recommended one to use is "unproven-pthreads". The
# older "mit-pthreads" may also work on some NetBSD
# versions. The PTL2 thread library does not
# currently work with bind9, but can be chosen with
# the --with-ptl2 option for those who wish to
AC_MSG_CHECKING(which NetBSD thread library to use)
[ --with-ptl2 on NetBSD, use the ptl2 thread library (experimental)],
use_ptl2="$withval", use_ptl2="no")
if test "X$use_ptl2" = "Xyes"
[linking with PTL2 is highly experimental and not expected to work])
lib2="-lpthread -lm -lgcc -lpthread"
AC_CHECK_LIB(pthread, pthread_create,,
AC_CHECK_LIB(pthread, __pthread_create,,
AC_CHECK_LIB(pthread, __pthread_create_system,,
AC_CHECK_LIB(c_r, pthread_create,,
AC_CHECK_LIB(c, pthread_create,,
# 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),)
# 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),)
# 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.
AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
# Look for sysconf to allow detection of the number of processors.
AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
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"
ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
AC_SUBST(ISC_PLATFORM_USETHREADS)
ISC_THREAD_DIR=$thread_dir
# flockfile is usually provided by pthreads, but we may want to use it
# even if compiled with --disable-threads.
AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
# Indicate what the final decision was regarding threads.
AC_MSG_CHECKING(whether to build with threads)
# Additional compiler settings.
IRIX_DNSSEC_WARNINGS_HACK=""
if test "X$GCC" = "Xyes"; then
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings"
# 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"
LIBS="-Wl,+vnocompatwarnings $LIBS"
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"
YACC="yacc" # bison calls alloca, avoid on UnixWare
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)
# AC_CHECK_LIB(nsl, inet_ntoa)
# Use this for now, instead:
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)
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 (following indented options supported)],
use_libtool="$withval", use_libtool="no")
# File name extension for static archive files, for those few places
# where they are treated differently from dynamic ones.
# Here begins a very long section to determine the system's networking
# capabilities. The order of the tests is signficant.
[ --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"
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 (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 sin6_scope_id in struct sockaddr_in6)
result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
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"
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_HAVEIN6PKTINFO)
AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
# 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])
[inet_ntop(0, 0, 0, 0); return (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_CHECKING([for inet_pton])
[inet_pton(0, 0, 0); return (0);],
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_CHECKING([for inet_aton])
[struct in_addr in; inet_aton(0, &in); return (0);],
ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
AC_SUBST(ISC_PLATFORM_NEEDNTOP)
AC_SUBST(ISC_PLATFORM_NEEDPTON)
AC_SUBST(ISC_PLATFORM_NEEDATON)
# 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"
AC_DEFINE(HAVE_ADDRINFO)],
ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"])
AC_SUBST(ISC_LWRES_NEEDADDRINFO)
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)
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)
# Look for a sysctl call to get the list of network interfaces.
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.
[ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
[ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
[ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS
print.c"
ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
# Determine the printf format characters to use when printing
# values of type isc_int64_t. We make the assumption that platforms
# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
# but that's defined elsewhere since we don't use configure on Win32.
AC_MSG_CHECKING(printf format modifier for 64-bit integers)
AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
[AC_MSG_RESULT(default ll)
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
#
BSD/OS, and perhaps some others, don't define rlim_t.
AC_MSG_CHECKING(for type rlim_t)
[rlim_t rl = 19671212; return (0);],
AC_MSG_CHECKING(sizeof 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_SUBST(ISC_PLATFORM_RLIMITTYPE)
# 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_stdargcast=yes
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)
# Look for jade, preferring openjade if installed.
AC_PATH_PROGS(JADE, openjade jade, jade)
AC_PATH_PROGS(PDFTEX, pdftex)
AC_MSG_CHECKING(for SGML files)
AC_MSG_RESULT(in $SGMLDIR)
if test "X$SGMLDIR" = "X"
AC_MSG_RESULT("not found");
AC_MSG_CHECKING(for XML files)
AC_MSG_RESULT(in $XMLDIR)
AC_MSG_RESULT("not found");
AC_SUBST(BIND9_TOP_BUILDDIR)
AC_SUBST(BIND9_ISC_BUILDINCLUDE)
AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
AC_SUBST(BIND9_DNS_BUILDINCLUDE)
AC_SUBST(BIND9_OMAPI_BUILDINCLUDE)
AC_SUBST(BIND9_LWRES_BUILDINCLUDE)
if test "X$srcdir" != "X"; then
BIND9_ISC_BUILDINCLUDE=""
BIND9_ISCCFG_BUILDINCLUDE=""
BIND9_DNS_BUILDINCLUDE=""
BIND9_OMAPI_BUILDINCLUDE=""
BIND9_LWRES_BUILDINCLUDE=""
AC_SUBST_FILE(BIND9_INCLUDES)
AC_SUBST_FILE(BIND9_MAKE_RULES)
BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
AC_SUBST_FILE(LIBISC_API)
AC_SUBST_FILE(LIBISCCFG_API)
AC_SUBST_FILE(LIBDNS_API)
AC_SUBST_FILE(LIBLWRES_API)
AC_SUBST_FILE(LIBOMAPI_API)
# Tell Emacs to edit this file in shell mode.