summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/configure.in
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2007-01-10 19:08:00 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2007-01-10 19:08:00 +0000
commitd3ebbe858ab7fccef9faa9ddc6b31fa65c763765 (patch)
tree1d8e5e596805d3fc4ad06e07592d30c798138f6f /usr.sbin/bind/configure.in
parent4ceaae588a26669445a79d94a13455d26920d0c8 (diff)
resolve conflicts and regen configure script
Diffstat (limited to 'usr.sbin/bind/configure.in')
-rw-r--r--usr.sbin/bind/configure.in266
1 files changed, 175 insertions, 91 deletions
diff --git a/usr.sbin/bind/configure.in b/usr.sbin/bind/configure.in
index 85779e36c63..378c6262951 100644
--- a/usr.sbin/bind/configure.in
+++ b/usr.sbin/bind/configure.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.12 $)
+AC_REVISION($Revision: 1.13 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
@@ -357,13 +357,14 @@ AC_C_BIGENDIAN
#
# was --with-openssl specified?
#
+OPENSSL_WARNING=
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="auto")
-openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg"
+openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
if test "$use_openssl" = "auto"
then
for d in $openssldirs
@@ -416,6 +417,9 @@ case "$use_openssl" in
*-solaris*)
DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
;;
+ *-hp-hpux*)
+ DNS_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
+ ;;
*)
DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
;;
@@ -462,51 +466,48 @@ shared library configuration (e.g., LD_LIBRARY_PATH).)],
[AC_MSG_RESULT(assuming it does work on target platform)]
)
-#
-# OpenSSLDie is new with CERT CS-2002-23. If we see it we have may
-# have a patched library otherwise check that we are greater than
-# the fixed versions
-#
- AC_CHECK_FUNC(OpenSSLDie,
+ AC_CHECK_FUNC(DH_generate_parameters,
+ AC_DEFINE(HAVE_DH_GENERATE_PARAMETERS, 1,
+ [Define if libcrypto has DH_generate_parameters]))
+ AC_CHECK_FUNC(RSA_generate_key,
+ AC_DEFINE(HAVE_RSA_GENERATE_KEY, 1,
+ [Define if libcrypto has RSA_generate_key]))
+ AC_CHECK_FUNC(DSA_generate_parameters,
+ AC_DEFINE(HAVE_DSA_GENERATE_PARAMETERS, 1,
+ [Define if libcrypto has DSA_generate_parameters]))
+
+AC_ARG_ENABLE(openssl-version-check,
+[AC_HELP_STRING([--enable-openssl-version-check],
+ [Check OpenSSL Version @<:@default=yes@:>@])])
+case "$enable_openssl_version_check" in
+yes|'')
AC_MSG_CHECKING(OpenSSL library version)
AC_TRY_RUN([
#include <stdio.h>
#include <openssl/opensslv.h>
int main() {
- if (OPENSSL_VERSION_NUMBER >= 0x0090581fL)
+ if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
+ OPENSSL_VERSION_NUMBER < 0x00908000L) ||
+ OPENSSL_VERSION_NUMBER >= 0x0090804fL)
return (0);
printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
OPENSSL_VERSION_NUMBER);
- printf("Require OPENSSL_VERSION_NUMBER 0x0090581f or greater\n\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");
return (1);
}
-],
+ ],
[AC_MSG_RESULT(ok)],
[AC_MSG_RESULT(not compatible)
- AC_MSG_ERROR(you need OpenSSL 0.9.5a or newer)],
+ OPENSSL_WARNING=yes
+ ],
[AC_MSG_RESULT(assuming target platform has compatible version)])
- ,
- AC_MSG_RESULT(did not find fixes for CERT CA-2002-23)
- AC_MSG_CHECKING(OpenSSL library version)
- AC_TRY_RUN([
-#include <stdio.h>
-#include <openssl/opensslv.h>
-int main() {
- if ((OPENSSL_VERSION_NUMBER >= 0x0090605fL &&
- OPENSSL_VERSION_NUMBER < 0x009070000L) ||
- OPENSSL_VERSION_NUMBER >= 0x00907003L)
- return (0);
- printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
- OPENSSL_VERSION_NUMBER);
- printf("Require OPENSSL_VERSION_NUMBER 0x0090605f or greater (0.9.6e)\n"
- "Require OPENSSL_VERSION_NUMBER 0x00907003 or greater (0.9.7-beta2)\n\n");
- return (1);
-}
-],
- [AC_MSG_RESULT(ok)],
- [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)]))
+;;
+no)
+ AC_MSG_RESULT(Skipped OpenSSL version check)
+;;
+esac
+
AC_MSG_CHECKING(for OpenSSL DSA support)
if test -f $use_openssl/include/openssl/dsa.h
then
@@ -613,16 +614,61 @@ sinclude(config.threads.in)dnl
if $use_threads
then
+ if test "X$GCC" = "Xyes"; then
+ case "$host" in
+ *-freebsd*)
+ CC="$CC -pthread"
+ CCOPT="$CCOPT -pthread"
+ STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+ ;;
+ *-openbsd*)
+ CC="$CC -pthread"
+ CCOPT="$CCOPT -pthread"
+ ;;
+ *-solaris*)
+ LIBS="$LIBS -lthread"
+ ;;
+ *-ibm-aix*)
+ STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+ ;;
+ esac
+ else
+ case $host in
+ *-dec-osf*)
+ CC="$CC -pthread"
+ CCOPT="$CCOPT -pthread"
+ ;;
+ *-solaris*)
+ CC="$CC -mt"
+ CCOPT="$CCOPT -mt"
+ ;;
+ *-ibm-aix*)
+ STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+ ;;
+ *-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"
+ ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
+ thread_dir=pthreads
#
# We'd like to use sigwait() too
#
- AC_CHECK_LIB(c, sigwait,
- AC_DEFINE(HAVE_SIGWAIT),
- AC_CHECK_LIB(pthread, sigwait,
- AC_DEFINE(HAVE_SIGWAIT),
- AC_CHECK_LIB(pthread, _Psigwait,
- AC_DEFINE(HAVE_SIGWAIT),))
- )
+ AC_CHECK_FUNC(sigwait,
+ AC_DEFINE(HAVE_SIGWAIT),
+ AC_CHECK_LIB(c, sigwait,
+ AC_DEFINE(HAVE_SIGWAIT),
+ AC_CHECK_LIB(pthread, sigwait,
+ AC_DEFINE(HAVE_SIGWAIT),
+ AC_CHECK_LIB(pthread, _Psigwait,
+ AC_DEFINE(HAVE_SIGWAIT),))))
AC_CHECK_FUNC(pthread_attr_getstacksize,
AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
@@ -686,50 +732,6 @@ then
#
AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
- if test "X$GCC" = "Xyes"; then
- case "$host" in
- *-freebsd*)
- CC="$CC -pthread"
- CCOPT="$CCOPT -pthread"
- STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
- ;;
- *-openbsd*)
- CC="$CC -pthread"
- CCOPT="$CCOPT -pthread"
- ;;
- *-solaris*)
- LIBS="$LIBS -lthread"
- ;;
- *-ibm-aix*)
- STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
- ;;
- esac
- else
- case $host in
- *-dec-osf*)
- CC="$CC -pthread"
- CCOPT="$CCOPT -pthread"
- ;;
- *-solaris*)
- CC="$CC -mt"
- CCOPT="$CCOPT -mt"
- ;;
- *-ibm-aix*)
- STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
- ;;
- *-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"
- ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
- thread_dir=pthreads
else
ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
thread_dir=nothreads
@@ -789,7 +791,18 @@ MKDEPCFLAGS="-M"
IRIX_DNSSEC_WARNINGS_HACK=""
if test "X$GCC" = "Xyes"; then
- STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat"
+ AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS=-fno-strict-aliasing
+ AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
+ CFLAGS=$SAVE_CFLAGS
+ if test "$FNOSTRICTALIASING" = "yes"; then
+ AC_MSG_RESULT(yes)
+ STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
+ else
+ AC_MSG_RESULT(no)
+ STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
+ fi
case "$host" in
*-hp-hpux*)
LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
@@ -1567,11 +1580,11 @@ AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
AC_CHECK_FUNC(strtoul,
[ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
- LWRES_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
+ LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
GENRANDOMLIB=""],
[ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
- LWRES_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
- "GENRANDOMLIB=${ISCLIBS}"])
+ LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
+ GENRANDOMLIB='${ISCLIBS}'])
AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
AC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
AC_SUBST(GENRANDOMLIB)
@@ -1686,6 +1699,7 @@ AC_TRY_COMPILE([
[optarg = 0;],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
+GEN_NEED_OPTARG="-DNEED_OPTARG=1"
AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
#
@@ -1749,6 +1763,17 @@ case "$host" in
esac
#
+# 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().
+#
+case $host in
+*os2*|*hp-mpeix*)
+ AC_DEFINE(BROKEN_RECVMSG, 1,
+ [Define if recvmsg() does not meet all of the BSD socket API specifications.])
+ ;;
+esac
+
+#
# Microsoft has their own way of handling shared libraries that requires
# additional qualifiers on extern variables. Unix systems don't need it.
#
@@ -1765,7 +1790,7 @@ AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
case "$host" in
- *-aix5.1.*)
+ *-aix5.[[123]].*)
hack_shutup_pthreadonceinit=yes
;;
*-bsdi3.1*)
@@ -1781,6 +1806,9 @@ case "$host" in
[*-solaris2.[89]])
hack_shutup_pthreadonceinit=yes
;;
+ *-solaris2.10)
+ hack_shutup_pthreadonceinit=yes
+ ;;
esac
case "$hack_shutup_pthreadonceinit" in
@@ -1861,6 +1889,16 @@ case "$host" in
;;
esac
#
+# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
+# This prevents the source address being set.
+#
+case "$host" in
+*-solaris2.[[012345]]|*-solaris2.5.1)
+ AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
+ [Define if you cannot bind() before connect() for TCP sockets.])
+ ;;
+esac
+#
# The following sections deal with tools used for formatting
# the documentation. They are all optional, unless you are
# a developer editing the documentation source.
@@ -2036,6 +2074,28 @@ LIBBIND9_API=$srcdir/lib/bind9/api
AC_SUBST_FILE(LIBLWRES_API)
LIBLWRES_API=$srcdir/lib/lwres/api
+if test "$cross_compiling" = "yes"; then
+ if test -z "$BUILD_CC"; then
+ AC_ERROR([BUILD_CC not set])
+ fi
+ BUILD_CFLAGS="$BUILD_CFLAGS"
+ BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
+ BUILD_LDFLAGS="$BUILD_LDFLAGS"
+ BUILD_LIBS="$BUILD_LIBS"
+else
+ BUILD_CC="$CC"
+ BUILD_CFLAGS="$CFLAGS"
+ BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
+ BUILD_LDFLAGS="$LDFLAGS"
+ BUILD_LIBS="$LIBS"
+fi
+
+AC_SUBST(BUILD_CC)
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(BUILD_CPPFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+AC_SUBST(BUILD_LIBS)
+
AC_OUTPUT(
make/rules
make/includes
@@ -2097,6 +2157,30 @@ AC_OUTPUT(
)
chmod a+x isc-config.sh
+if test "X$OPENSSL_WARNING" != "X"; then
+cat << \EOF
+WARNING WARNING 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 flaws: WARNING
+WARNING WARNING
+WARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
+WARNING CVE-2006-2940. WARNING
+WARNING WARNING
+WARNING It is recommended that you upgrade to OpenSSL WARNING
+WARNING version 0.9.8d/0.9.7l (or greater). WARNING
+WARNING WARNING
+WARNING You can disable this warning by specifying: WARNING
+WARNING 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 WARNING WARNING
+EOF
+fi
+
# Tell Emacs to edit this file in shell mode.
# Local Variables:
# mode: sh