summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/configure.in
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2004-09-28 17:14:10 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2004-09-28 17:14:10 +0000
commitff09ecf5e523f7c1678821dfc8753880775b9bc9 (patch)
treecfbc352a0605ad89a62d844079441dca80fca83d /usr.sbin/bind/configure.in
parentae87190605c9d85eaf9ba7728034f343685da32a (diff)
resolve conflicts
Diffstat (limited to 'usr.sbin/bind/configure.in')
-rw-r--r--usr.sbin/bind/configure.in455
1 files changed, 401 insertions, 54 deletions
diff --git a/usr.sbin/bind/configure.in b/usr.sbin/bind/configure.in
index cd9fe2d3f67..588bc23a6cb 100644
--- a/usr.sbin/bind/configure.in
+++ b/usr.sbin/bind/configure.in
@@ -1,19 +1,24 @@
+# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
-# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
-# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
-# INTERNET SOFTWARE CONSORTIUM 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.
+# 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.
-AC_REVISION($Revision: 1.8 $)
+dnl
+AC_DIVERT_PUSH(1)dnl
+esyscmd([sed "s/^/# /" COPYRIGHT])dnl
+AC_DIVERT_POP()dnl
+
+AC_REVISION($Revision: 1.9 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
@@ -187,9 +192,48 @@ fi
AC_PROG_CC
+#
+# gcc's optimiser is broken at -02 for ultrasparc
+#
+if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
+ case "$host" in
+ sparc-*)
+ CCFLAGS="-g -O1"
+ ;;
+ esac
+fi
+
+#
+# OS dependent CC flags
+#
+case "$host" in
+ # OSF 5.0: recv/send are only avaliable with -D_POSIX_PII_SOCKET or
+ # -D_XOPEN_SOURCE_EXTENDED.
+ *-dec-osf*)
+ 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
+ *-hp-hpux*)
+ STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
+ LIBS="-lxnet $LIBS"
+ ;;
+ # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
+ *-solaris*)
+ STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
+ CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
+ ;;
+esac
+
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/sysctl.h)
+AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h,,,
+[$ac_includes_default
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
AC_C_CONST
AC_C_INLINE
@@ -227,6 +271,27 @@ AC_TRY_COMPILE([],[long long i = 0; return (0);],
AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
#
+# check if we have lifconf
+#
+AC_MSG_CHECKING(for struct lifconf)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+],
+[
+struct lifconf lifconf;
+lifconf.lifc_len = 0;
+]
+,
+ [AC_MSG_RESULT(yes)
+ ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
+ [AC_MSG_RESULT(no)
+ ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
+AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
+
+
+#
# check if we need to #include sys/select.h explicitly
#
case $ac_cv_header_unistd_h in
@@ -278,7 +343,7 @@ AC_MSG_CHECKING(for OpenSSL library)
AC_ARG_WITH(openssl,
[ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
(Required for DNSSEC)],
- use_openssl="$withval", use_openssl="no")
+ use_openssl="$withval", use_openssl="auto")
case "$use_openssl" in
no)
@@ -287,7 +352,7 @@ case "$use_openssl" in
USE_OPENSSL=""
;;
*)
- if test "$use_openssl" = "yes"
+ if test "$use_openssl" = "yes" -o "$use_openssl" = "auto"
then
# User did not specify a path - guess it
openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg"
@@ -304,11 +369,30 @@ case "$use_openssl" in
AC_MSG_RESULT(not found)
AC_MSG_ERROR(
[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
+ elif test "$use_openssl" = "auto"
+ then
+ DST_OPENSSL_INC=""
+ USE_OPENSSL=""
+ AC_MSG_RESULT(not found)
+ break
fi
fi
USE_OPENSSL='-DOPENSSL'
- DST_OPENSSL_INC="-I$use_openssl/include"
- DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
+ if test "$use_openssl" = "/usr"
+ then
+ DST_OPENSSL_INC=""
+ DNS_OPENSSL_LIBS="-lcrypto"
+ else
+ DST_OPENSSL_INC="-I$use_openssl/include"
+ case $host in
+ *-solaris*)
+ DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
+ ;;
+ *)
+ DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
+ ;;
+ esac
+ fi
AC_MSG_RESULT(using openssl from $use_openssl/lib and $use_openssl/include)
saved_cflags="$CFLAGS"
@@ -395,6 +479,14 @@ int main() {
[AC_MSG_RESULT(not compatible)
AC_MSG_ERROR(you need OpenSSL 0.9.6e/0.9.7-beta2 (or newer): CERT CA-2002-23)],
[AC_MSG_RESULT(assuming target platform has compatible version)]))
+ AC_MSG_CHECKING(for OpenSSL DSA support)
+ if test -f $use_openssl/include/openssl/dsa.h
+ then
+ AC_DEFINE(HAVE_OPENSSL_DSA)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
CFLAGS="$saved_cflags"
LIBS="$saved_libs"
;;
@@ -405,9 +497,9 @@ esac
# it as needed) if it is found.
#
-AC_SUBST(DST_OPENSSL_INC)
-AC_SUBST(DNS_OPENSSL_LIBS)
AC_SUBST(USE_OPENSSL)
+AC_SUBST(DST_OPENSSL_INC)
+DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
#
# was --with-gssapi specified?
@@ -441,7 +533,13 @@ DNS_GSSAPI_LIBS=''
AC_SUBST(USE_GSSAPI)
AC_SUBST(DST_GSSAPI_INC)
-AC_SUBST(DNS_GSSAPI_LIBS)
+DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_GSSAPI_LIBS"
+
+#
+# Applications linking with libdns also need to link with these libraries.
+#
+
+AC_SUBST(DNS_CRYPTO_LIBS)
#
# was --with-randomdev specified?
@@ -512,13 +610,21 @@ case $host in
use_threads=true ;;
*-sgi-irix*)
use_threads=true ;;
-*-sco-sysv*uw*)
+*-sco-sysv*uw*|*-*-sysv*UnixWare*)
# UnixWare
use_threads=false ;;
+*-*-sysv*OpenUNIX*)
+ # UnixWare
+ use_threads=true ;;
*-netbsd*)
- # Socket I/O optimizations introduced in 9.2 expose a
- # bug in unproven-pthreads; see PR #12650
- use_threads=false ;;
+ if test -r /usr/lib/libpthread.so ; then
+ use_threads=true
+ else
+ # Socket I/O optimizations introduced in 9.2 expose a
+ # bug in unproven-pthreads; see PR #12650
+ use_threads=false
+ fi
+ ;;
*-openbsd*)
# OpenBSD users have reported that named dumps core on
# startup when built with threads.
@@ -593,21 +699,27 @@ then
[linking with PTL2 is highly experimental and not expected to work])
CC=ptlgcc
else
- if test ! -d $LOCALBASE/pthreads
+ if test -r /usr/lib/libpthread.so
then
- AC_MSG_RESULT(none)
- AC_MSG_ERROR("could not find thread libraries")
- fi
+ AC_MSG_RESULT(native)
+ LIBS="-lpthread $LIBS"
+ else
+ if test ! -d $LOCALBASE/pthreads
+ then
+ AC_MSG_RESULT(none)
+ AC_MSG_ERROR("could not find thread libraries")
+ fi
- if $use_threads
- then
- AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
- pkg="$LOCALBASE/pthreads"
- lib1="-L$pkg/lib -Wl,-R$pkg/lib"
- lib2="-lpthread -lm -lgcc -lpthread"
- LIBS="$lib1 $lib2 $LIBS"
- CPPFLAGS="$CPPFLAGS -I$pkg/include"
- STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
+ if $use_threads
+ then
+ AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
+ pkg="$LOCALBASE/pthreads"
+ lib1="-L$pkg/lib -Wl,-R$pkg/lib"
+ lib2="-lpthread -lm -lgcc -lpthread"
+ LIBS="$lib1 $lib2 $LIBS"
+ CPPFLAGS="$CPPFLAGS -I$pkg/include"
+ STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
+ fi
fi
fi
;;
@@ -678,7 +790,7 @@ then
#
# UnixWare does things its own way.
#
- *-sco-sysv*uw*)
+ *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
;;
esac
@@ -719,10 +831,14 @@ then
*-ibm-aix*)
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
;;
- *-sco-sysv*uw*)
+ *-sco-sysv*uw*|*-*-sysv*UnixWare*)
CC="$CC -Kthread"
CCOPT="$CCOPT -Kthread"
;;
+ *-*-sysv*OpenUNIX*)
+ CC="$CC -Kpthread"
+ CCOPT="$CCOPT -Kpthread"
+ ;;
esac
fi
ALWAYS_DEFINES="-D_REENTRANT"
@@ -741,6 +857,11 @@ ISC_THREAD_DIR=$thread_dir
AC_SUBST(ISC_THREAD_DIR)
#
+# 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
# be defined.
@@ -763,6 +884,19 @@ fi
#
#
+# Large File
+#
+AC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
+ want_largefile="yes", want_largefile="no")
+case $want_largefile in
+ yes)
+ ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ ;;
+ *)
+ ;;
+esac
+
+#
# Additional compiler settings.
#
MKDEPCC="$CC"
@@ -811,7 +945,7 @@ else
*-solaris*)
MKDEPCFLAGS="-xM"
;;
- *-sco-sysv*uw*)
+ *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
# UnixWare
CC="$CC -w"
;;
@@ -902,6 +1036,9 @@ case $use_libtool in
O=lo
A=la
LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
+ LIBTOOL_MODE_COMPILE='--mode=compile'
+ LIBTOOL_MODE_INSTALL='--mode=install'
+ LIBTOOL_MODE_LINK='--mode=link'
;;
*)
O=o
@@ -909,6 +1046,9 @@ case $use_libtool in
LIBTOOL=
AC_SUBST(LIBTOOL)
LIBTOOL_MKDEP_SED=
+ LIBTOOL_MODE_COMPILE=
+ LIBTOOL_MODE_INSTALL=
+ LIBTOOL_MODE_LINK=
;;
esac
@@ -922,6 +1062,9 @@ AC_SUBST(O)
AC_SUBST(A)
AC_SUBST(SA)
AC_SUBST(LIBTOOL_MKDEP_SED)
+AC_SUBST(LIBTOOL_MODE_COMPILE)
+AC_SUBST(LIBTOOL_MODE_INSTALL)
+AC_SUBST(LIBTOOL_MODE_LINK)
#
# build libbind?
@@ -1038,7 +1181,7 @@ changequote([, ])
# This is similar to the netinet6/in6.h issue.
#
case "$host" in
-*-sco-sysv*uw*)
+*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
# UnixWare
ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
@@ -1123,8 +1266,10 @@ $isc_netinet6in6_hack
],
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
[AC_MSG_RESULT(yes)
+ ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
[AC_MSG_RESULT(no)
+ ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
LWRES_HAVE_SIN6_SCOPE_ID="$result"
@@ -1149,6 +1294,7 @@ $isc_netinet6in6_hack
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"
ISC_IPV6_H="ipv6.h"
ISC_IPV6_O="ipv6.$O"
ISC_ISCIPV6_O="unix/ipv6.$O"
@@ -1175,6 +1321,29 @@ AC_SUBST(ISC_IPV6_O)
AC_SUBST(ISC_ISCIPV6_O)
AC_SUBST(ISC_IPV6_C)
AC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
+AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
+
+AC_MSG_CHECKING([for struct if_laddrreq])
+AC_TRY_LINK([
+#include <sys/types.h>
+#include <net/if6.h>
+],[ struct if_laddrreq a; ],
+ [AC_MSG_RESULT(yes)
+ ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
+ [AC_MSG_RESULT(no)
+ ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
+AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
+
+AC_MSG_CHECKING([for struct if_laddrconf])
+AC_TRY_LINK([
+#include <sys/types.h>
+#include <net/if6.h>
+],[ struct if_laddrconf a; ],
+ [AC_MSG_RESULT(yes)
+ ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
+ [AC_MSG_RESULT(no)
+ 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
@@ -1406,6 +1575,44 @@ AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
+AC_ARG_ENABLE(getifaddrs,
+[ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no|glibc]].
+ glibc: Use getifaddrs() in glibc if you know it supports IPv6.],
+ want_getifaddrs="$enableval", want_getifaddrs="yes")
+
+case $want_getifaddrs in
+yes|glibc)
+#
+# Do we have getifaddrs() ?
+#
+case $host in
+*-linux*)
+ # Some recent versions of glibc support getifaddrs() which does not
+ # provide AF_INET6 addresses while the function provided by the USAGI
+ # project handles the AF_INET6 case correctly. We need to avoid
+ # using the former but prefer the latter unless overridden by
+ # --enable-getifaddrs=glibc.
+ if test $use_getifaddrs = glibc
+ then
+ AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
+ else
+ save_LIBS="$LIBS"
+ LIBS="-L/usr/local/v6/lib $LIBS"
+ AC_CHECK_LIB(inet6, getifaddrs,
+ LIBS="$LIBS -linet6"
+ AC_DEFINE(HAVE_GETIFADDRS),
+ LIBS=${save_LIBS})
+ fi
+ ;;
+*)
+ AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
+ ;;
+esac
+;;
+no)
+;;
+esac
+
#
# Look for a sysctl call to get the list of network interfaces.
#
@@ -1442,6 +1649,16 @@ AC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");],
[AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
+AC_CHECK_FUNC(memmove,
+ [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
+ [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
+AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
+
+AC_CHECK_FUNC(strtoul,
+ [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"],
+ [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"])
+AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
+
AC_CHECK_FUNC(strlcpy,
[ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
[ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
@@ -1452,21 +1669,70 @@ AC_CHECK_FUNC(strlcat,
[ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
+ISC_PRINT_OBJS=
+ISC_PRINT_SRCS=
+AC_MSG_CHECKING(sprintf)
+AC_TRY_COMPILE([
+#include <stdio.h>
+],
+[ char buf[2]; return(*sprintf(buf,"x"));],
+[
+ISC_PRINT_OBJS="print.$O"
+ISC_PRINT_SRCS="print.c"
+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)
+
AC_CHECK_FUNC(vsnprintf,
- [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"])
+ [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
+ LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
+ [ISC_PRINT_OBJS="print.$O"
+ ISC_PRINT_SRCS="print.c"
+ 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))
AC_SUBST(ISC_EXTRA_OBJS)
AC_SUBST(ISC_EXTRA_SRCS)
+# 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 inconsistant result in the later case. If the compiler
+# fails due to seeing "%lld" we fall back to "l".
#
-# All platforms use %lld for "long long", regardless of its size.
-ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
+# 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([
+#include <stdio.h>
+main() {
+ long long int j = 0;
+ char buf[100];
+ buf[0] = 0;
+ sprintf(buf, "%lld", j);
+ exit((sizeof(long long int) != sizeof(long int))? 0 :
+ (strcmp(buf, "0") != 0));
+}
+],
+ [AC_MSG_RESULT(ll)
+ ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
+ [AC_MSG_RESULT(l)
+ ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
+ [AC_MSG_RESULT(assuming target platform uses ll)
+ ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
#
@@ -1534,6 +1800,20 @@ ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
#
+# Compaq TruCluster requires more code for handling cluster IP aliases
+#
+case "$host" in
+ *-dec-osf*)
+ 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]))
+ ;;
+ *)
+ ;;
+esac
+
+#
# Microsoft has their own way of handling shared libraries that requires
# additional qualifiers on extern variables. Unix systems don't need it.
#
@@ -1557,7 +1837,7 @@ case "$host" in
hack_shutup_sigwait=yes
hack_shutup_sputaux=yes
;;
- [*-bsdi4[12]*])
+ [*-bsdi4.[12]*])
hack_shutup_stdargcast=yes
;;
[*-solaris2.[89]])
@@ -1602,13 +1882,38 @@ case "$hack_shutup_stdargcast" in
esac
#
+# 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
+no)
+ case "$host" in
+ *-hp-hpux*)
+ AC_CHECK_LIB(ipv6, if_nametoindex,
+ ac_cv_have_if_nametoindex=yes
+ LIBS="-lipv6 $LIBS",)
+ ;;
+ esac
+esac
+case $ac_cv_have_if_nametoindex in
+yes)
+ ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
+ ;;
+*)
+ ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
+ ;;
+esac
+AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
+
+#
# The following sections deal with tools used for formatting
# the documentation. They are all optional, unless you are
# a developer editing the documentation source.
#
# Directory trees where SGML files are commonly found.
-sgmltrees="/usr/pkg/share/sgml /usr/local/share/sgml"
+sgmltrees="/usr/pkg/share/sgml /usr/local/share/sgml /usr/share/sgml"
#
# Look for openjade. Plain jade is no longer supported.
@@ -1661,16 +1966,35 @@ fi
AC_SUBST($1)
])
-NOM_PATH_FILE(SGMLCATALOG, catalog, $sgmltrees)
+#
+# Look for the SGML catalog.
+# Its location varies, so far we have seen:
+#
+# NetBSD /usr/pkg/share/sgml/docbook/catalog
+# FreeBSD /usr/local/share/sgml/docbook/catalog
+# Linux /usr/local/share/dsssl/docbook/catalog
+# /usr/share/sgml/docbook/dsssl-stylesheets/catalog
+#
+catalogpath=""
+for d in $sgmltrees
+do
+ catalogpath="$catalogpath $d"
+ for s in docbook/dsssl-stylesheets
+ do
+ catalogpath="$catalogpath $d/$s"
+ done
+done
+NOM_PATH_FILE(SGMLCATALOG, catalog, $catalogpath)
#
# Look for the HTML stylesheet html/docbook.dsl, used for
# formatting man pages in HTML. Its location varies,
# so far we have seen:
#
-# NetBSD /usr/pkg/share/docbook/dsssl/modular/
-# FreeBSD /usr/local/share/docbook/dsssl/modular/
+# NetBSD /usr/pkg/share/sgml/docbook/dsssl/modular/
+# FreeBSD /usr/local/share/sgml/docbook/dsssl/modular/
# Linux /usr/local/share/dsssl/docbook/
+# /usr/share/sgml/docbook/dsssl-stylesheets/
#
# Ditto for the print stylesheet print/docbook.dsl.
#
@@ -1678,7 +2002,7 @@ NOM_PATH_FILE(SGMLCATALOG, catalog, $sgmltrees)
stylepath=""
for d in $sgmltrees
do
- for s in docbook/dsssl/modular dsssl/docbook
+ for s in docbook/dsssl/modular dsssl/docbook docbook/dsssl-stylesheets
do
stylepath="$stylepath $d/$s"
done
@@ -1687,10 +2011,24 @@ NOM_PATH_FILE(HTMLSTYLE, html/docbook.dsl, $stylepath)
NOM_PATH_FILE(PRINTSTYLE, print/docbook.dsl, $stylepath)
#
-# Look for XML declarations
+# Look for XML declarations.
+# Its location varies, so far we have seen:
+#
+# NetBSD /usr/pkg/share/sgml/docbook/dsssl/modular/dtds/decls/
+# FreeBSD /usr/local/share/sgml/docbook/dsssl/modular/dtds/decls/
+# Linux /usr/local/share/dsssl/docbook/dtds/decls/
+# /usr/share/sgml/docbook/dsssl-stylesheets/dtds/decls/
#
-NOM_PATH_FILE(XMLDCL, docbook/dsssl/modular/dtds/decls/xml.dcl, $sgmltrees)
+xmlpath=""
+for d in $sgmltrees
+do
+ for s in docbook/dsssl/modular dsssl/docbook docbook/dsssl-stylesheets
+ do
+ xmlpath="$xmlpath $d/$s"
+ done
+done
+NOM_PATH_FILE(XMLDCL, dtds/decls/xml.dcl, $xmlpath)
#
# Look for docbook2man-spec.pl
@@ -1709,22 +2047,25 @@ 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="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
+ BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
else
BIND9_ISC_BUILDINCLUDE=""
BIND9_ISCCC_BUILDINCLUDE=""
BIND9_ISCCFG_BUILDINCLUDE=""
BIND9_DNS_BUILDINCLUDE=""
BIND9_LWRES_BUILDINCLUDE=""
+ BIND9_BIND9_BUILDINCLUDE=""
fi
-AC_SUBST_FILE(BIND9_INCLUDES)
-BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
+AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
+BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
AC_SUBST_FILE(BIND9_MAKE_RULES)
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
@@ -1745,6 +2086,9 @@ LIBISCCFG_API=$srcdir/lib/isccfg/api
AC_SUBST_FILE(LIBDNS_API)
LIBDNS_API=$srcdir/lib/dns/api
+AC_SUBST_FILE(LIBBIND9_API)
+LIBBIND9_API=$srcdir/lib/bind9/api
+
AC_SUBST_FILE(LIBLWRES_API)
LIBLWRES_API=$srcdir/lib/lwres/api
@@ -1779,6 +2123,9 @@ AC_OUTPUT(
lib/dns/sec/dst/Makefile
lib/dns/sec/dst/include/Makefile
lib/dns/sec/dst/include/dst/Makefile
+ lib/bind9/Makefile
+ lib/bind9/include/Makefile
+ lib/bind9/include/bind9/Makefile
lib/lwres/Makefile
lib/lwres/include/Makefile
lib/lwres/include/lwres/Makefile