diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2020-01-24 09:04:49 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2020-01-24 09:04:49 +0000 |
commit | 53ce9c1132334637a78d9b8ba59294fd1a668ec3 (patch) | |
tree | cbc25b2f2fb4a0b2fadaf7ab1c9799a03caadbb9 | |
parent | 7ab0f7e6863e60da79cb23361a01fcf922e802f3 (diff) |
Since we are no longer using config.h we can remove a lot of feature
checks from configure. Work started by tedu, I tossed a bunch more.
"go ahead" tedu
This is not comprehensive but returns where diminishing in terms of
saved build time. The next step would probably be to remove configure
entirely.
-rw-r--r-- | usr.sbin/bind/Makefile.bsd-wrapper | 4 | ||||
-rw-r--r-- | usr.sbin/bind/bin/dig/Makefile.in | 16 | ||||
-rw-r--r-- | usr.sbin/bind/configure | 8387 | ||||
-rw-r--r-- | usr.sbin/bind/configure.in | 3900 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/Makefile.in | 14 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isc/Makefile.in | 10 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isc/unix/Makefile.in | 6 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isccfg/Makefile.in | 4 | ||||
-rw-r--r-- | usr.sbin/bind/make/rules.in | 5 |
9 files changed, 28 insertions, 12318 deletions
diff --git a/usr.sbin/bind/Makefile.bsd-wrapper b/usr.sbin/bind/Makefile.bsd-wrapper index 9ccffcf3838..5281ae5ce71 100644 --- a/usr.sbin/bind/Makefile.bsd-wrapper +++ b/usr.sbin/bind/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.24 2020/01/21 11:06:47 tb Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.25 2020/01/24 09:04:48 florian Exp $ .include <bsd.own.mk> @@ -7,12 +7,10 @@ CONFIGURE_OPTS= --prefix=/usr \ --localstatedir=/var \ --sysconfdir=/etc \ --disable-isc-spnego \ - --without-readline \ --with-python=no \ --without-idn \ --with-gssapi=no \ --with-docbook-xsl=no \ - --with-libjson=no \ --disable-shared \ --enable-openssl-hash \ --enable-sit diff --git a/usr.sbin/bind/bin/dig/Makefile.in b/usr.sbin/bind/bin/dig/Makefile.in index 7c25a935d8d..dca63e3b807 100644 --- a/usr.sbin/bind/bin/dig/Makefile.in +++ b/usr.sbin/bind/bin/dig/Makefile.in @@ -12,7 +12,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.11 2020/01/07 19:11:17 florian Exp $ +# $Id: Makefile.in,v 1.12 2020/01/24 09:04:48 florian Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -22,17 +22,15 @@ VERSION=@BIND9_VERSION@ @BIND9_MAKE_INCLUDES@ -READLINE_LIB = @READLINE_LIB@ - CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \ ${BIND9_INCLUDES} ${ISC_INCLUDES} \ - ${LWRES_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@ + ${LWRES_INCLUDES} ${ISCCFG_INCLUDES} -CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@ +CDEFINES = -DVERSION=\"${VERSION}\" CWARNINGS = ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ +DNSLIBS = ../../lib/dns/libdns.@A@ -lcrypto ISCLIBS = ../../lib/isc/libisc.@A@ LWRESLIBS = ../../lib/lwres/liblwres.@A@ @@ -45,10 +43,10 @@ DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} \ ${ISCCFGDEPLIBS} ${LWRESDEPLIBS} LIBS = ${LWRESLIBS} ${ISCCFGLIBS} \ - ${ISCLIBS} @IDNLIBS@ @LIBS@ + ${ISCLIBS} @LIBS@ NOSYMLIBS = ${LWRESLIBS} ${ISCCFGLIBS} \ - ${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@ + ${ISCNOSYMLIBS} @LIBS@ SUBDIRS = @@ -77,7 +75,7 @@ host@EXEEXT@: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS} ${FINALBUILDCMD} nslookup@EXEEXT@: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS} - export BASEOBJS="nslookup.@O@ dighost.@O@ ${READLINE_LIB} ${UOBJS}"; \ + export BASEOBJS="nslookup.@O@ dighost.@O@ ${UOBJS}"; \ export LIBS0="${DNSLIBS}"; \ ${FINALBUILDCMD} diff --git a/usr.sbin/bind/configure b/usr.sbin/bind/configure index 59bb851dd26..b56f612902d 100644 --- a/usr.sbin/bind/configure +++ b/usr.sbin/bind/configure @@ -651,17 +651,6 @@ BUILD_LDFLAGS BUILD_CPPFLAGS BUILD_CFLAGS BUILD_CC -DLZ_SYSTEM_TEST -DLZ_DRIVER_OBJS -DLZ_DRIVER_SRCS -DLZ_DRIVER_LIBS -DLZ_DRIVER_INCLUDES -CONTRIB_DLZ -SO_TARGETS -SO_LD -SO_LDFLAGS -SO_CFLAGS -SO BIND9_CONFIGARGS BIND9_SRCID BIND9_VERSIONSHORT @@ -675,99 +664,9 @@ BIND9_DNS_BUILDINCLUDE BIND9_ISCCFG_BUILDINCLUDE BIND9_ISC_BUILDINCLUDE BIND9_TOP_BUILDDIR -UNITTESTS -ATFLIBS -ATFBIN -ATFBUILD -IDNLIBS -XSLT_DBLATEX_FASTBOOK -XSLT_DBLATEX_STYLE -XSLT_DOCBOOK_MAKETOC_XHTML -XSLT_DOCBOOK_MAKETOC_HTML -XSLT_DOCBOOK_CHUNKTOC_XHTML -XSLT_DOCBOOK_CHUNKTOC_HTML -XSLT_DOCBOOK_CHUNK_XHTML -XSLT_DOCBOOK_CHUNK_HTML -XSLT_DOCBOOK_STYLE_MAN -XSLT_DOCBOOK_STYLE_XHTML -XSLT_DOCBOOK_STYLE_HTML -CURL -DOXYGEN -XMLLINT -XSLTPROC -PANDOC -W3M -DBLATEX -PDFLATEX -LATEX ISC_ARCH_DIR -ISC_PLATFORM_USEMACASM -ISC_PLATFORM_USESTDASM -ISC_PLATFORM_USEOSFASM -ISC_PLATFORM_USEGCCASM -ISC_PLATFORM_HAVEATOMICSTOREQ -ISC_PLATFORM_HAVEATOMICSTORE -ISC_PLATFORM_HAVECMPXCHG -ISC_PLATFORM_HAVEXADDQ -ISC_PLATFORM_HAVEXADD -ISC_PLATFORM_HAVESTDATOMIC -ISC_PLATFORM_HAVEIFNAMETOINDEX -ISC_PLATFORM_HAVESTRINGSH -ISC_PLATFORM_BRACEPTHREADONCEINIT -ISC_PLATFORM_USEDECLSPEC -rlim_t -ISC_PLATFORM_HAVESTATNSEC -ISC_PLATFORM_HAVESYSUNH -ISC_PLATFORM_QUADFORMAT DST_EXTRA_SRCS DST_EXTRA_OBJS -USE_ISC_SPNEGO -ISC_EXTRA_SRCS -ISC_EXTRA_OBJS -ISC_PLATFORM_NEEDVSNPRINTF -ISC_PLATFORM_NEEDSPRINTF -ISC_PLATFORM_NEEDFPRINTF -ISC_PLATFORM_NEEDPRINTF -READLINE_LIB -ISC_PLATFORM_NEEDSTRCASESTR -ISC_PLATFORM_NEEDSTRLCAT -ISC_PLATFORM_NEEDSTRLCPY -GENRANDOMLIB -ISC_PLATFORM_NEEDSTRTOUL -ISC_PLATFORM_NEEDMEMMOVE -ISC_PLATFORM_NEEDSTRSEP -ISC_LWRES_GETNAMEINFOPROTO -ISC_LWRES_GETADDRINFOPROTO -ISC_LWRES_GETIPNODEPROTO -ISC_LWRES_NEEDHERRNO -ISC_LWRES_GETHOSTBYADDRVOID -ISC_LWRES_ENDNETENTINT -ISC_LWRES_SETNETENTINT -ISC_LWRES_GETNETBYADDRINADDR -ISC_LWRES_ENDHOSTENTINT -ISC_LWRES_SETHOSTENTINT -ISC_LWRES_NEEDRRSETINFO -ISC_LWRES_NEEDADDRINFO -ISC_PLATFORM_NEEDPORTT -ISC_PLATFORM_MSGHDRFLAVOR -ISC_PLATFORM_HAVESALEN -ISC_PLATFORM_HAVEIF_LADDRCONF -ISC_PLATFORM_HAVEIF_LADDRREQ -ISC_PLATFORM_HAVESCOPEID -LWRES_HAVE_SIN6_SCOPE_ID -ISC_IPV6_C -ISC_ISCIPV6_O -ISC_IPV6_O -ISC_IPV6_H -ISC_PLATFORM_HAVESOCKADDRSTORAGE -ISC_PLATFORM_FIXIN6ISADDR -ISC_PLATFORM_HAVEIN6PKTINFO -ISC_PLATFORM_NEEDIN6ADDRLOOPBACK -ISC_PLATFORM_NEEDIN6ADDRANY -ISC_PLATFORM_HAVEINADDR6 -ISC_PLATFORM_NEEDNETINET6IN6H -ISC_PLATFORM_NEEDNETINETIN6H -ISC_PLATFORM_HAVEIPV6 BIND9_CO_RULE LIBTOOL_IN_MAIN LIBTOOL_ALLOW_UNDEFINED @@ -779,81 +678,12 @@ LIBTOOL_MKDEP_SED SA A O -PURIFY -purify_path IRIX_DNSSEC_WARNINGS_HACK MKDEPPROG MKDEPCFLAGS MKDEPCC -JSONSTATS -XMLSTATS -PKCS11_TEST -PKCS11_ED25519 -PKCS11_GOST -PKCS11_ECDSA -CRYPTO -PKCS11LINKSRCS -PKCS11LINKOBJS -PKCS11_PROVIDER -ISC_ISCPK11_API_O -ISC_ISCPK11_API_C -ISC_PK11_RESULT_O -ISC_PK11_RESULT_C -ISC_PK11_API_O -ISC_PK11_API_C -ISC_PK11_O -ISC_PK11_C -PKCS11_ENGINE -PKCS11_TOOLS -USE_PKCS11 -ISC_OPENSSL_LIBS -ISC_OPENSSL_INC -ISC_PLATFORM_OPENSSLHASH -ISC_PLATFORM_WANTAES -OPENSSL_GOST -OPENSSL_ED25519 -OPENSSL_ECDSA -OPENSSLLINKSRCS -OPENSSLLINKOBJS -OPENSSLGOSTLINKSRCS -OPENSSLGOSTLINKOBJS -OPENSSLEDDSALINKSRCS -OPENSSLEDDSALINKOBJS -OPENSSLECDSALINKSRCS -OPENSSLECDSALINKOBJS -DST_OPENSSL_INC -HAVE_SIT -ISC_PLATFORM_USESIT INSTALL_LIBRARY -ALWAYS_DEFINES -CHECK_DSA -DNS_CRYPTO_LIBS -DNS_GSSAPI_LIBS -DST_GSSAPI_INC -USE_GSSAPI -ISC_PLATFORM_KRB5HEADER -ISC_PLATFORM_GSSAPI_KRB5_HEADER -ISC_PLATFORM_GSSAPIHEADER -ISC_PLATFORM_HAVEGSSAPI -KRB5_CONFIG -ISC_PLATFORM_NEEDSYSSELECTH -ISC_PLATFORM_HAVEDEVPOLL -ISC_PLATFORM_HAVEEPOLL -ISC_PLATFORM_HAVEKQUEUE -ISC_PLATFORM_HAVELIFCONF -ISC_PLATFORM_NORETURN_POST -ISC_PLATFORM_NORETURN_PRE -ISC_PLATFORM_HAVELONGLONG -ISC_SOCKADDR_LEN_T expanded_sysconfdir -PYTHON_INSTALL_LIB -PYTHON_INSTALL_DIR -PYTHON_TOOLS -COVERAGE -CHECKDS -PYTHON -PERL -ETAGS LN ARFLAGS XTARGETS @@ -950,8 +780,7 @@ LIBISC_API LIBISCCFG_API LIBDNS_API LIBDNS_MAPAPI -LIBLWRES_API -DLZ_DRIVER_RULES' +LIBLWRES_API' ac_user_opts=' enable_option_checking enable_shared @@ -965,53 +794,7 @@ enable_libbind enable_warn_shadow enable_warn_error enable_developer -enable_seccomp -with_python -with_python_install_dir -enable_kqueue -enable_epoll -enable_devpoll -with_gssapi -with_randomdev with_libtool -enable_native_pkcs11 -with_openssl -with_pkcs11 -with_ecdsa -with_gost -with_eddsa -with_aes -enable_openssl_hash -enable_sit -with_sit_alg -with_libxml2 -with_libjson -enable_largefile -with_purify -with_gperftools_profiler -enable_ipv6 -with_kame -enable_getifaddrs -with_readline -enable_isc_spnego -enable_chroot -enable_linux_caps -with_rlimtype -enable_atomic -enable_fixed_rrset -enable_rpz_nsip -enable_rpz_nsdname -enable_fetchlimit -enable_filter_aaaa -with_docbook_xsl -with_idn -with_libiconv -with_iconv -with_idnlib -with_atf -with_tuning -enable_querytrace -with_dlopen with_make_clean enable_full_report ' @@ -1649,28 +1432,6 @@ Optional Features: --enable-warn-shadow turn on -Wshadow when compiling --enable-warn-error turn on -Werror when compiling --enable-developer enable developer build settings - --enable-seccomp enable support for libseccomp system call filtering - [default=no] - --enable-kqueue use BSD kqueue when available [default=yes] - --enable-epoll use Linux epoll when available [default=auto] - --enable-devpoll use /dev/poll when available [default=yes] - --enable-native-pkcs11 use native PKCS11 for all crypto [default=no] - --enable-openssl-hash use OpenSSL for hash functions [default=no] - --enable-sit enable source identity token [default=no] - --enable-largefile 64-bit file support - --enable-ipv6 use IPv6 [default=autodetect] - --enable-getifaddrs enable the use of getifaddrs() [yes|no]. - --disable-isc-spnego use SPNEGO from GSSAPI library - --disable-chroot disable chroot - --disable-linux-caps disable linux capabilities - --enable-atomic enable machine specific atomic operations - [default=autodetect] - --enable-fixed-rrset enable fixed rrset ordering [default=no] - --disable-rpz-nsip disable rpz nsip rules [default=enabled] - --disable-rpz-nsdname disable rpz nsdname rules [default=enabled] - --enable-fetchlimit enable recursive fetch limits [default=no] - --enable-filter-aaaa enable filtering of AAAA records [default=no] - --enable-querytrace enable very verbose query trace logging [default=no] --enable-full-report report values of all configure options Optional Packages: @@ -1681,39 +1442,7 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). - --with-python=PATH specify path to python interpreter - --with-python-install-dir=PATH - installation directory for Python modules - --with-gssapi=PATH|/path/krb5-config - Specify path for system-supplied GSSAPI - [default=yes] - --with-randomdev=PATH Specify path for random device --with-libtool use GNU libtool - --with-openssl=PATH Build with OpenSSL [yes|no|path]. (Crypto is - required for DNSSEC) - --with-pkcs11=PATH Build with PKCS11 support [yes|no|path] (PATH is for - the PKCS11 provider) - --with-ecdsa Crypto ECDSA - --with-gost Crypto GOST [yes|no|raw|asn1]. - --with-eddsa Crypto EDDSA [yes|all|no]. - --with-aes Crypto AES - --with-sit-alg=ALG choose the algorithm for SIT [aes|sha1|sha256] - --with-libxml2=PATH build with libxml2 library [yes|no|path] - --with-libjson=PATH build with libjson0 library [yes|no|path] - --with-purify=PATH use Rational purify - --with-gperftools-profiler - use gperftools CPU profiler - --with-kame=PATH use Kame IPv6 [default path /usr/local/v6] - --with-readline=LIBSPEC specify readline library [default auto] - - --with-docbook-xsl=PATH specify path for Docbook-XSL stylesheets - --with-idn=MPREFIX enable IDN support using idnkit [default PREFIX] - --with-libiconv=IPREFIX GNU libiconv are in IPREFIX [default PREFIX] - --with-iconv=LIBSPEC specify iconv library [default -liconv] - --with-idnlib=ARG specify libidnkit - --with-atf support Automated Test Framework - --with-tuning=ARG Specify server tuning (large or default) - --with-dlopen=ARG support dynamically loadable DLZ drivers --with-make-clean run "make clean" at end of configure [yes|no] Some influential environment variables: @@ -2075,334 +1804,6 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## --------------------------- ## -## Report this to info@isc.org ## -## --------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 <conftest.val; ac_retval=0 -else - ac_retval=1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -rm -f conftest.val - - fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_compute_int cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -11410,152 +10811,6 @@ esac #libseccomp sandboxing -for ac_func in getrandom -do : - ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom" -if test "x$ac_cv_func_getrandom" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETRANDOM 1 -_ACEOF - -fi -done - -# Check whether --enable-seccomp was given. -if test "${enable_seccomp+set}" = set; then : - enableval=$enable_seccomp; -fi - -case "$enable_seccomp" in - yes) - case $host_os in - linux*) - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: seccomp is not supported on non-linux platforms; disabling it" >&5 -$as_echo "$as_me: WARNING: seccomp is not supported on non-linux platforms; disabling it" >&2;} - enable_seccomp=no - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing seccomp_init" >&5 -$as_echo_n "checking for library containing seccomp_init... " >&6; } -if ${ac_cv_search_seccomp_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char seccomp_init (); -int -main () -{ -return seccomp_init (); - ; - return 0; -} -_ACEOF -for ac_lib in '' seccomp; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_seccomp_init=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_seccomp_init+:} false; then : - break -fi -done -if ${ac_cv_search_seccomp_init+:} false; then : - -else - ac_cv_search_seccomp_init=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_seccomp_init" >&5 -$as_echo "$ac_cv_search_seccomp_init" >&6; } -ac_res=$ac_cv_search_seccomp_init -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - if test "X$ac_cv_search_seccomp_init" = "X-lseccomp" ; then - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include <stdio.h> - #include <stdlib.h> - #include <errno.h> - #include <sys/prctl.h> - #include <linux/seccomp.h> - - int main(void) - { - int ret; - - ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0); - if (ret < 0) { - switch (errno) { - case ENOSYS: - return 1; - case EINVAL: - return 1; - default: - return 1; - } - } - ret = - prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0); - if (ret < 0) { - switch (errno) { - case EINVAL: - return 1; - case EFAULT: - return 0; - default: - return 1; - } - } - return 1; - } - - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -$as_echo "#define HAVE_LIBSECCOMP 1" >>confdefs.h - - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - ;; - *) - ;; -esac # # Make very sure that these are the first files processed by @@ -11624,354 +10879,6 @@ which ar resides, or set AR in the environment with the full path to ar. ;; esac -# -# Etags. -# -for ac_prog in etags emacs-etags -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ETAGS+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ETAGS in - [\\/]* | ?:[\\/]*) - ac_cv_path_ETAGS="$ETAGS" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ETAGS="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ETAGS=$ac_cv_path_ETAGS -if test -n "$ETAGS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ETAGS" >&5 -$as_echo "$ETAGS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ETAGS" && break -done - - -# -# 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Exuberant Ctags etags" >&5 -$as_echo_n "checking for Exuberant Ctags etags... " >&6; } - if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ETAGS="$ETAGS -L" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi -fi - - -# -# 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. -# -for ac_prog in perl5 perl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PERL in - [\\/]* | ?:[\\/]*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PERL=$ac_cv_path_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PERL" && break -done - - - -# -# Python is also optional; it is used by the tools in bin/python. -# If python is unavailable, we simply don't build those. -# - -# Check whether --with-python was given. -if test "${with_python+set}" = set; then : - withval=$with_python; use_python="$withval" -else - use_python="unspec" -fi - - -# Check whether --with-python-install-dir was given. -if test "${with_python_install_dir+set}" = set; then : - withval=$with_python_install_dir; use_python_install_dir="$withval" -else - use_python_install_dir="unspec" -fi - - -python="python python3 python3.5 python3.4 python3.3 python3.2 python2 python2.7" - -testargparse='try: import argparse -except: exit(1)' - -testminvers='import sys -if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): - exit(1)' - -case "$use_python" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python support" >&5 -$as_echo_n "checking for python support... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - unspec|yes|*) - case "$use_python" in - unspec|yes|'') - for p in $python - do - for ac_prog in $p -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON" && break -done - - if test "X$PYTHON" = "X"; then - continue; - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python2 version >= 2.7 or python3 version >= 3.2" >&5 -$as_echo_n "checking python2 version >= 2.7 or python3 version >= 3.2... " >&6; } - if ${PYTHON:-false} -c "$testminvers"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - unset ac_cv_path_PYTHON - unset PYTHON - continue - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python module 'argparse'" >&5 -$as_echo_n "checking python module 'argparse'... " >&6; } - if ${PYTHON:-false} -c "$testargparse"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - break - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - unset ac_cv_path_PYTHON - unset PYTHON - continue - fi - done - if test "X$PYTHON" != "X" - then - case "$use_python_install_dir" in - unspec) - PYTHON_INSTALL_DIR="" - PYTHON_INSTALL_LIB="" - ;; - *) - PYTHON_INSTALL_DIR="$use_python_install_dir" - PYTHON_INSTALL_LIB="--install-lib=$use_python_install_dir" - ;; - esac - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python support" >&5 -$as_echo_n "checking for python support... " >&6; } - case "$use_python" in - unspec) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - yes) - as_fn_error $? "missing python" "$LINENO" 5 - ;; - esac - fi - ;; - *) - case "$use_python" in - /*) - PYTHON="$use_python" - ;; - *) - for ac_prog in $use_python -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON" && break -done - - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python2 version >= 2.7 or python3 version >= 3.2" >&5 -$as_echo_n "checking python2 version >= 2.7 or python3 version >= 3.2... " >&6; } - if ${PYTHON:-false} -c "$testminvers"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - else - as_fn_error $? "not found" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python module 'argparse'" >&5 -$as_echo_n "checking python module 'argparse'... " >&6; } - if ${PYTHON:-false} -c "$testargparse"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found, using $PYTHON" >&5 -$as_echo "found, using $PYTHON" >&6; } - else - as_fn_error $? "not found" "$LINENO" 5 - fi - ;; - esac - ;; -esac - -PYTHON_TOOLS='' -CHECKDS='' -COVERAGE='' -if test "X$PYTHON" != "X"; then - PYTHON_TOOLS=python - CHECKDS=checkds - COVERAGE=coverage -fi - - - - - # # Special processing of paths depending on whether --prefix, @@ -12623,1688 +11530,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # -# 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 available 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__" - ;; - # 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. - *-linux* | *-kfreebsd*-gnu*) - STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE" - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - ;; - # - # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use. - # Setting this is sufficient to select the correct behavior for BIND 9. - # - *-darwin*) - STD_CDEFINES="$STD_CDEFINES -D__APPLE_USE_RFC_3542" - CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542" - ;; -esac - -# # CCNOOPT defaults to -O0 on gcc and disables optimization when is last # if test "X$CCNOOPT" = "X" -a "X$GCC" = "Xyes"; then CCNOOPT="-O0" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - - -for ac_header in fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h sys/socket.h net/route.h linux/netlink.h linux/rtnetlink.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -#ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif - -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_volatile=yes -else - ac_cv_c_volatile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -$as_echo "#define volatile /**/" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname" -if test "x$ac_cv_func_sysctlbyname" = xyes; then : - $as_echo "#define HAVE_SYSCTLBYNAME 1" >>confdefs.h - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5 -$as_echo_n "checking for flexible array members... " >&6; } -if ${ac_cv_c_flexmember+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - #include <stdio.h> - #include <stddef.h> - struct s { int n; double d[]; }; -int -main () -{ -int m = getchar (); - struct s *p = malloc (offsetof (struct s, d) - + m * sizeof (double)); - p->d[0] = 0.0; - return p->d != (double *) NULL; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_flexmember=yes -else - ac_cv_c_flexmember=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 -$as_echo "$ac_cv_c_flexmember" >&6; } - if test $ac_cv_c_flexmember = yes; then - -$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h - - else - $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h - - fi - - -# -# Check for the existence of mmap to enable the fast format zones -# -for ac_func in mmap -do : - ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MMAP 1 -_ACEOF - -fi -done - - -# -# Older versions of HP/UX don't define seteuid() and setegid() -# -for ac_func in seteuid setresuid -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in setegid setresgid -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# BSDI doesn't have ftello fseeko -for ac_func in ftello fseeko -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# -# UnixWare 7.1.1 with the feature supplement to the UDK compiler -# is reported to not support "static inline" (RT #1212). -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for static inline breakage" >&5 -$as_echo_n "checking for static inline breakage... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - static inline int foo1() { - return 0; - } - - static inline int foo2() { - return foo1(); - } - -int -main () -{ -foo1(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define inline /**/" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" -if test "x$ac_cv_type_uintptr_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define uintptr_t unsigned long -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -#include <sys/types.h> -#include <sys/socket.h> - -" -if test "x$ac_cv_type_socklen_t" = xyes; then : - $as_echo "#define ISC_SOCKADDR_LEN_T socklen_t" >>confdefs.h - -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -int getsockname(int, struct sockaddr *, size_t *); - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - $as_echo "#define ISC_SOCKADDR_LEN_T size_t" >>confdefs.h - -else - $as_echo "#define ISC_SOCKADDR_LEN_T int" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <sys/time.h> -#include <time.h> - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 -$as_echo_n "checking for long long... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -long long i = 0; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# check for uname library routine -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uname" >&5 -$as_echo_n "checking for uname... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/utsname.h> -#include <stdio.h> - -int -main () -{ - -struct utsname uts; -uname(&uts); -printf("running on %s %s %s for %s\n", - uts.sysname, uts.release, uts.version, uts.machine); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define HAVE_UNAME 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: uname is not correctly supported" >&5 -$as_echo "$as_me: WARNING: uname is not correctly supported" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# check for GCC noreturn attribute -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC noreturn attribute" >&5 -$as_echo_n "checking for GCC noreturn attribute... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -void foo() __attribute__((noreturn)); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE" - ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE" - ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - -# -# check if we have lifconf -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lifconf" >&5 -$as_echo_n "checking for struct lifconf... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <net/if.h> - -int -main () -{ - -struct lifconf lifconf; -lifconf.lifc_len = 0; - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# check if we have kqueue -# -# Check whether --enable-kqueue was given. -if test "${enable_kqueue+set}" = set; then : - enableval=$enable_kqueue; want_kqueue="$enableval" -else - want_kqueue="yes" -fi - -case $want_kqueue in -yes) - ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue" -if test "x$ac_cv_func_kqueue" = xyes; then : - ac_cv_have_kqueue=yes -else - ac_cv_have_kqueue=no -fi - - case $ac_cv_have_kqueue in - yes) - ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1" - ;; - *) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; - esac - ;; -*) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; -esac - - -# -# 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. -# -# Check whether --enable-epoll was given. -if test "${enable_epoll+set}" = set; then : - enableval=$enable_epoll; want_epoll="$enableval" -else - want_epoll="auto" -fi - -case $want_epoll in -auto) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking epoll support" >&5 -$as_echo_n "checking epoll support... " >&6; } - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/epoll.h> -int main() { - if (epoll_create(1) < 0) - return (1); - return (0); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - ;; -yes) - ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1" - ;; -*) - ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL" - ;; -esac - - -# -# check if we support /dev/poll -# -# Check whether --enable-devpoll was given. -if test "${enable_devpoll+set}" = set; then : - enableval=$enable_devpoll; want_devpoll="$enableval" -else - want_devpoll="yes" -fi - -case $want_devpoll in -yes) - for ac_header in sys/devpoll.h devpoll.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1" - -else - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" - -fi - -done - - ;; -*) - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" - ;; -esac - - -# -# check if we need to #include sys/select.h explicitly -# -case $ac_cv_header_unistd_h in -yes) -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unistd.h or sys/types.h defines fd_set" >&5 -$as_echo_n "checking if unistd.h or sys/types.h defines fd_set... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> /* Ultrix */ -#include <unistd.h> -int -main () -{ -fd_set read_set; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - case $ac_cv_header_sys_select_h in - yes) - ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" - ;; - no) - as_fn_error $? "need either working unistd.h or sys/select.h" "$LINENO" 5 - ;; - esac - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; -no) - case $ac_cv_header_sys_select_h in - yes) - ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" - ;; - no) - as_fn_error $? "need either unistd.h or sys/select.h" "$LINENO" 5 - ;; - esac - ;; -esac - - -# -# Find the machine's endian flavor. -# - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> - #include <sys/param.h> - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> - #include <sys/param.h> - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSSAPI library" >&5 -$as_echo_n "checking for GSSAPI library... " >&6; } - -# Check whether --with-gssapi was given. -if test "${with_gssapi+set}" = set; then : - withval=$with_gssapi; use_gssapi="$withval" -else - use_gssapi="yes" -fi - - -# first try using krb5-config, if that does not work then fall back to "yes" method. - -case "$use_gssapi" in -*/krb5-config|krb5-config) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: trying $use_gssapi" >&5 -$as_echo "trying $use_gssapi" >&6; } - if test krb5-config = "$use_gssapi" - then - # Extract the first word of "$use_gssapi", so it can be a program name with args. -set dummy $use_gssapi; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_KRB5_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $KRB5_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG -if test -n "$KRB5_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5 -$as_echo "$KRB5_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - KRB5_CONFIG="$use_gssapi" - fi - gssapi_cflags=`$KRB5_CONFIG --cflags gssapi` - gssapi_libs=`$KRB5_CONFIG --libs gssapi` - saved_cppflags="$CPPFLAGS" - CPPFLAGS="$gssapi_cflags $CPPFLAGS" - for ac_header in gssapi.h gssapi/gssapi.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>" -fi - -done - - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: gssapi.h not found" >&5 -$as_echo "krb5-config: gssapi.h not found" >&6; } - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - for ac_header in krb5/krb5.h krb5.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>" -fi - -done - - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: krb5.h not found" >&5 -$as_echo "krb5-config: krb5.h not found" >&6; } - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - CPPFLAGS="$saved_cppflags" - saved_libs="$LIBS" - LIBS=$gssapi_libs - { $as_echo "$as_me:${as_lineno-$LINENO}: checking krb5-config linking as $LIBS" >&5 -$as_echo_n "checking krb5-config linking as $LIBS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -gss_acquire_cred();krb5_init_context() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gssapi_linked=yes -else - gssapi_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - case $gssapi_linked in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: linked" >&5 -$as_echo "krb5-config: linked" >&6; };; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: could not determine proper GSSAPI linkage" >&5 -$as_echo "krb5-config: could not determine proper GSSAPI linkage" >&6; } - use_gssapi="yes" - ;; - esac - LIBS=$saved_libs - fi - fi - if test "yes" = "$use_gssapi"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSSAPI library, non krb5-config method" >&5 -$as_echo_n "checking for GSSAPI library, non krb5-config method... " >&6; } - fi - ;; -esac - -case "$host" in -*darwin*) - if test "yes" = "$use_gssapi" - then - use_gssapi=framework - fi - ;; -esac - -# gssapi is just the framework, we really require kerberos v5, so -# look for those headers (the gssapi headers must be there, too) -# The problem with this implementation is that it doesn't allow -# for the specification of gssapi and krb5 headers in different locations, -# which probably ought to be fixed although fixing might raise the issue of -# trying to build with incompatible versions of gssapi and krb5. -if test "yes" = "$use_gssapi" -then - # first, deal with the obvious - if test \( -f /usr/include/kerberosv5/krb5.h -o \ - -f /usr/include/krb5/krb5.h -o \ - -f /usr/include/krb5.h \) -a \ - \( -f /usr/include/gssapi.h -o \ - -f /usr/include/gssapi/gssapi.h \) - then - use_gssapi=/usr - else - krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr" - for d in $krb5dirs - do - if test -f $d/include/gssapi/gssapi_krb5.h -o \ - -f $d/include/krb5.h - then - if test -f $d/include/gssapi/gssapi.h -o \ - -f $d/include/gssapi.h - then - use_gssapi=$d - break - fi - fi - use_gssapi="no" - done - fi -fi - -case "$use_gssapi" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - USE_GSSAPI='' - ;; - yes) - as_fn_error $? "--with-gssapi must specify a path" "$LINENO" 5 - ;; - */krb5-config|krb5-config) - USE_GSSAPI='-DGSSAPI' - DST_GSSAPI_INC="$gssapi_cflags" - DNS_GSSAPI_LIBS="$gssapi_libs" - ;; - framework) - USE_GSSAPI='-DGSSAPI' - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <Kerberos/Kerberos.h>" - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <Kerberos/Kerberos.h>" - DNS_GSSAPI_LIBS="-framework Kerberos" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: framework" >&5 -$as_echo "framework" >&6; } - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: looking in $use_gssapi/lib" >&5 -$as_echo "looking in $use_gssapi/lib" >&6; } - USE_GSSAPI='-DGSSAPI' - saved_cppflags="$CPPFLAGS" - CPPFLAGS="-I$use_gssapi/include $CPPFLAGS" - for ac_header in gssapi.h gssapi/gssapi.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>" - gssapi_hack="#include <$ac_header>" -fi - -done - - - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - as_fn_error $? "gssapi.h not found" "$LINENO" 5 - fi - - for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>" - gssapi_krb5_hack="#include <$ac_header>" -fi - -done - - - for ac_header in krb5.h krb5/krb5.h kerberosv5/krb5.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>" - krb5_hack="#include <$ac_header>" -fi - -done - - - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - as_fn_error $? "krb5.h not found" "$LINENO" 5 - fi - - # - # 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. - saved_libs="$LIBS" - for TRY_LIBS in \ - "-lgssapi_krb5" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \ - "-lgssapi" \ - "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgss -lkrb5" - do - # Note that this does not include $saved_libs, because - # on FreeBSD machines this configure script has added - # -L/usr/local/lib to LIBS, which can make the - # -lgssapi_krb5 test succeed with shared libraries even - # when you are trying to build with KTH in /usr/lib. - if test "/usr" = "$use_gssapi" - then - LIBS="$TRY_LIBS" - else - LIBS="-L$use_gssapi/lib $TRY_LIBS" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking linking as $TRY_LIBS" >&5 -$as_echo_n "checking linking as $TRY_LIBS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -$gssapi_hack -$gssapi_krb5_hack -$krb5_hack - -int -main () -{ -gss_acquire_cred(NULL, NULL, 0, NULL, 0, NULL, NULL, NULL);krb5_init_context(NULL); -#if defined(HAVE_GSSAPI_KRB5_H) || defined(HAVE_GSSAPI_GSSAPI_KRB5_H) -gsskrb5_register_acceptor_identity(NULL); -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gssapi_linked=yes -else - gssapi_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - case $gssapi_linked in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; break ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;; - esac - done - - CPPFLAGS="$saved_cppflags" - - case $gssapi_linked in - no) as_fn_error $? "could not determine proper GSSAPI linkage" "$LINENO" 5 ;; - esac - - # - # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib - # but MIT in /usr/local/lib and trying to build with KTH. - # /usr/local/lib can end up earlier on the link lines. - # 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 - # needs to be done. - # - if test "/usr" = "$use_gssapi" -a \ - -f /usr/local/lib/libkrb5.a; then - FIX_KTH_VS_MIT=yes - fi - - case "$FIX_KTH_VS_MIT" in - yes) - case "$enable_static_linking" in - yes) gssapi_lib_suffix=".a" ;; - *) gssapi_lib_suffix=".so" ;; - esac - - for lib in $LIBS; do - case $lib in - -L*) - ;; - -l*) - new_lib=`echo $lib | - sed -e s%^-l%$use_gssapi/lib/lib% \ - -e s%$%$gssapi_lib_suffix%` - NEW_LIBS="$NEW_LIBS $new_lib" - ;; - *) - as_fn_error $? "KTH vs MIT Kerberos confusion!" "$LINENO" 5 - ;; - esac - done - LIBS="$NEW_LIBS" - ;; - esac - - DST_GSSAPI_INC="-I$use_gssapi/include" - DNS_GSSAPI_LIBS="$LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using GSSAPI from $use_gssapi/lib and $use_gssapi/include" >&5 -$as_echo "using GSSAPI from $use_gssapi/lib and $use_gssapi/include" >&6; } - LIBS="$saved_libs" - ;; -esac - - - - - - - - - -DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS" - -# -# Applications linking with libdns also need to link with these libraries. -# - - - -# -# was --with-randomdev specified? -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for random device" >&5 -$as_echo_n "checking for random device... " >&6; } - -# Check whether --with-randomdev was given. -if test "${with_randomdev+set}" = set; then : - withval=$with_randomdev; use_randomdev="$withval" -else - use_randomdev="unspec" -fi - - -case "$use_randomdev" in - unspec) - case "$cross_compiling" in - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unspecified" >&5 -$as_echo "unspecified" >&6; } - as_fn_error $? " need --with-randomdev=PATH or --with-randomdev=no" "$LINENO" 5 - esac - case "$host" in - *-openbsd*) - devrandom=/dev/arandom - ;; - *) - devrandom=/dev/random - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $devrandom" >&5 -$as_echo "$devrandom" >&6; } - as_ac_File=`$as_echo "ac_cv_file_$devrandom" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $devrandom" >&5 -$as_echo_n "checking for $devrandom... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$devrandom"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define PATH_RANDOMDEV "$devrandom" -_ACEOF - -fi - - - ;; - yes) - as_fn_error $? "--with-randomdev must specify a path" "$LINENO" 5 - ;; - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - *) - cat >>confdefs.h <<_ACEOF -#define PATH_RANDOMDEV "$use_randomdev" -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using \"$use_randomdev\"" >&5 -$as_echo "using \"$use_randomdev\"" >&6; } - ;; -esac - -# -# Only check dsa signature generation on these platforms when performing -# system tests. -# -CHECK_DSA=0 -if grep "#define PATH_RANDOMDEV " confdefs.h > /dev/null -then - case "$host" in - *darwin*|*freebsd*) - CHECK_DSA=1 - ;; - esac -fi - - -# -# Do we have arc4random(), etc ? -# Will use stir and if not exist addrandom -# -for ac_func in arc4random -do : - ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" -if test "x$ac_cv_func_arc4random" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ARC4RANDOM 1 -_ACEOF - -fi -done - -for ac_func in arc4random_stir -do : - ac_fn_c_check_func "$LINENO" "arc4random_stir" "ac_cv_func_arc4random_stir" -if test "x$ac_cv_func_arc4random_stir" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ARC4RANDOM_STIR 1 -_ACEOF - -fi -done - -for ac_func in arc4random_addrandom -do : - ac_fn_c_check_func "$LINENO" "arc4random_addrandom" "ac_cv_func_arc4random_addrandom" -if test "x$ac_cv_func_arc4random_addrandom" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ARC4RANDOM_ADDRANDOM 1 -_ACEOF - -fi -done - - -ALWAYS_DEFINES="" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtool" >&5 $as_echo_n "checking for libtool... " >&6; } @@ -14357,1620 +11588,6 @@ esac # -# was --enable-native-pkcs11 specified? -# (note it implies both --without-openssl and --with-pkcs11) -# -# Check whether --enable-native-pkcs11 was given. -if test "${enable_native_pkcs11+set}" = set; then : - enableval=$enable_native_pkcs11; want_native_pkcs11="$enableval" -else - want_native_pkcs11="no" -fi - - -# -# was --with-openssl specified? -# - -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; use_openssl="$withval" -else - use_openssl="auto" -fi - - -# -# was --with-pkcs11 specified? -# - -# Check whether --with-pkcs11 was given. -if test "${with_pkcs11+set}" = set; then : - withval=$with_pkcs11; use_pkcs11="$withval" -else - use_pkcs11="auto" -fi - - -# -# were --with-ecdsa, --with-gost, --with-eddsa, --with-aes specified -# - -# Check whether --with-ecdsa was given. -if test "${with_ecdsa+set}" = set; then : - withval=$with_ecdsa; with_ecdsa="$withval" -else - with_ecdsa="auto" -fi - - -# Check whether --with-gost was given. -if test "${with_gost+set}" = set; then : - withval=$with_gost; with_gost="$withval" -else - with_gost="auto" -fi - - -# Check whether --with-eddsa was given. -if test "${with_eddsa+set}" = set; then : - withval=$with_eddsa; with_eddsa="$withval" -else - with_eddsa="auto" -fi - - -# Check whether --with-aes was given. -if test "${with_aes+set}" = set; then : - withval=$with_aes; with_aes="$withval" -else - with_aes="checksit" -fi - - -# -# was --enable-openssl-hash specified? -# -# Check whether --enable-openssl-hash was given. -if test "${enable_openssl_hash+set}" = set; then : - enableval=$enable_openssl_hash; want_openssl_hash="$enableval" -else - want_openssl_hash="checksit" -fi - - -# -# Enable Source Identity Token support -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Source Identity Token support" >&5 -$as_echo_n "checking for Source Identity Token support... " >&6; } -# Check whether --enable-sit was given. -if test "${enable_sit+set}" = set; then : - enableval=$enable_sit; enable_sit="$enableval" -else - enable_sit="no" -fi - -HAVE_SIT= -ISC_PLATFORM_USESIT="#undef ISC_PLATFORM_USESIT" - -case "$enable_sit" in -yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_USESIT="#define ISC_PLATFORM_USESIT 1" - HAVE_SIT=1 - ;; -no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -*) - as_fn_error $? "\"enable-sit requires yes or no\"" "$LINENO" 5 - ;; -esac - - - -# -# Source Identity Token algorithm choice -# - -# Check whether --with-sit-alg was given. -if test "${with_sit_alg+set}" = set; then : - withval=$with_sit_alg; with_sit_alg="$withval" -else - with_sit_alg="auto" -fi - - -if test "yes" = "$enable_sit" -then - case $with_sit_alg in - *1) - with_sit_alg="sha1" - ;; - *2*) - with_sit_alg="sha256" - ;; - auto) - if test "no" != "$with_aes" - then - with_aes="yes" - fi - ;; - *) - with_sit_alg="aes" - if test "no" != "$with_aes" - then - with_aes="yes" - fi - ;; - esac -fi -if test "checksit" = "$with_aes" -then - with_aes="no" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL library" >&5 -$as_echo_n "checking for OpenSSL library... " >&6; } -OPENSSL_WARNING= -openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw" -if test "yes" = "$want_native_pkcs11" -then - use_openssl="native_pkcs11" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: use of native PKCS11 instead" >&5 -$as_echo "use of native PKCS11 instead" >&6; } -fi - -if test "auto" = "$use_openssl" -then - for d in $openssldirs - do - if test -f $d/include/openssl/opensslv.h - then - use_openssl=$d - break - fi - done -fi -OPENSSL_ECDSA="" -OPENSSL_GOST="" -OPENSSL_ED25519="" -gosttype="raw" -case "$with_gost" in - raw) - with_gost="yes" - ;; - asn1) - -$as_echo "#define PREFER_GOSTASN1 1" >>confdefs.h - - gosttype="asn1" - with_gost="yes" - ;; - auto|yes|no) - ;; - *) - as_fn_error $? "unknown GOST private key encoding" "$LINENO" 5 - ;; -esac - -case "$use_openssl" in - native_pkcs11) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled because of native PKCS11" >&5 -$as_echo "disabled because of native PKCS11" >&6; } - DST_OPENSSL_INC="" - CRYPTO="-DPKCS11CRYPTO" - OPENSSLECDSALINKOBJS="" - OPENSSLECDSALINKSRCS="" - OPENSSLEDDSALINKOBJS="" - OPENSSLEDDSALINKSRCS="" - OPENSSLGOSTLINKOBJS="" - OPENSSLGOSTLINKSRCS="" - OPENSSLLINKOBJS="" - OPENSSLLINKSRCS="" - ;; - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - DST_OPENSSL_INC="" - CRYPTO="" - OPENSSLECDSALINKOBJS="" - OPENSSLECDSALINKSRCS="" - OPENSSLEDDSALINKOBJS="" - OPENSSLEDDSALINKSRCS="" - OPENSSLGOSTLINKOBJS="" - OPENSSLGOSTLINKSRCS="" - OPENSSLLINKOBJS="" - OPENSSLLINKSRCS="" - ;; - auto) - DST_OPENSSL_INC="" - CRYPTO="" - OPENSSLECDSALINKOBJS="" - OPENSSLECDSALINKSRCS="" - OPENSSLEDDSALINKOBJS="" - OPENSSLEDDSALINKSRCS="" - OPENSSLGOSTLINKOBJS="" - OPENSSLGOSTLINKSRCS="" - OPENSSLLINKOBJS="" - OPENSSLLINKSRCS="" - as_fn_error $? "OpenSSL was not found in any of $openssldirs; use --with-openssl=/path -If you don't want OpenSSL, use --without-openssl" "$LINENO" 5 - ;; - *) - if test "yes" = "$want_native_pkcs11" - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } - as_fn_error $? "OpenSSL and native PKCS11 cannot be used together." "$LINENO" 5 - fi - if test "yes" = "$use_openssl" - then - # User did not specify a path - guess it - for d in $openssldirs - do - if test -f $d/include/openssl/opensslv.h - then - use_openssl=$d - break - fi - done - if test "yes" = "$use_openssl" - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "OpenSSL was not found in any of $openssldirs; use --with-openssl=/path" "$LINENO" 5 - fi - elif ! test -f "$use_openssl"/include/openssl/opensslv.h - then - as_fn_error $? "\"$use_openssl/include/openssl/opensslv.h\" not found" "$LINENO" 5 - fi - CRYPTO='-DOPENSSL' - if test "/usr" = "$use_openssl" - then - DST_OPENSSL_INC="" - DST_OPENSSL_LIBS="-lcrypto" - else - DST_OPENSSL_INC="-I$use_openssl/include" - case $host in - *-solaris*) - DST_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto" - ;; - *-hp-hpux*) - DST_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto" - ;; - *-apple-darwin*) - # - # 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. - # - if test -f "$use_openssl/lib/libcrypto.dylib" - then - DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" - else - DST_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a" - fi - ;; - *) - DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" - ;; - esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenSSL from $use_openssl/lib and $use_openssl/include" >&5 -$as_echo "using OpenSSL from $use_openssl/lib and $use_openssl/include" >&6; } - - saved_cc="$CC" - saved_cflags="$CFLAGS" - saved_libs="$LIBS" - CFLAGS="$DST_OPENSSL_INC $CFLAGS" - LIBS="$DST_OPENSSL_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linking with OpenSSL works" >&5 -$as_echo_n "checking whether linking with OpenSSL works... " >&6; } - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming it does work on target platform" >&5 -$as_echo "assuming it does work on target platform" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/err.h> -int main() { - ERR_clear_error(); - return (0); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Could not run test program using OpenSSL from -$use_openssl/lib and $use_openssl/include. -Please check the argument to --with-openssl and your -shared library configuration (e.g., LD_LIBRARY_PATH)." "$LINENO" 5 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linking with OpenSSL requires -ldl" >&5 -$as_echo_n "checking whether linking with OpenSSL requires -ldl... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/opensslv.h> -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -#include <openssl/crypto.h> -#else -#include <openssl/err.h> -#include <openssl/dso.h> -#endif - -int -main () -{ - -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL); -#else -DSO_METHOD_dlfcn(); -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - LIBS="$LIBS -ldl" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -#include <openssl/crypto.h> -#else -#include <openssl/err.h> -#include <openssl/dso.h> -#endif - -int -main () -{ - -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL); -#else -DSO_METHOD_dlfcn(); -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DST_OPENSSL_LIBS="$DST_OPENSSL_LIBS -ldl" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 -$as_echo "unknown" >&6; } - as_fn_error $? "OpenSSL has unsupported dynamic loading" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL FIPS mode support" >&5 -$as_echo_n "checking for OpenSSL FIPS mode support... " >&6; } - have_fips_mode="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <openssl/crypto.h> -int -main () -{ -FIPS_mode(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_fips_mode=yes -else - have_fips_mode=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "x$have_fips_mode" = "xyes" - then - -$as_echo "#define HAVE_FIPS_MODE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL DSA support" >&5 -$as_echo_n "checking for OpenSSL DSA support... " >&6; } - if test -f $use_openssl/include/openssl/dsa.h - then - $as_echo "#define HAVE_OPENSSL_DSA 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - for ac_func in EVP_sha256 EVP_sha384 EVP_sha512 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ECDSA support" >&5 -$as_echo_n "checking for OpenSSL ECDSA support... " >&6; } - have_ecdsa="" - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using --with-ecdsa" >&5 -$as_echo "using --with-ecdsa" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/ecdsa.h> -#include <openssl/objects.h> -int main() { - EC_KEY *ec256, *ec384; - -#if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384) - return (1); -#endif - ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); - ec384 = EC_KEY_new_by_curve_name(NID_secp384r1); - if (ec256 == NULL || ec384 == NULL) - return (2); - return (0); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_ecdsa="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecdsa="no" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - case "$with_ecdsa" in - yes) - case "$have_ecdsa" in - no) as_fn_error $? "ecdsa not supported" "$LINENO" 5 ;; - *) have_ecdsa=yes ;; - esac - ;; - no) - have_ecdsa=no ;; - *) - case "$have_ecdsa" in - yes|no) ;; - *) as_fn_error $? "need --with-ecdsa=[yes or no]" "$LINENO" 5 ;; - esac - ;; - esac - case $have_ecdsa in - yes) - OPENSSL_ECDSA="yes" - OPENSSLECDSALINKOBJS='${OPENSSLECDSALINKOBJS}' - OPENSSLECDSALINKSRCS='${OPENSSLECDSALINKSRCS}' - -$as_echo "#define HAVE_OPENSSL_ECDSA 1" >>confdefs.h - - ;; - *) - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL GOST support" >&5 -$as_echo_n "checking for OpenSSL GOST support... " >&6; } - have_gost="" - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using --with-gost" >&5 -$as_echo "using --with-gost" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/conf.h> -#include <openssl/engine.h> -int main() { -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10000000L) - ENGINE *e; - EC_KEY *ek; - - ek = NULL; - OPENSSL_config(NULL); - - e = ENGINE_by_id("gost"); - if (e == NULL) - return (1); - if (ENGINE_init(e) <= 0) - return (1); - return (0); -#else - return (1); -#endif -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_gost="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_gost="no" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - case "$with_gost" in - yes) - case "$have_gost" in - no) as_fn_error $? "gost not supported" "$LINENO" 5 ;; - *) have_gost=yes ;; - esac - ;; - no) - have_gost=no ;; - *) - case "$have_gost" in - yes|no) ;; - *) as_fn_error $? "need --with-gost=[yes, no, raw or asn1]" "$LINENO" 5 ;; - esac - ;; - esac - case $have_gost in - yes) - OPENSSL_GOST="yes" - OPENSSLGOSTLINKOBJS='${OPENSSLGOSTLINKOBJS}' - OPENSSLGOSTLINKSRCS='${OPENSSLGOSTLINKSRCS}' - -$as_echo "#define HAVE_OPENSSL_GOST 1" >>confdefs.h - - ;; - *) - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL Ed25519 support" >&5 -$as_echo_n "checking for OpenSSL Ed25519 support... " >&6; } - have_ed25519="" - have_ed448="" - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using --with-eddsa" >&5 -$as_echo "using --with-eddsa" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/evp.h> -#include <openssl/objects.h> -int main() { - EVP_PKEY_CTX *ctx; - - ctx = EVP_PKEY_CTX_new_id(NID_ED25519, NULL); - if (ctx == NULL) - return (2); - return (0); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_ed25519="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ed25519="no" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - case "$with_eddsa" in - yes|all) - case "$have_ed25519" in - no) as_fn_error $? "eddsa not supported" "$LINENO" 5 ;; - *) have_ed25519=yes ;; - esac - ;; - no) - have_ed25519=no ;; - *) - case "$have_ed25519" in - yes|no) ;; - *) as_fn_error $? "need --with-eddsa=[yes, all or no]" "$LINENO" 5 ;; - esac - ;; - esac - case $have_ed25519 in - yes) - OPENSSL_ED25519="yes" - OPENSSLEDDSALINKOBJS='${OPENSSLEDDSALINKOBJS}' - OPENSSLEDDSALINKSRCS='${OPENSSLEDDSALINKSRCS}' - -$as_echo "#define HAVE_OPENSSL_ED25519 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL Ed448 support" >&5 -$as_echo_n "checking for OpenSSL Ed448 support... " >&6; } - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using --with-eddsa" >&5 -$as_echo "using --with-eddsa" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/evp.h> -#include <openssl/objects.h> -int main() { - EVP_PKEY_CTX *ctx; - - ctx = EVP_PKEY_CTX_new_id(NID_ED448, NULL); - if (ctx == NULL) - return (2); - return (0); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_ed448="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ed448="no" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - case $with_eddsa in - all) - have_ed448=yes ;; - *) - ;; - esac - case $have_ed448 in - yes) - -$as_echo "#define HAVE_OPENSSL_ED448 1" >>confdefs.h -], - ;; - *) - ;; - esac - ;; - *) - ;; - esac - - have_aes="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL AES support" >&5 -$as_echo_n "checking for OpenSSL AES support... " >&6; } - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using --with-aes" >&5 -$as_echo "using --with-aes" >&6; } - # Expect cross-compiling with a modern OpenSSL - have_aes="evp" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/evp.h> -int main() { - const EVP_CIPHER *aes128, *aes192, *aes256; - - aes128 = EVP_aes_128_ecb(); - aes192 = EVP_aes_192_ecb(); - aes256 = EVP_aes_256_ecb(); - if (aes128 == NULL || aes192 == NULL || aes256 == NULL) - return (1); - return (0); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_aes="evp" -else - ac_fn_c_check_func "$LINENO" "AES_encrypt" "ac_cv_func_AES_encrypt" -if test "x$ac_cv_func_AES_encrypt" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_aes="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - ISC_OPENSSL_INC="" - ISC_OPENSSL_LIBS="" - if test "yes" = "$with_aes" - then - case "$have_aes" in - evp) - -$as_echo "#define HAVE_OPENSSL_EVP_AES 1" >>confdefs.h - - ISC_OPENSSL_INC="$DST_OPENSSL_INC" - ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS" - ;; - yes) - -$as_echo "#define HAVE_OPENSSL_AES 1" >>confdefs.h - - ISC_OPENSSL_INC="$DST_OPENSSL_INC" - ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS" - ;; - *) - ;; - esac - fi - - CC="$saved_cc" - CFLAGS="$saved_cflags" - LIBS="$saved_libs" - OPENSSLLINKOBJS='${OPENSSLLINKOBJS}' - OPENSSLLINKSRCS='${OPENSSLLINKSRCS}' - - ;; -esac - -# -# This would include the system openssl path (and linker options to use -# it as needed) if it is found. -# - - - - - - - - - - - - - - -DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DST_OPENSSL_LIBS" - -ISC_PLATFORM_WANTAES="#undef ISC_PLATFORM_WANTAES" -if test "yes" = "$with_aes" -then - if test "X$CRYPTO" = "X" - then - with_aes="no" - fi -fi -if test "yes" = "$with_aes" -then - ISC_PLATFORM_WANTAES="#define ISC_PLATFORM_WANTAES 1" -fi - - -# -# Choose SIT algorithm -# - -if test "yes" = "$enable_sit" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Algorithm for SIT" >&5 -$as_echo_n "checking for the Algorithm for SIT... " >&6; } - if test "auto" = "$with_sit_alg" - then - if test "$with_aes" = "yes" - then - with_sit_alg="aes" - else - with_sit_alg="sha256" - fi - fi -fi -case $with_sit_alg in - sha1) - if test "$enable_sit" != "yes" - then - as_fn_error $? "\"with-sit-alg requires enable-sit\"" "$LINENO" 5; - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: sha1" >&5 -$as_echo "sha1" >&6; } - if test "X$CRYPTO" = "X-DOPENSSL" - then - if test "checksit" = "$want_openssl_hash" - then - want_openssl_hash="yes" - fi - fi - -$as_echo "#define HMAC_SHA1_SIT 1" >>confdefs.h - - ;; - sha256) - if test "$enable_sit" != "yes" - then - as_fn_error $? "\"with-sit-alg requires enable-sit\"" "$LINENO" 5; - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: sha256" >&5 -$as_echo "sha256" >&6; } - if test "X$CRYPTO" = "X-DOPENSSL" - then - if test "checksit" = "$want_openssl_hash" - then - want_openssl_hash="yes" - fi - fi - -$as_echo "#define HMAC_SHA256_SIT 1" >>confdefs.h - - ;; - aes) - if test "$enable_sit" != "yes" - then - as_fn_error $? "\"with-sit-alg requires enable-sit\"" "$LINENO" 5; - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: aes" >&5 -$as_echo "aes" >&6; } - if test "yes" != "$with_aes" - then - as_fn_error $? "\"SIT wants to use unavailable AES\"" "$LINENO" 5; - fi - -$as_echo "#define AES_SIT 1" >>confdefs.h - - ;; -esac -if test "checksit" = "$want_openssl_hash" -then - want_openssl_hash="no" -fi - -# -# Use OpenSSL for hash functions -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for using OpenSSL for hash functions" >&5 -$as_echo_n "checking for using OpenSSL for hash functions... " >&6; } -ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH" -case $want_openssl_hash in - yes) - if test "$CRYPTO" != "-DOPENSSL" - then - as_fn_error $? "No OpenSSL for hash functions" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_OPENSSLHASH="#define ISC_PLATFORM_OPENSSLHASH 1" - ISC_OPENSSL_INC="$DST_OPENSSL_INC" - ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS" - ;; - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - - - - -# -# PKCS11 (aka crypto hardware) support (--with moved just after openssl) -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 support" >&5 -$as_echo_n "checking for PKCS11 support... " >&6; } - -if test "auto" = "$use_pkcs11" -then - if test "yes" = "$want_native_pkcs11" - then - use_pkcs11="yes" - else - use_pkcs11="no" - fi -fi - -case "$use_pkcs11" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - USE_PKCS11="" - PKCS11_TEST="" - PKCS11_TOOLS="" - ISC_PK11_C="" - ISC_PK11_O="" - ISC_PK11_API_C="" - ISC_PK11_API_O="" - ISC_PK11_RESULT_C="" - ISC_PK11_RESULT_O="" - ISC_ISCPK11_API_C="" - ISC_ISCPK11_API_O="" - ;; - yes|*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - as_fn_error $? "PKCS11 requires thread support" "$LINENO" 5 - if test "X$CRYPTO" = "X-DOPENSSL" - then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL with PKCS11 support" >&5 -$as_echo_n "checking for OpenSSL with PKCS11 support... " >&6; } - saved_cc="$CC" - saved_cflags="$CFLAGS" - saved_libs="$LIBS" - CC="$CC -pthread" - CFLAGS="$CFLAGS $DST_OPENSSL_INC" - LIBS="$LIBS $DST_OPENSSL_LIBS" - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross compile" >&5 -$as_echo "cross compile" >&6; } - PKCS11_TEST='' - PKCS11_ENGINE='-DPKCS11_ENGINE=NULL' -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <openssl/conf.h> -#include <openssl/engine.h> -int main() { - ENGINE *e; - - OPENSSL_config(NULL); - e = ENGINE_by_id("pkcs11"); - if (e == NULL) - return (1); - if (ENGINE_init(e) <= 0) - return (1); - return (0); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PKCS11_TEST=pkcs11ssl - PKCS11_ENGINE='-DPKCS11_ENGINE="\"pkcs11\""' -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKCS11_TEST='' - PKCS11_ENGINE='-DPKCS11_ENGINE=NULL' -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - CC="$saved_cc" - CFLAGS="$saved_cflags" - LIBS="$saved_libs" - else - PKCS11_TEST='' - PKCS11_ENGINE='-DPKCS11_ENGINE=NULL' - - fi - USE_PKCS11='-DUSE_PKCS11' - PKCS11_TOOLS=pkcs11 - ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase" -if test "x$ac_cv_func_getpassphrase" = xyes; then : - $as_echo "#define HAVE_GETPASSPHRASE 1" >>confdefs.h - -fi - - ISC_PK11_C="pk11.c" - ISC_PK11_O="pk11.$O" - ISC_PK11_API_C="pk11_api.c" - ISC_PK11_API_O="pk11_api.$O" - ISC_PK11_RESULT_C="pk11_result.c" - ISC_PK11_RESULT_O="pk11_result.$O" - ISC_ISCPK11_API_C="unix/pk11_api.c" - ISC_ISCPK11_API_O="unix/pk11_api.$O" - ;; -esac - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 tools" >&5 -$as_echo_n "checking for PKCS11 tools... " >&6; } -case "$use_pkcs11" in - no) - PKCS11_PROVIDER="undefined" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - yes|'') - PKCS11_PROVIDER="undefined" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 -$as_echo "enabled" >&6; } - ;; - *) - PKCS11_PROVIDER="$use_pkcs11" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled, PKCS11 provider is $PKCS11_PROVIDER" >&5 -$as_echo "enabled, PKCS11 provider is $PKCS11_PROVIDER" >&6; } - ;; -esac - - - -PKCS11_ECDSA="" -PKCS11_GOST="" -PKCS11_ED25519="" -set_pk11_flavor="no" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native PKCS11" >&5 -$as_echo_n "checking for native PKCS11... " >&6; } - -case "$want_native_pkcs11" in - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using native PKCS11 crypto" >&5 -$as_echo "using native PKCS11 crypto" >&6; } - PKCS11LINKOBJS='${PKCS11LINKOBJS}' - PKCS11LINKSRCS='${PKCS11LINKSRCS}' - PKCS11_TEST=pkcs11 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 ECDSA" >&5 -$as_echo_n "checking for PKCS11 ECDSA... " >&6; } - case "$with_ecdsa" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 -$as_echo "enabled" >&6; } - PKCS11_ECDSA="yes" - -$as_echo "#define HAVE_PKCS11_ECDSA 1" >>confdefs.h - - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 GOST" >&5 -$as_echo_n "checking for PKCS11 GOST... " >&6; } - case "$with_gost" in - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 -$as_echo "enabled" >&6; } - PKCS11_GOST="yes" - -$as_echo "#define HAVE_PKCS11_GOST 1" >>confdefs.h - - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 Ed25519" >&5 -$as_echo_n "checking for PKCS11 Ed25519... " >&6; } - case "$with_eddsa" in - yes|all) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 -$as_echo "enabled" >&6; } - PKCS11_ED25519="yes" - -$as_echo "#define HAVE_PKCS11_ED25519 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 Ed448" >&5 -$as_echo_n "checking for PKCS11 Ed448... " >&6; } - case "$with_eddsa" in - all) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 -$as_echo "enabled" >&6; } - -$as_echo "#define HAVE_PKCS11_ED448 1" >>confdefs.h - - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - esac - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 flavor" >&5 -$as_echo_n "checking for PKCS11 flavor... " >&6; } - case "$PKCS11_PROVIDER" in - *nfast*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Thales nCipher" >&5 -$as_echo "Thales nCipher" >&6; } - # default - pk11_flavor="PK11_THALES_FLAVOR" - set_pk11_flavor="yes" - ;; - *libsofthsm2*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: SoftHSMv2" >&5 -$as_echo "SoftHSMv2" >&6; } - pk11_flavor="PK11_SOFTHSMV2_FLAVOR" - set_pk11_flavor="yes" - ;; - *libsofthsm*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: SoftHSM" >&5 -$as_echo "SoftHSM" >&6; } - pk11_flavor="PK11_SOFTHSMV1_FLAVOR" - set_pk11_flavor="yes" - ;; - *cryptech*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cryptech" >&5 -$as_echo "Cryptech" >&6; } - pk11_flavor="PK11_CRYPTECH_FLAVOR" - set_pk11_flavor="yes" - ;; - *Keyper*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: AEP Keyper" >&5 -$as_echo "AEP Keyper" >&6; } - pk11_flavor="PK11_AEP_FLAVOR" - set_pk11_flavor="yes" - ;; - undefined) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: undefined provider?" >&5 -$as_echo "undefined provider?" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown provider: tweaks are in lib/isc/include/pk11/site.h" >&5 -$as_echo "unknown provider: tweaks are in lib/isc/include/pk11/site.h" >&6; } - ;; - esac - if test "yes" = "$set_pk11_flavor" ; then - CFLAGS="$CFLAGS -DPK11_FLAVOR=$pk11_flavor" - fi - ;; - no|'') - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ;; -esac - - - - - - - - - -# for PKCS11 benchmarks - -have_clock_gt=no -ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - have_clock_gt=yes -fi - -if test "no" = "$have_clock_gt"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if ${ac_cv_lib_rt_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_clock_gettime=yes -else - ac_cv_lib_rt_clock_gettime=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : - have_clock_gt=rt -fi - -fi - -if test "no" != "$have_clock_gt"; then - -$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - -fi - -if test "rt" = "$have_clock_gt"; then - LIBS="-lrt $LIBS" -fi - -# -# was --with-libxml2 specified? -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2 library" >&5 -$as_echo_n "checking for libxml2 library... " >&6; } - -# Check whether --with-libxml2 was given. -if test "${with_libxml2+set}" = set; then : - withval=$with_libxml2; use_libxml2="$withval" -else - use_libxml2="auto" -fi - - -case "$use_libxml2" in - no) - DST_LIBXML2_INC="" - ;; - auto|yes) - case X`(xml2-config --version) 2>/dev/null` in - X2.[6789].*) - libxml2_libs=`xml2-config --libs` - libxml2_cflags=`xml2-config --cflags` - ;; - *) - if test "yes" = "$use_libxml2" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "required libxml2 version not available" "$LINENO" 5 - else - libxml2_libs= - libxml2_cflags= - fi - ;; - esac - ;; - *) - if test -f "$use_libxml2/bin/xml2-config" ; then - libxml2_libs=`$use_libxml2/bin/xml2-config --libs` - libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags` - fi - ;; -esac - -if test "X$libxml2_libs" != "X" -then - CFLAGS="$CFLAGS $libxml2_cflags" - LIBS="$LIBS $libxml2_libs" - # - # Sanity check xml2-config output. - # - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <libxml/xmlwriter.h> -int -main () -{ -return(xmlTextWriterStartElement(NULL, NULL)); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - as_fn_error $? "xml2-config returns badness" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h - - XMLSTATS=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# -# was --with-libjson specified? -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for json library" >&5 -$as_echo_n "checking for json library... " >&6; } - -# Check whether --with-libjson was given. -if test "${with_libjson+set}" = set; then : - withval=$with_libjson; use_libjson="$withval" -else - use_libjson="auto" -fi - - -have_libjson="" -have_libjson_c="" -case "$use_libjson" in - no) - libjson_libs="" - ;; - auto|yes) - for d in /usr /usr/local /opt/local - do - if test -f "${d}/include/json/json.h" - then - if test ${d} != /usr - then - libjson_cflags="-I ${d}/include" - LIBS="$LIBS -L${d}/lib" - fi - have_libjson="yes" - elif test -f "${d}/include/json-c/json.h" - then - if test ${d} != /usr - then - libjson_cflags="-I ${d}/include" - LIBS="$LIBS -L${d}/lib" - fi - have_libjson="yes" - have_libjson_c="yes" - fi - done - ;; - *) - if test -f "${use_libjson}/include/json/json.h" - then - libjson_cflags="-I${use_libjson}/include" - LIBS="$LIBS -L${use_libjson}/lib" - have_libjson="yes" - elif test -f "${use_libjson}/include/json-c/json.h" - then - libjson_cflags="-I${use_libjson}/include" - LIBS="$LIBS -L${use_libjson}/lib" - have_libjson="yes" - have_libjson_c="yes" - else - as_fn_error $? "$use_libjson/include/json{,-c}/json.h not found." "$LINENO" 5 - fi - ;; -esac - -if test "X${have_libjson}" != "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing json_object_new_int64" >&5 -$as_echo_n "checking for library containing json_object_new_int64... " >&6; } -if ${ac_cv_search_json_object_new_int64+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char json_object_new_int64 (); -int -main () -{ -return json_object_new_int64 (); - ; - return 0; -} -_ACEOF -for ac_lib in '' json json-c; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_json_object_new_int64=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_json_object_new_int64+:} false; then : - break -fi -done -if ${ac_cv_search_json_object_new_int64+:} false; then : - -else - ac_cv_search_json_object_new_int64=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_json_object_new_int64" >&5 -$as_echo "$ac_cv_search_json_object_new_int64" >&6; } -ac_res=$ac_cv_search_json_object_new_int64 -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "found libjson include but not library." "$LINENO" 5 - have_libjson="" -fi - -elif test "X$use_libjson" = Xyes -then - as_fn_error $? "include/json{,-c}/json.h not found." "$LINENO" 5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -if test "X${have_libjson}" != "X" -then - CFLAGS="$CFLAGS $libjson_cflags" - -$as_echo "#define HAVE_JSON 1" >>confdefs.h - - if test "X${have_libjson_c}" = Xyes - then - -$as_echo "#define HAVE_JSON_C 1" >>confdefs.h - - fi - JSONSTATS=1 -fi - - -# -# In solaris 10, SMF can manage named service -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for smf_enable_instance in -lscf" >&5 -$as_echo_n "checking for smf_enable_instance in -lscf... " >&6; } -if ${ac_cv_lib_scf_smf_enable_instance+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lscf $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char smf_enable_instance (); -int -main () -{ -return smf_enable_instance (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_scf_smf_enable_instance=yes -else - ac_cv_lib_scf_smf_enable_instance=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_scf_smf_enable_instance" >&5 -$as_echo "$ac_cv_lib_scf_smf_enable_instance" >&6; } -if test "x$ac_cv_lib_scf_smf_enable_instance" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSCF 1 -_ACEOF - - LIBS="-lscf $LIBS" - -fi - - -# -# 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. -# -ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile" -if test "x$ac_cv_func_flockfile" = xyes; then : - $as_echo "#define HAVE_FLOCKFILE 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "getc_unlocked" "ac_cv_func_getc_unlocked" -if test "x$ac_cv_func_getc_unlocked" = xyes; then : - $as_echo "#define HAVE_GETCUNLOCKED 1" >>confdefs.h - -fi - - -# -# End of pthreads stuff. -# - -# -# Large File -# -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; want_largefile="yes" -else - want_largefile="no" -fi - -case $want_largefile in - yes) - ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - ;; - *) - ;; -esac - -# -# Additional compiler settings. -# MKDEPCC="$CC" MKDEPCFLAGS="-M" IRIX_DNSSEC_WARNINGS_HACK="" @@ -16107,253 +11724,6 @@ fi -# -# NLS -# -ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets" -if test "x$ac_cv_func_catgets" = xyes; then : - $as_echo "#define HAVE_CATGETS 1" >>confdefs.h - -fi - - -# -# -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: -# -case "$host" in - mips-sgi-irix*) - ;; - *-linux*) - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if ${ac_cv_lib_socket_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_socket=yes -else - ac_cv_lib_socket_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_addr in -lnsl" >&5 -$as_echo_n "checking for inet_addr in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_inet_addr+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inet_addr (); -int -main () -{ -return inet_addr (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_inet_addr=yes -else - ac_cv_lib_nsl_inet_addr=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_addr" >&5 -$as_echo "$ac_cv_lib_nsl_inet_addr" >&6; } -if test "x$ac_cv_lib_nsl_inet_addr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -fi - - ;; -esac - -# -# Work around Solaris's select() limitations. -# -case "$host" in - *-solaris2.[89]|*-solaris2.1?) - -$as_echo "#define FD_SETSIZE 65536" >>confdefs.h - - ;; -esac - -# -# Purify support -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use purify" >&5 -$as_echo_n "checking whether to use purify... " >&6; } - -# Check whether --with-purify was given. -if test "${with_purify+set}" = set; then : - withval=$with_purify; use_purify="$withval" -else - use_purify="no" -fi - - -case "$use_purify" in - no) - ;; - yes) - # Extract the first word of "purify", so it can be a program name with args. -set dummy purify; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_purify_path+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $purify_path in - [\\/]* | ?:[\\/]*) - ac_cv_path_purify_path="$purify_path" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_purify_path="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_purify_path" && ac_cv_path_purify_path="purify" - ;; -esac -fi -purify_path=$ac_cv_path_purify_path -if test -n "$purify_path"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $purify_path" >&5 -$as_echo "$purify_path" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - ;; - *) - purify_path="$use_purify" - ;; -esac - -case "$use_purify" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PURIFY="" - ;; - *) - if test -f "$purify_path" || test purify = "$purify_path"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $purify_path" >&5 -$as_echo "$purify_path" >&6; } - PURIFYFLAGS="`echo $PURIFYOPTIONS`" - PURIFY="$purify_path $PURIFYFLAGS" - else - as_fn_error $? "$purify_path not found. - -Please choose the proper path with the following command: - - configure --with-purify=PATH -" "$LINENO" 5 - fi - ;; -esac - - - -# -# Google/Great Performance Tools CPU Profiler -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use gperftools profiler" >&5 -$as_echo_n "checking whether to use gperftools profiler... " >&6; } - -# Check whether --with-gperftools-profiler was given. -if test "${with_gperftools_profiler+set}" = set; then : - withval=$with_gperftools_profiler; use_profiler="$withval" -else - use_profiler="no" -fi - - -case $use_profiler in - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_GPERFTOOLS_PROFILER 1" >>confdefs.h - - LIBS="$LIBS -lprofiler" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac # # File name extension for static archive files, for those few places @@ -16375,2356 +11745,6 @@ SA=a BIND9_CO_RULE=".c.$O:" -# -# Here begins a very long section to determine the system's networking -# capabilities. The order of the tests is significant. -# - -# -# IPv6 -# -# Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then : - enableval=$enable_ipv6; -fi - - -case "$enable_ipv6" in - yes|''|autodetect) - $as_echo "#define WANT_IPV6 1" >>confdefs.h - - ;; - no) - ;; -esac - -# -# We do the IPv6 compilation checking after libtool so that we can put -# the right suffix on the files. -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5 -$as_echo_n "checking for IPv6 structures... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -int -main () -{ -struct sockaddr_in6 sin6; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - found_ipv6=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - found_ipv6=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# See whether IPv6 support is provided via a Kame add-on. -# This is done before other IPv6 linking tests to LIBS is properly set. -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5 -$as_echo_n "checking for Kame IPv6 support... " >&6; } - -# Check whether --with-kame was given. -if test "${with_kame+set}" = set; then : - withval=$with_kame; use_kame="$withval" -else - use_kame="no" -fi - - -case "$use_kame" in - no) - ;; - yes) - kame_path=/usr/local/v6 - ;; - *) - kame_path="$use_kame" - ;; -esac - -case "$use_kame" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - if test -f $kame_path/lib/libinet6.a; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5 -$as_echo "$kame_path/lib/libinet6.a" >&6; } - LIBS="-L$kame_path/lib -linet6 $LIBS" - else - as_fn_error $? "$kame_path/lib/libinet6.a not found. - -Please choose the proper path with the following command: - - configure --with-kame=PATH -" "$LINENO" 5 - fi - ;; -esac - -# -# Whether netinet6/in6.h is needed has to be defined in isc/platform.h. -# 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 -# netinet6/in6.h is needed for. -# - -case "$host" in -*-bsdi4.[01]*) - ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1" - isc_netinet6in6_hack="#include <netinet6/in6.h>" - ;; -*) - ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H" - isc_netinet6in6_hack="" - ;; -esac - - -# -# This is similar to the netinet6/in6.h issue. -# -case "$host" in -*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*) - # UnixWare - ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1" - ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1" - isc_netinetin6_hack="#include <netinet/in6.h>" - ;; -*) - ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H" - ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR" - isc_netinetin6_hack="" - ;; -esac - -# -# Now delve deeper into the suitability of the IPv6 support. -# -case "$found_ipv6" in - yes) - ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_addr" >&5 -$as_echo_n "checking for in6_addr... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack - -int -main () -{ -struct in6_addr in6; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" - isc_in_addr6_hack="" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1" - isc_in_addr6_hack="#define in6_addr in_addr6" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5 -$as_echo_n "checking for in6addr_any... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack -$isc_in_addr6_hack - -int -main () -{ -struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_loopback" >&5 -$as_echo_n "checking for in6addr_loopback... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack -$isc_in_addr6_hack - -int -main () -{ -struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin6_scope_id in struct sockaddr_in6" >&5 -$as_echo_n "checking for sin6_scope_id in struct sockaddr_in6... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack - -int -main () -{ -struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1" - result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID" - result="#undef LWRES_HAVE_SIN6_SCOPE_ID" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - LWRES_HAVE_SIN6_SCOPE_ID="$result" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5 -$as_echo_n "checking for in6_pktinfo... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack - -int -main () -{ -struct in6_pktinfo xyzzy; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- disabling runtime ipv6 support" >&5 -$as_echo "no -- disabling runtime ipv6 support" >&6; } - ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; - no) - ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6" - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_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" - ISC_IPV6_C="ipv6.c" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5 -$as_echo_n "checking for struct sockaddr_storage... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack - -int -main () -{ -struct sockaddr_storage storage; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5 -$as_echo_n "checking for struct if_laddrreq... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <net/if6.h> - -int -main () -{ - struct if_laddrreq a; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5 -$as_echo_n "checking for struct if_laddrconf... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <net/if6.h> - -int -main () -{ - struct if_laddrconf a; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -# -# 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. -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop with IPv6 support" >&5 -$as_echo_n "checking for inet_ntop with IPv6 support... " >&6; } -if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming inet_ntop not needed" >&5 -$as_echo "assuming inet_ntop not needed" >&6; } - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -main() { -char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c" - ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -# -# Look for a 4.4BSD-style sa_len member in struct sockaddr. -# -case "$host" in - *-dec-osf*) - # Turn on 4.4BSD style sa_len support. - $as_echo "#define _SOCKADDR_LEN 1" >>confdefs.h - - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_len in struct sockaddr" >&5 -$as_echo_n "checking for sa_len in struct sockaddr... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -int -main () -{ -struct sockaddr sa; sa.sa_len = 0; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# Look for a 4.4BSD or 4.3BSD struct msghdr -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct msghdr flavor" >&5 -$as_echo_n "checking for struct msghdr flavor... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/socket.h> -int -main () -{ -struct msghdr msg; msg.msg_flags = 0; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: 4.4BSD" >&5 -$as_echo "4.4BSD" >&6; } - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: 4.3BSD" >&5 -$as_echo "4.3BSD" >&6; } - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# Look for in_port_t. -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type in_port_t" >&5 -$as_echo_n "checking for type in_port_t... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <netinet/in.h> -int -main () -{ -in_port_t port = 25; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# Check for addrinfo -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5 -$as_echo_n "checking for struct addrinfo... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -int -main () -{ -struct addrinfo a; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" - $as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# Check for rrsetinfo -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rrsetinfo" >&5 -$as_echo_n "checking for struct rrsetinfo... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -int -main () -{ -struct rrsetinfo r; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int sethostent" >&5 -$as_echo_n "checking for int sethostent... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -int -main () -{ -int i = sethostent(0); return(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int endhostent" >&5 -$as_echo_n "checking for int endhostent... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -int -main () -{ -int i = endhostent(); return(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnetbyaddr(in_addr_t, ...)" >&5 -$as_echo_n "checking for getnetbyaddr(in_addr_t, ...)... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -struct netent *getnetbyaddr(in_addr_t, int); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int setnetent" >&5 -$as_echo_n "checking for int setnetent... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -int -main () -{ -int i = setnetent(0); return(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int endnetent" >&5 -$as_echo_n "checking for int endnetent... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -int -main () -{ -int i = endnetent(); return(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr(const void *, size_t, ...)" >&5 -$as_echo_n "checking for gethostbyaddr(const void *, size_t, ...)... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -struct hostent *gethostbyaddr(const void *, size_t, int); -int -main () -{ -return(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errno in netdb.h" >&5 -$as_echo_n "checking for h_errno in netdb.h... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <netdb.h> -int -main () -{ -h_errno = 1; return(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -ac_fn_c_check_func "$LINENO" "getipnodebyname" "ac_cv_func_getipnodebyname" -if test "x$ac_cv_func_getipnodebyname" = xyes; then : - ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO" -else - ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1" -fi - -ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" -if test "x$ac_cv_func_getnameinfo" = xyes; then : - ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO" -else - ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1" -fi - -ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = xyes; then : - ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO" - $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h - -else - ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1" -fi - -ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" -if test "x$ac_cv_func_gai_strerror" = xyes; then : - $as_echo "#define HAVE_GAISTRERROR 1" >>confdefs.h - -fi - - - - - -# Check whether --enable-getifaddrs was given. -if test "${enable_getifaddrs+set}" = set; then : - enableval=$enable_getifaddrs; want_getifaddrs="$enableval" -else - want_getifaddrs="yes" -fi - - -# -# This interface iteration code for getifaddrs() will fall back to using -# /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6 -# addresses. -# -case $want_getifaddrs in -glibc) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"--enable-getifaddrs=glibc is no longer required\"" >&5 -$as_echo "$as_me: WARNING: \"--enable-getifaddrs=glibc is no longer required\"" >&2;} -ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" -if test "x$ac_cv_func_getifaddrs" = xyes; then : - $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h - -fi - -;; -yes) -ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" -if test "x$ac_cv_func_getifaddrs" = xyes; then : - $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h - -fi - -;; -no) -;; -esac - -# -# Look for a sysctl call to get the list of network interfaces. -# -case $ac_cv_header_sys_sysctl_h in -yes) -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for interface list sysctl" >&5 -$as_echo_n "checking for interface list sysctl... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/socket.h> -#ifdef NET_RT_IFLIST -found_rt_iflist -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "found_rt_iflist" >/dev/null 2>&1; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define HAVE_IFLIST_SYSCTL 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f conftest* - -;; -esac - -# -# Check for some other useful functions that are not ever-present. -# - -# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC -# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77 -# 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 -# the function itself. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correctly declared strsep()" >&5 -$as_echo_n "checking for correctly declared strsep()... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> -int -main () -{ -char *sp; char *foo = strsep(&sp, "."); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" -if test "x$ac_cv_func_memmove" = xyes; then : - ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE" -else - ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1" -fi - - - -ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" -if test "x$ac_cv_func_strtoul" = xyes; then : - ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL" - GENRANDOMLIB="" -else - ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1" - GENRANDOMLIB='${ISCLIBS}' -fi - - - - -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = xyes; then : - ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY" -else - ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1" -fi - - - -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = xyes; then : - ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT" -else - ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1" -fi - - - -ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" -if test "x$ac_cv_func_strcasestr" = xyes; then : - ISC_PLATFORM_NEEDSTRCASESTR="#undef ISC_PLATFORM_NEEDSTRCASESTR" -else - ISC_PLATFORM_NEEDSTRCASESTR="#define ISC_PLATFORM_NEEDSTRCASESTR 1" -fi - - - - - -# Check whether --with-readline was given. -if test "${with_readline+set}" = set; then : - withval=$with_readline; use_readline="$withval" -else - use_readline="auto" -fi - -case "$use_readline" in -no) ;; -*) - saved_LIBS="$LIBS" - case "$use_readline" in - yes|auto) try_readline="-ledit"; or_readline="-lreadline" ;; - *) try_readline="$use_readline" - esac - for readline in "$try_readline" $or_readline - do - LIBS="$readline" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline" >&5 -$as_echo "$as_me: checking for readline with $readline" >&6;} - for ac_func in readline -do : - ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline" -if test "x$ac_cv_func_readline" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE 1 -_ACEOF - -fi -done - - if test "yes" = "$ac_cv_func_readline" - then - READLINE_LIB="$readline" - break - fi - for lib in -lterminfo -ltermcap -lncurses -lcurses - do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline $lib" >&5 -$as_echo "$as_me: checking for readline with $readline $lib" >&6;} - unset ac_cv_func_readline - LIBS="$readline $lib" - for ac_func in readline -do : - ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline" -if test "x$ac_cv_func_readline" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE 1 -_ACEOF - -fi -done - - if test "yes" = "$ac_cv_func_readline" - then - READLINE_LIB="$readline $lib" - break - fi - done - if test "yes" = "$ac_cv_func_readline" - then - break - fi - done - if test "auto" != "$use_readline" && - test "X$READLINE_LIB" = "X" - then - as_fn_error $? "The readline library was not found." "$LINENO" 5 - fi - LIBS="$saved_LIBS" - ;; -esac -if test "yes" = "$ac_cv_func_readline" -then - case "$READLINE_LIB" in - *edit*) - for ac_header in editline/readline.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_editline_readline_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EDITLINE_READLINE_H 1 -_ACEOF - -fi - -done - - for ac_header in edit/readline/readline.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "edit/readline/readline.h" "ac_cv_header_edit_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_edit_readline_readline_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EDIT_READLINE_READLINE_H 1 -_ACEOF - -fi - -done - - for ac_header in edit/readline/history.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "edit/readline/history.h" "ac_cv_header_edit_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_edit_readline_history_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EDIT_READLINE_HISTORY_H 1 -_ACEOF - -fi - -done - - ;; - esac - for ac_header in readline/readline.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE_READLINE_H 1 -_ACEOF - -fi - -done - - for ac_header in readline/history.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE_HISTORY_H 1 -_ACEOF - -fi - -done - -fi - -ISC_PRINT_OBJS= -ISC_PRINT_SRCS= -ISC_PLATFORM_NEEDPRINTF='#undef ISC_PLATFORM_NEEDPRINTF' -ISC_PLATFORM_NEEDFPRINTF='#undef ISC_PLATFORM_NEEDFPRINTF' -ISC_PLATFORM_NEEDSPRINTF='#undef ISC_PLATFORM_NEEDSPRINTF' -ISC_PLATFORM_NEEDVSNPRINTF='#undef ISC_PLATFORM_NEEDVSNPRINTF' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sprintf return type" >&5 -$as_echo_n "checking sprintf return type... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <stdio.h> - -int -main () -{ - char buf[2]; return(*sprintf(buf,"x")); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: char *" >&5 -$as_echo "char *" >&6; } -ISC_PRINT_OBJS="print.$O" -ISC_PRINT_SRCS="print.c" -ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5 -$as_echo "int" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" -if test "x$ac_cv_func_vsnprintf" = xyes; then : - -else - ISC_PRINT_OBJS="print.$O" - ISC_PRINT_SRCS="print.c" - ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1" -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking printf for %z support" >&5 -$as_echo_n "checking printf for %z support... " >&6; } -if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming target platform supports %z" >&5 -$as_echo "assuming target platform supports %z" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <stdio.h> - -int -main() { - size_t j = 0; - char buf[100]; - buf[0] = 0; - sprintf(buf, "%zu", j); - return ((buf[0] == '0' && buf[1] == '\0') ? 0 : 1); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PRINT_OBJS="print.$O" - ISC_PRINT_SRCS="print.c" - ISC_PLATFORM_NEEDPRINTF='#define ISC_PLATFORM_NEEDPRINTF 1' - ISC_PLATFORM_NEEDFPRINTF='#define ISC_PLATFORM_NEEDFPRINTF 1' - ISC_PLATFORM_NEEDFSRINTF='#define ISC_PLATFORM_NEEDSPRINTF 1' - ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - - - - - -ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS" -ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS" - - - -ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" -if test "x$ac_cv_func_strerror" = xyes; then : - $as_echo "#define HAVE_STRERROR 1" >>confdefs.h - -fi - -# -# Use our own SPNEGO implementation? -# -# Check whether --enable-isc-spnego was given. -if test "${enable_isc_spnego+set}" = set; then : - enableval=$enable_isc_spnego; -fi - - -if test -n "$USE_GSSAPI" -then - case "$enable_isc_spnego" in - yes|'') - USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO' - DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O" - DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using SPNEGO from lib/dns" >&5 -$as_echo "using SPNEGO from lib/dns" >&6; } - ;; - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using SPNEGO from GSSAPI library" >&5 -$as_echo "using SPNEGO from GSSAPI library" >&6; } - ;; - esac -fi - - - - - - -# Determine the printf format characters to use when printing -# values of type 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 -# configure on Win32. -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking printf format modifier for 64-bit integers" >&5 -$as_echo_n "checking printf format modifier for 64-bit integers... " >&6; } -if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming target platform uses ll" >&5 -$as_echo "assuming target platform uses ll" >&6; } - ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#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)); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ll" >&5 -$as_echo "ll" >&6; } - ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: l" >&5 -$as_echo "l" >&6; } - ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"' -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - - -# -# Security Stuff -# -# Note it is very recommended to *not* disable chroot(), -# this is only because chroot() was made obsolete by Posix. -# Check whether --enable-chroot was given. -if test "${enable_chroot+set}" = set; then : - enableval=$enable_chroot; -fi - -case "$enable_chroot" in - yes|'') - for ac_func in chroot -do : - ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot" -if test "x$ac_cv_func_chroot" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CHROOT 1 -_ACEOF - -fi -done - - ;; - no) - ;; -esac -# Check whether --enable-linux-caps was given. -if test "${enable_linux_caps+set}" = set; then : - enableval=$enable_linux_caps; -fi - -case "$enable_linux_caps" in - yes|'') - for ac_header in linux/types.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "linux/types.h" "ac_cv_header_linux_types_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_types_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_TYPES_H 1 -_ACEOF - -fi - -done - - for ac_header in sys/capability.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_capability_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_CAPABILITY_H 1 -_ACEOF - -fi - -done - - for ac_header in linux/capability.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/capability.h" "ac_cv_header_linux_capability_h" "#ifdef HAVE_LINUX_TYPES_H - #include <linux/types.h> - #endif - -" -if test "x$ac_cv_header_linux_capability_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_CAPABILITY_H 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_set_proc in -lcap" >&5 -$as_echo_n "checking for cap_set_proc in -lcap... " >&6; } -if ${ac_cv_lib_cap_cap_set_proc+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcap $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cap_set_proc (); -int -main () -{ -return cap_set_proc (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_cap_cap_set_proc=yes -else - ac_cv_lib_cap_cap_set_proc=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_set_proc" >&5 -$as_echo "$ac_cv_lib_cap_cap_set_proc" >&6; } -if test "x$ac_cv_lib_cap_cap_set_proc" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCAP 1 -_ACEOF - - LIBS="-lcap $LIBS" - -fi - - ;; - no) - ;; -esac -for ac_header in sys/prctl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_prctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PRCTL_H 1 -_ACEOF - -fi - -done - - -for ac_header in sys/un.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UN_H 1 -_ACEOF - ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1" - -else - ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH" - -fi - -done - - - -case "$host" in -*-solaris*) - -$as_echo "#define NEED_SECURE_DIRECTORY 1" >>confdefs.h - - ;; -*-sunos*) - -$as_echo "#define NEED_SECURE_DIRECTORY 1" >>confdefs.h - - ;; -esac - -# -# Time Zone Stuff -# -ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" -if test "x$ac_cv_func_tzset" = xyes; then : - $as_echo "#define HAVE_TZSET 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optarg declaration" >&5 -$as_echo_n "checking for optarg declaration... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <unistd.h> - -int -main () -{ -optarg = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -GEN_NEED_OPTARG="-DNEED_OPTARG=1" - -$as_echo "#define NEED_OPTARG 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# Check for nanoseconds in file stats -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking st_mtim.tv_nsec" >&5 -$as_echo_n "checking st_mtim.tv_nsec... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/stat.h> -int -main () -{ -struct stat s; return(s.st_mtim.tv_nsec); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVESTATNSEC="#define ISC_PLATFORM_HAVESTATNSEC 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# BSD/OS, and perhaps some others, don't define rlim_t. -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type rlim_t" >&5 -$as_echo_n "checking for type rlim_t... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -int -main () -{ -rlim_t rl = 19671212; return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - rlim_t="#define ISC_PLATFORM_RLIMITTYPE rlim_t" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of rlim_cur" >&5 -$as_echo_n "checking type of rlim_cur... " >&6; } -if test "$cross_compiling" = yes; then : - - -# Check whether --with-rlimtype was given. -if test "${with_rlimtype+set}" = set; then : - withval=$with_rlimtype; rlimtype="$withval" -else - rlimtype="long long int" -fi - -rlim_t="#define ISC_PLATFORM_RLIMITTYPE $rlimtype" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot determine type of rlim_cur when cross compiling - assuming $rlimtype" >&5 -$as_echo "cannot determine type of rlim_cur when cross compiling - assuming $rlimtype" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5 -$as_echo "int" >&6; } -rlim_t="#define ISC_PLATFORM_RLIMITTYPE int" -else - -if test "$cross_compiling" = yes; then : - as_fn_error $? "this cannot happen" "$LINENO" 5 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: long int" >&5 -$as_echo "long int" >&6; } -rlim_t="#define ISC_PLATFORM_RLIMITTYPE long int" -else - -if test "$cross_compiling" = yes; then : - as_fn_error $? "this cannot happen" "$LINENO" 5 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: long long int" >&5 -$as_echo "long long int" >&6; } -rlim_t="#define ISC_PLATFORM_RLIMITTYPE long long int" -else - as_fn_error $? "unable to determine sizeof rlim_cur" "$LINENO" 5 - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# -# Older HP-UX doesn't have gettune -# -case "$host" in - *-hp-hpux*) - for ac_header in sys/dyntune.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/dyntune.h" "ac_cv_header_sys_dyntune_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_dyntune_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_DYNTUNE_H 1 -_ACEOF - -fi - -done - - ;; - *) - ;; -esac - - -# -# Compaq TruCluster requires more code for handling cluster IP aliases -# -case "$host" in - *-dec-osf*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clua_getaliasaddress in -lclua" >&5 -$as_echo_n "checking for clua_getaliasaddress in -lclua... " >&6; } -if ${ac_cv_lib_clua_clua_getaliasaddress+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lclua $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clua_getaliasaddress (); -int -main () -{ -return clua_getaliasaddress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_clua_clua_getaliasaddress=yes -else - ac_cv_lib_clua_clua_getaliasaddress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clua_clua_getaliasaddress" >&5 -$as_echo "$ac_cv_lib_clua_clua_getaliasaddress" >&6; } -if test "x$ac_cv_lib_clua_clua_getaliasaddress" = xyes; then : - LIBS="-lclua $LIBS" -fi - - ac_fn_c_check_func "$LINENO" "clua_getaliasaddress" "ac_cv_func_clua_getaliasaddress" -if test "x$ac_cv_func_clua_getaliasaddress" = xyes; then : - -$as_echo "#define HAVE_TRUCLUSTER 1" >>confdefs.h - -fi - - ;; - *) - ;; -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*) - -$as_echo "#define BROKEN_RECVMSG 1" >>confdefs.h - - ;; -esac - -# -# Microsoft has their own way of handling shared libraries that requires -# additional qualifiers on extern variables. Unix systems don't need it. -# - -ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC" - -# -# Random remaining OS-specific issues involving compiler warnings. -# XXXDCL print messages to indicate some compensation is being done? -# - -ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT" - -case "$host" in - *-aix5.[123].*) - hack_shutup_pthreadonceinit=yes - ;; - *-bsdi3.1*) - hack_shutup_sputaux=yes - ;; - *-bsdi4.0*) - hack_shutup_sigwait=yes - hack_shutup_sputaux=yes - ;; - *-bsdi4.[12]*) - hack_shutup_stdargcast=yes - ;; - *-solaris2.[89]) - hack_shutup_pthreadonceinit=yes - ;; - *-solaris2.1[0-9]) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include <pthread.h> -int -main () -{ - static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hack_shutup_pthreadonceinit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; -esac - -case "$hack_shutup_pthreadonceinit" in - yes) - # - # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings. - # - ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" - ;; -esac - -case "$hack_shutup_sigwait" in - yes) - # - # Shut up a -Wmissing-prototypes warning for sigwait(). - # - $as_echo "#define SHUTUP_SIGWAIT 1" >>confdefs.h - - ;; -esac - -case "$hack_shutup_sputaux" in - yes) - # - # Shut up a -Wmissing-prototypes warning from <stdio.h>. - # - $as_echo "#define SHUTUP_SPUTAUX 1" >>confdefs.h - - ;; -esac - -case "$hack_shutup_stdargcast" in - yes) - # - # Shut up a -Wcast-qual warning from va_start(). - # - $as_echo "#define SHUTUP_STDARG_CAST 1" >>confdefs.h - - ;; -esac - -for ac_header in strings.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" -if test "x$ac_cv_header_strings_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRINGS_H 1 -_ACEOF - ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1" - -else - ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH" - -fi - -done - - - -# -# Check for if_nametoindex() for IPv6 scoped addresses support -# -ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" -if test "x$ac_cv_func_if_nametoindex" = xyes; then : - ac_cv_have_if_nametoindex=yes -else - ac_cv_have_if_nametoindex=no -fi - -case $ac_cv_have_if_nametoindex in -no) - case "$host" in - *-hp-hpux*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nametoindex in -lipv6" >&5 -$as_echo_n "checking for if_nametoindex in -lipv6... " >&6; } -if ${ac_cv_lib_ipv6_if_nametoindex+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipv6 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char if_nametoindex (); -int -main () -{ -return if_nametoindex (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ipv6_if_nametoindex=yes -else - ac_cv_lib_ipv6_if_nametoindex=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipv6_if_nametoindex" >&5 -$as_echo "$ac_cv_lib_ipv6_if_nametoindex" >&6; } -if test "x$ac_cv_lib_ipv6_if_nametoindex" = xyes; then : - ac_cv_have_if_nametoindex=yes - LIBS="-lipv6 $LIBS" -fi - - ;; - esac -esac -case $ac_cv_have_if_nametoindex in -yes) - ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" - -$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h - - - ;; -*) - ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX" - ;; -esac - - -for ac_func in nanosleep usleep explicit_bzero -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# -# Machine architecture dependent features -# -have_stdatomic=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable stdatomic.h" >&5 -$as_echo_n "checking for usable stdatomic.h... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <stdio.h> -#include <stdatomic.h> - -int -main () -{ - -atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_stdatomic=yes - ISC_PLATFORM_HAVESTDATOMIC="#define ISC_PLATFORM_HAVESTDATOMIC 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_stdatomic=no - ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# Check whether --enable-atomic was given. -if test "${enable_atomic+set}" = set; then : - enableval=$enable_atomic; enable_atomic="$enableval" -else - enable_atomic="autodetect" -fi - -case "$enable_atomic" in - yes|''|autodetect) - case "$host" in - powerpc-ibm-aix*) - if test "X$GCC" = "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asm(\"ics\"); works" >&5 -$as_echo_n "checking if asm(\"ics\"); works... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - main() { asm("ics"); exit(0); } - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - use_atomic=yes -else - - saved_cflags="$CFLAGS" - CFLAGS="$CFLAGS -Wa,-many" - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross compile, assume yes" >&5 -$as_echo "cross compile, assume yes" >&6; } - CFLAGS="$saved_cflags" - use_atomic=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - main() { asm("ics"); exit(0); } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, required -Wa,-many" >&5 -$as_echo "yes, required -Wa,-many" >&6; } - use_atomic=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use_atomic disabled" >&5 -$as_echo "no, use_atomic disabled" >&6; } - CFLAGS="$saved_cflags" - use_atomic=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - use_atomic=yes - fi - ;; - *) - use_atomic=yes - ;; - esac - ;; - no) - have_stdatomic=no - ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" - use_atomic=no - arch=noatomic - ;; -esac - -if test "X$have_stdatomic" = "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -latomic is needed to use 64-bit stdatomic.h primitives" >&5 -$as_echo_n "checking if -latomic is needed to use 64-bit stdatomic.h primitives... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdatomic.h> -int -main () -{ -atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_ATOMIC_LIBS="" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_ATOMIC_LIBS="-latomic" - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$LIBS $ISC_ATOMIC_LIBS" -fi - - - -ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM" -ISC_PLATFORM_USEGCCASM="#undef ISC_PLATFORM_USEGCCASM" -ISC_PLATFORM_USESTDASM="#undef ISC_PLATFORM_USESTDASM" -ISC_PLATFORM_USEMACASM="#undef ISC_PLATFORM_USEMACASM" -if test "yes" = "$use_atomic"; then - have_atomic=yes # set default - case "$host" in - i[3456]86-*) - # XXX: some old x86 architectures actually do not support - # (some of) these operations. Do we need stricter checks? - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if ${ac_cv_sizeof_void_p+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - - if test $ac_cv_sizeof_void_p = 8; then - arch=x86_64 - have_xaddq=yes - else - arch=x86_32 - fi - ;; - x86_64-*|amd64-*) - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if ${ac_cv_sizeof_void_p+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - - if test $ac_cv_sizeof_void_p = 8; then - arch=x86_64 - have_xaddq=yes - else - arch=x86_32 - fi - ;; - alpha*-*) - arch=alpha - ;; - powerpc-*|powerpc64-*) - arch=powerpc - ;; - mips-*|mipsel-*|mips64-*|mips64el-*) - arch=mips - ;; - ia64-*) - arch=ia64 - ;; - *) - have_atomic=no - arch=noatomic - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking architecture type for atomic operations" >&5 -$as_echo_n "checking architecture type for atomic operations... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $arch" >&5 -$as_echo "$arch" >&6; } -fi - -if test "yes" = "$have_atomic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for inline assembly code" >&5 -$as_echo_n "checking compiler support for inline assembly code... " >&6; } - - compiler=generic - # Check whether the compiler supports the assembly syntax we provide. - if test "X$GCC" = "Xyes"; then - # GCC's ASM extension always works - compiler=gcc - if test $arch = "x86_64"; then - # We can share the same code for gcc with x86_32 - arch=x86_32 - fi - 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. - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for MacOS style assembler syntax" >&5 -$as_echo_n "checking Checking for MacOS style assembler syntax... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - __asm__ volatile ("li r0, 0x0\n"::); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - compiler="mac" - ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - else - case "$host" in - alpha*-dec-osf*) - # Tru64 compiler has its own syntax for inline - # assembly. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __DECC -#error "unexpected compiler" -#endif - return (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - compiler=osf -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; - powerpc-ibm-aix*) - compiler=aix - ;; - esac - fi - case "$compiler" in - gcc) - ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1" - ;; - osf) - ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1" - ;; - aix) - ;; - mac) - ;; - *) - # See if the generic __asm function works. If not, - # we need to disable the atomic operations. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - __asm("nop") - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - compiler="standard" - ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1" -else - compiler="not supported (atomic operations disabled)" - have_atomic=no - arch=noatomic -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext; - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $compiler" >&5 -$as_echo "$compiler" >&6; } -fi - -if test "yes" = "$have_atomic"; 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" - if test "yes" = "$have_xaddq"; then - ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1" - ISC_PLATFORM_HAVEATOMICSTOREQ="#define ISC_PLATFORM_HAVEATOMICSTOREQ 1" - else - ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ" - ISC_PLATFORM_HAVEATOMICSTOREQ="#undef ISC_PLATFORM_HAVEATOMICSTOREQ" - fi -else - ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD" - ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG" - ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE" - ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ" - ISC_PLATFORM_HAVEATOMICSTOREQ="#undef ISC_PLATFORM_HAVEATOMICSTOREQ" -fi - - - - - - - @@ -18734,1186 +11754,6 @@ ISC_ARCH_DIR=$arch # -# Check for __builtin_expect -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for __builtin_expect" >&5 -$as_echo_n "checking compiler support for __builtin_expect... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - return (__builtin_expect(1, 1) ? 1 : 0); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - have_builtin_expect=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - have_builtin_expect=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "yes" = "$have_builtin_expect"; then - -$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h - -fi - -# -# Check for __builtin_clz -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for __builtin_clz" >&5 -$as_echo_n "checking compiler support for __builtin_clz... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - return (__builtin_clz(0xff) == 24 ? 1 : 0); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - have_builtin_clz=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - have_builtin_clz=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "yes" = "$have_builtin_clz"; then - -$as_echo "#define HAVE_BUILTIN_CLZ 1" >>confdefs.h - -fi - -# -# Activate "rrset-order fixed" or not? -# -# Check whether --enable-fixed-rrset was given. -if test "${enable_fixed_rrset+set}" = set; then : - enableval=$enable_fixed_rrset; enable_fixed="$enableval" -else - enable_fixed="no" -fi - -case "$enable_fixed" in - yes) - -$as_echo "#define DNS_RDATASET_FIXED 1" >>confdefs.h - - ;; - no) - ;; - *) - ;; -esac - -# -# Enable response policy rewriting using NS IP addresses -# -# Check whether --enable-rpz-nsip was given. -if test "${enable_rpz_nsip+set}" = set; then : - enableval=$enable_rpz_nsip; enable_nsip="$enableval" -else - enable_nsip="yes" -fi - -case "$enable_nsip" in - yes) - -$as_echo "#define ENABLE_RPZ_NSIP 1" >>confdefs.h - - ;; - no) - ;; - *) - ;; -esac - -# -# Enable response policy rewriting using NS name -# -# Check whether --enable-rpz-nsdname was given. -if test "${enable_rpz_nsdname+set}" = set; then : - enableval=$enable_rpz_nsdname; enable_nsdname="$enableval" -else - enable_nsdname="yes" -fi - -case "$enable_nsdname" in - yes) - -$as_echo "#define ENABLE_RPZ_NSDNAME 1" >>confdefs.h - - ;; - no) - ;; - *) - ;; -esac - -# -# Activate recursive fetch limits -# -# Check whether --enable-fetchlimit was given. -if test "${enable_fetchlimit+set}" = set; then : - enableval=$enable_fetchlimit; enable_fetchlimit="$enableval" -else - enable_fetchlimit="no" -fi - -case "$enable_fetchlimit" in - yes) - -$as_echo "#define ENABLE_FETCHLIMIT 1" >>confdefs.h - - ;; - no) - ;; - *) - ;; -esac - -# -# Activate "filter-aaaa" or not? -# -# Check whether --enable-filter-aaaa was given. -if test "${enable_filter_aaaa+set}" = set; then : - enableval=$enable_filter_aaaa; enable_filter="$enableval" -else - enable_filter="no" -fi - -case "$enable_filter" in - yes) - -$as_echo "#define ALLOW_FILTER_AAAA 1" >>confdefs.h - - ;; - no) - ;; - *) - ;; -esac - -# -# The following sets up how non-blocking i/o is established. -# Sunos, cygwin and solaris 2.x (x<5) require special handling. -# -case "$host" in -*-sunos*) $as_echo "#define PORT_NONBLOCK O_NDELAY" >>confdefs.h -;; -*-cygwin*) $as_echo "#define PORT_NONBLOCK O_NDELAY" >>confdefs.h -;; -*-solaris2.[01234]) - $as_echo "#define PORT_NONBLOCK O_NONBLOCK" >>confdefs.h - - -$as_echo "#define USE_FIONBIO_IOCTL 1" >>confdefs.h - - ;; -*) -$as_echo "#define PORT_NONBLOCK O_NONBLOCK" >>confdefs.h - - ;; -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) - -$as_echo "#define BROKEN_TCP_BIND_BEFORE_CONNECT 1" >>confdefs.h - - ;; -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. -# - -# -# Look for TeX. -# - -for ac_prog in latex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $LATEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LATEX=$ac_cv_path_LATEX -if test -n "$LATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5 -$as_echo "$LATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LATEX" && break -done -test -n "$LATEX" || LATEX="latex" - - - -for ac_prog in pdflatex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PDFLATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PDFLATEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_PDFLATEX="$PDFLATEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PDFLATEX=$ac_cv_path_PDFLATEX -if test -n "$PDFLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 -$as_echo "$PDFLATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PDFLATEX" && break -done -test -n "$PDFLATEX" || PDFLATEX="pdflatex" - - - -for ac_prog in dblatex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DBLATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $DBLATEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_DBLATEX="$DBLATEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_DBLATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -DBLATEX=$ac_cv_path_DBLATEX -if test -n "$DBLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBLATEX" >&5 -$as_echo "$DBLATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DBLATEX" && break -done -test -n "$DBLATEX" || DBLATEX="dblatex" - - - -# -# Look for w3m -# - -for ac_prog in w3m -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_W3M+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $W3M in - [\\/]* | ?:[\\/]*) - ac_cv_path_W3M="$W3M" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_W3M="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -W3M=$ac_cv_path_W3M -if test -n "$W3M"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $W3M" >&5 -$as_echo "$W3M" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$W3M" && break -done -test -n "$W3M" || W3M="w3m" - - - -# -# Look for pandoc -# -# Extract the first word of "pandoc", so it can be a program name with args. -set dummy pandoc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PANDOC+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PANDOC in - [\\/]* | ?:[\\/]*) - ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PANDOC" && ac_cv_path_PANDOC="pandoc" - ;; -esac -fi -PANDOC=$ac_cv_path_PANDOC -if test -n "$PANDOC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 -$as_echo "$PANDOC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -# -# Look for xsltproc (libxslt) -# - -# Extract the first word of "xsltproc", so it can be a program name with args. -set dummy xsltproc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XSLTPROC+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $XSLTPROC in - [\\/]* | ?:[\\/]*) - ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="xsltproc" - ;; -esac -fi -XSLTPROC=$ac_cv_path_XSLTPROC -if test -n "$XSLTPROC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 -$as_echo "$XSLTPROC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# Look for xmllint (libxml2) -# - -# Extract the first word of "xmllint", so it can be a program name with args. -set dummy xmllint; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XMLLINT+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $XMLLINT in - [\\/]* | ?:[\\/]*) - ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT="xmllint" - ;; -esac -fi -XMLLINT=$ac_cv_path_XMLLINT -if test -n "$XMLLINT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 -$as_echo "$XMLLINT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# Look for Doxygen -# - -# Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DOXYGEN+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $DOXYGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="doxygen" - ;; -esac -fi -DOXYGEN=$ac_cv_path_DOXYGEN -if test -n "$DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 -$as_echo "$DOXYGEN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# Look for curl -# - -# Extract the first word of "curl", so it can be a program name with args. -set dummy curl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CURL+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CURL in - [\\/]* | ?:[\\/]*) - ac_cv_path_CURL="$CURL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="curl" - ;; -esac -fi -CURL=$ac_cv_path_CURL -if test -n "$CURL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5 -$as_echo "$CURL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# 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. -# - - - -# -# 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 -# of at the moment). -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Docbook-XSL path" >&5 -$as_echo_n "checking for Docbook-XSL path... " >&6; } - -# Check whether --with-docbook-xsl was given. -if test "${with_docbook_xsl+set}" = set; then : - withval=$with_docbook_xsl; docbook_path="$withval" -else - docbook_path="auto" -fi - -case "$docbook_path" in -auto) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5 -$as_echo "auto" >&6; } - docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook-ns /usr/local/share/xsl/docbook /usr/share/xsl/docbook /opt/local/share/xsl/docbook-xsl /usr/share/xml/docbook/stylesheet/docbook-xsl" - ;; -*) - docbook_xsl_trees="$withval" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docbook_xsl_trees" >&5 -$as_echo "$docbook_xsl_trees" >&6; } - ;; -esac - -# -# Look for stylesheets we need. -# - - -XSLT_DOCBOOK_STYLE_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/docbook.xsl" >&5 -$as_echo_n "checking for html/docbook.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/docbook.xsl - if test -f $f - then - XSLT_DOCBOOK_STYLE_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_STYLE_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_STYLE_HTML=html/docbook.xsl -fi - - - -XSLT_DOCBOOK_STYLE_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/docbook.xsl" >&5 -$as_echo_n "checking for xhtml/docbook.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/docbook.xsl - if test -f $f - then - XSLT_DOCBOOK_STYLE_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_STYLE_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_STYLE_XHTML=xhtml/docbook.xsl -fi - - - -XSLT_DOCBOOK_STYLE_MAN="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for manpages/docbook.xsl" >&5 -$as_echo_n "checking for manpages/docbook.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/manpages/docbook.xsl - if test -f $f - then - XSLT_DOCBOOK_STYLE_MAN=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_STYLE_MAN" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_STYLE_MAN=manpages/docbook.xsl -fi - - - -XSLT_DOCBOOK_CHUNK_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/chunk.xsl" >&5 -$as_echo_n "checking for html/chunk.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/chunk.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNK_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNK_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNK_HTML=html/chunk.xsl -fi - - - -XSLT_DOCBOOK_CHUNK_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/chunk.xsl" >&5 -$as_echo_n "checking for xhtml/chunk.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/chunk.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNK_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNK_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNK_XHTML=xhtml/chunk.xsl -fi - - - -XSLT_DOCBOOK_CHUNKTOC_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/chunktoc.xsl" >&5 -$as_echo_n "checking for html/chunktoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/chunktoc.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNKTOC_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNKTOC_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNKTOC_HTML=html/chunktoc.xsl -fi - - - -XSLT_DOCBOOK_CHUNKTOC_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/chunktoc.xsl" >&5 -$as_echo_n "checking for xhtml/chunktoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/chunktoc.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNKTOC_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNKTOC_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNKTOC_XHTML=xhtml/chunktoc.xsl -fi - - - -XSLT_DOCBOOK_MAKETOC_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/maketoc.xsl" >&5 -$as_echo_n "checking for html/maketoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/maketoc.xsl - if test -f $f - then - XSLT_DOCBOOK_MAKETOC_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_MAKETOC_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_MAKETOC_HTML=html/maketoc.xsl -fi - - - -XSLT_DOCBOOK_MAKETOC_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/maketoc.xsl" >&5 -$as_echo_n "checking for xhtml/maketoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/maketoc.xsl - if test -f $f - then - XSLT_DOCBOOK_MAKETOC_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_MAKETOC_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_MAKETOC_XHTML=xhtml/maketoc.xsl -fi - - - -# -# Same dance for dblatex -# -dblatex_xsl_trees="/usr/local/share/xml/docbook/stylesheet/dblatex /usr/pkg/share/xml/docbook/stylesheet/dblatex /usr/share/xml/docbook/stylesheet/dblatex" - -XSLT_DBLATEX_STYLE="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsl/docbook.xsl" >&5 -$as_echo_n "checking for xsl/docbook.xsl... " >&6; } -for d in $dblatex_xsl_trees -do - f=$d/xsl/docbook.xsl - if test -f $f - then - XSLT_DBLATEX_STYLE=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DBLATEX_STYLE" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DBLATEX_STYLE=xsl/docbook.xsl -fi - - - -XSLT_DBLATEX_FASTBOOK="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsl/latex_book_fast.xsl" >&5 -$as_echo_n "checking for xsl/latex_book_fast.xsl... " >&6; } -for d in $dblatex_xsl_trees -do - f=$d/xsl/latex_book_fast.xsl - if test -f $f - then - XSLT_DBLATEX_FASTBOOK=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DBLATEX_FASTBOOK" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DBLATEX_FASTBOOK=xsl/latex_book_fast.xsl -fi - - - -# -# IDN support -# - -# Check whether --with-idn was given. -if test "${with_idn+set}" = set; then : - withval=$with_idn; use_idn="$withval" -else - use_idn="no" -fi - -case "$use_idn" in -yes) - if test X$prefix = XNONE ; then - idn_path=/usr/local - else - idn_path=$prefix - fi - ;; -no) - ;; -*) - idn_path="$use_idn" - ;; -esac - -iconvinc= -iconvlib= - -# Check whether --with-libiconv was given. -if test "${with_libiconv+set}" = set; then : - withval=$with_libiconv; use_libiconv="$withval" -else - use_libiconv="no" -fi - -case "$use_libiconv" in -yes) - if test X$prefix = XNONE ; then - iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" - else - iconvlib="-L$prefix/lib -R$prefix/lib -liconv" - fi - ;; -no) - iconvlib= - ;; -*) - iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" - ;; -esac - - -# Check whether --with-iconv was given. -if test "${with_iconv+set}" = set; then : - withval=$with_iconv; iconvlib="$withval" -fi - -case "$iconvlib" in -no) - iconvlib= - ;; -yes) - iconvlib=-liconv - ;; -esac - - -# Check whether --with-idnlib was given. -if test "${with_idnlib+set}" = set; then : - withval=$with_idnlib; idnlib="$withval" -else - idnlib="no" -fi - -if test "yes" = "$idnlib"; then - as_fn_error $? "You must specify ARG for --with-idnlib." "$LINENO" 5 -fi - -IDNLIBS= -if test "no" != "$use_idn"; then - -$as_echo "#define WITH_IDN 1" >>confdefs.h - - STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" - if test "no" != "$idnlib"; then - IDNLIBS="$idnlib $iconvlib" - else - IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" - fi -fi - - -# -# Check whether to build Automated Test Framework unit tests -# - -# Check whether --with-atf was given. -if test "${with_atf+set}" = set; then : - withval=$with_atf; atf="$withval" -else - atf="no" -fi - -if test "yes" = "$atf"; then - atf=`pwd`/unit/atf - ATFBUILD=atf-src - - ac_config_commands="$ac_config_commands atf-config" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: building ATF from bind9/unit/atf-src" >&5 -$as_echo "building ATF from bind9/unit/atf-src" >&6; } -fi - -ATFLIBS= -if test "no" != "$atf"; then - -$as_echo "#define ATF_TEST 1" >>confdefs.h - - STD_CINCLUDES="$STD_CINCLUDES -I$atf/include" - ATFBIN="$atf/bin" - ATFLIBS="-L$atf/lib -latf-c" - UNITTESTS=tests -fi - - - - -for ac_header in locale.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALE_H 1 -_ACEOF - -fi - -done - -for ac_func in setlocale -do : - ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SETLOCALE 1 -_ACEOF - -fi -done - - -# -# was --with-tuning specified? -# - -# Check whether --with-tuning was given. -if test "${with_tuning+set}" = set; then : - withval=$with_tuning; use_tuning="$withval" -else - use_tuning="no" -fi - - -case "$use_tuning" in - large) - as_fn_error $? "Large-system tuning requires threads." "$LINENO" 5 - -$as_echo "#define TUNE_LARGE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using large-system tuning" >&5 -$as_echo "using large-system tuning" >&6; } - ;; - no|default) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default tuning" >&5 -$as_echo "using default tuning" >&6; } - ;; - yes|*) - as_fn_error $? "You must specify \"large\" or \"default\" for --with-tuning." "$LINENO" 5 - ;; -esac - -# -# was --enable-querytrace specified? -# -# Check whether --enable-querytrace was given. -if test "${enable_querytrace+set}" = set; then : - enableval=$enable_querytrace; want_querytrace="$enableval" -else - want_querytrace="no" -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable query trace logging" >&5 -$as_echo_n "checking whether to enable query trace logging... " >&6; } -case "$want_querytrace" in -yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define WANT_QUERYTRACE 1" >>confdefs.h - - ;; -no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -*) - as_fn_error $? "\"--enable-querytrace requires yes or no\"" "$LINENO" 5 - ;; -esac - -# # Substitutions # @@ -19992,218 +11832,6 @@ LIBDNS_MAPAPI="$srcdir/lib/dns/mapapi" LIBLWRES_API="$srcdir/lib/lwres/api" -# -# Configure any DLZ drivers. -# -# If config.dlz.in selects one or more DLZ drivers, it will set -# CONTRIB_DLZ to a non-empty value, which will be our clue to -# build DLZ drivers in contrib. -# -# This section has to come after the libtool stuff because it needs to -# know how to name the driver object files. -# - -CONTRIB_DLZ="" -DLZ_DRIVER_INCLUDES="" -DLZ_DRIVER_LIBS="" -DLZ_DRIVER_SRCS="" -DLZ_DRIVER_OBJS="" -DLZ_SYSTEM_TEST="" - -# -# Configure support for building a shared library object -# -# Even when libtool is available it can't always be relied upon -# to build an object that can be dlopen()'ed, but this is necessary -# for building the dlzexternal system test, so we'll try it the -# old-fashioned way. -# -SO="so" -SO_CFLAGS="" -SO_LDFLAGS="" -SO_LD="" -SO_TARGETS="" - - -# Check whether --with-dlopen was given. -if test "${with_dlopen+set}" = set; then : - withval=$with_dlopen; dlopen="$withval" -else - dlopen="yes" -fi - - -case $host in - *-sunos*) dlopen="no" - ;; -esac - -if test "yes" = "$dlopen"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - have_dl=yes -else - have_dl=no -fi - - if test "yes" = "$have_dl"; then - LIBS="-ldl $LIBS" - fi - for ac_func in dlopen dlclose dlsym -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - dlopen=no -fi -done - -fi - -if test "yes" = "$dlopen"; then - case $host in - *-linux*|*-gnu*) - SO_CFLAGS="-fPIC" - SO_LDFLAGS="" - if test "yes" = "$have_dl" - then - if test "yes" = "$use_libtool"; then - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - else - SO_LDFLAGS="-shared" - SO_LD="${CC}" - fi - else - SO_LDFLAGS="-shared" - SO_LD="ld" - fi - ;; - *-freebsd*|*-openbsd*) - SO_CFLAGS="-fpic" - if test "yes" = "$use_libtool"; then - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - else - SO_LDFLAGS="-shared" - SO_LD="${CC}" - fi - ;; - *-netbsd*) - SO_CFLAGS="-fpic" - SO_LDFLAGS="-Bshareable -x" - SO_LD="ld" - ;; - *-solaris*) - SO_CFLAGS="-KPIC" - SO_LDFLAGS="-G -z text" - SO_LD="ld" - ;; - *-hp-hpux*) - SO=sl - SO_CFLAGS="+z" - SO_LDFLAGS="-b +vnocompatwarnings" - SO_LD="ld" - ;; - *) - SO_CFLAGS="-fPIC" - ;; - esac - - if test "X$GCC" = "Xyes"; then - SO_CFLAGS="-fPIC" - if test -z "$SO_LD" - then - if test "yes" = "$use_libtool"; then - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - else - SO_LDFLAGS="-shared" - SO_LD="${CC}" - fi - fi - fi - - # If we still don't know how to make shared objects, don't make any. - if test -n "$SO_LD"; then - SO_TARGETS="\${SO_TARGETS}" - -$as_echo "#define ISC_DLZ_DLOPEN 1" >>confdefs.h - - fi -fi - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking contributed DLZ drivers" >&5 -$as_echo_n "checking contributed DLZ drivers... " >&6; } - -if test -n "$CONTRIB_DLZ" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DLZ_DRIVER_RULES=contrib/dlz/drivers/rules - ac_config_files="$ac_config_files $DLZ_DRIVER_RULES" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - DLZ_DRIVER_RULES=/dev/null -fi - - - - - - - - - if test "yes" = "$cross_compiling"; then if test -z "$BUILD_CC"; then as_fn_error $? "BUILD_CC not set" "$LINENO" 5 @@ -20501,7 +12129,6 @@ LTLIBOBJS=$ac_ltlibobjs - : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files @@ -21340,7 +12967,6 @@ fi -atfdir=`pwd`/unit/atf _ACEOF @@ -21353,8 +12979,6 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "make/rules") CONFIG_FILES="$CONFIG_FILES make/rules" ;; "make/includes") CONFIG_FILES="$CONFIG_FILES make/includes" ;; - "atf-config") CONFIG_COMMANDS="$CONFIG_COMMANDS atf-config" ;; - "$DLZ_DRIVER_RULES") CONFIG_FILES="$CONFIG_FILES $DLZ_DRIVER_RULES" ;; "make/Makefile") CONFIG_FILES="$CONFIG_FILES make/Makefile" ;; "make/mkdep") CONFIG_FILES="$CONFIG_FILES make/mkdep" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -22470,15 +14094,6 @@ fi chmod +x "$ofile" ;; - "atf-config":C) ( - mkdir -p unit/atf-src; - cd unit/atf-src; - case "$srcdir" in - /*) ;; - *) srcdir="../../$srcdir";; - esac - ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" --enable-tools --disable-shared MISSING=: --prefix $atfdir; - ) || as_fn_error $? "Failed to configure ATF." "$LINENO" 5 ;; esac done # for ac_tag diff --git a/usr.sbin/bind/configure.in b/usr.sbin/bind/configure.in index 4b814230933..2be89183633 100644 --- a/usr.sbin/bind/configure.in +++ b/usr.sbin/bind/configure.in @@ -105,69 +105,6 @@ esac AC_SUBST(XTARGETS) #libseccomp sandboxing -AC_CHECK_FUNCS(getrandom) -AC_ARG_ENABLE(seccomp, - AS_HELP_STRING([--enable-seccomp], - [enable support for libseccomp system call - filtering [default=no]])) -case "$enable_seccomp" in - yes) - case $host_os in - linux*) - ;; - *) - AC_MSG_WARN([seccomp is not supported on non-linux platforms; disabling it]) - enable_seccomp=no - ;; - esac - AC_SEARCH_LIBS(seccomp_init, [seccomp]) - if test "X$ac_cv_search_seccomp_init" = "X-lseccomp" ; then - AC_TRY_RUN([ - #include <stdio.h> - #include <stdlib.h> - #include <errno.h> - #include <sys/prctl.h> - #include <linux/seccomp.h> - - int main(void) - { - int ret; - - ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0); - if (ret < 0) { - switch (errno) { - case ENOSYS: - return 1; - case EINVAL: - return 1; - default: - return 1; - } - } - ret = - prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0); - if (ret < 0) { - switch (errno) { - case EINVAL: - return 1; - case EFAULT: - return 0; - default: - return 1; - } - } - return 1; - } - ] - , AC_DEFINE([HAVE_LIBSECCOMP], 1, - [Define to use libseccomp system call filtering.]) - , [] - ) - fi - ;; - *) - ;; -esac # # Make very sure that these are the first files processed by @@ -196,153 +133,6 @@ which ar resides, or set AR in the environment with the full path to ar. ;; esac -# -# Etags. -# -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 - AC_MSG_RESULT(yes) - ETAGS="$ETAGS -L" - else - AC_MSG_RESULT(no) - fi -fi -AC_SUBST(ETAGS) - -# -# 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) -AC_SUBST(PERL) - -# -# Python is also optional; it is used by the tools in bin/python. -# If python is unavailable, we simply don't build those. -# -AC_ARG_WITH(python, - AS_HELP_STRING([--with-python=PATH], - [specify path to python interpreter]), - use_python="$withval", use_python="unspec") -AC_ARG_WITH(python-install-dir, - AS_HELP_STRING([--with-python-install-dir=PATH], - [installation directory for Python modules]), - use_python_install_dir="$withval", use_python_install_dir="unspec") - -python="python python3 python3.5 python3.4 python3.3 python3.2 python2 python2.7" - -testargparse='try: import argparse -except: exit(1)' - -testminvers='import sys -if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): - exit(1)' - -case "$use_python" in - no) - AC_MSG_CHECKING([for python support]) - AC_MSG_RESULT(disabled) - ;; - unspec|yes|*) - case "$use_python" in - unspec|yes|'') - for p in $python - do - AC_PATH_PROGS(PYTHON, $p) - if test "X$PYTHON" = "X"; then - continue; - fi - AC_MSG_CHECKING([python2 version >= 2.7 or python3 version >= 3.2]) - if ${PYTHON:-false} -c "$testminvers"; then - AC_MSG_RESULT([found]) - else - AC_MSG_RESULT([not found]) - unset ac_cv_path_PYTHON - unset PYTHON - continue - fi - AC_MSG_CHECKING([python module 'argparse']) - if ${PYTHON:-false} -c "$testargparse"; then - AC_MSG_RESULT([found]) - break - else - AC_MSG_RESULT([not found]) - unset ac_cv_path_PYTHON - unset PYTHON - continue - fi - done - if test "X$PYTHON" != "X" - then - case "$use_python_install_dir" in - unspec) - PYTHON_INSTALL_DIR="" - PYTHON_INSTALL_LIB="" - ;; - *) - PYTHON_INSTALL_DIR="$use_python_install_dir" - PYTHON_INSTALL_LIB="--install-lib=$use_python_install_dir" - ;; - esac - else - AC_MSG_CHECKING([for python support]) - case "$use_python" in - unspec) - AC_MSG_RESULT(disabled) - ;; - yes) - AC_MSG_ERROR([missing python]) - ;; - esac - fi - ;; - *) - case "$use_python" in - /*) - PYTHON="$use_python" - ;; - *) - AC_PATH_PROGS(PYTHON, $use_python) - ;; - esac - AC_MSG_CHECKING([python2 version >= 2.7 or python3 version >= 3.2]) - if ${PYTHON:-false} -c "$testminvers"; then - AC_MSG_RESULT([found]) - else - AC_MSG_ERROR([not found]) - fi - AC_MSG_CHECKING([python module 'argparse']) - if ${PYTHON:-false} -c "$testargparse"; then - AC_MSG_RESULT([found, using $PYTHON]) - else - AC_MSG_ERROR([not found]) - fi - ;; - esac - ;; -esac - -PYTHON_TOOLS='' -CHECKDS='' -COVERAGE='' -if test "X$PYTHON" != "X"; then - PYTHON_TOOLS=python - CHECKDS=checkds - COVERAGE=coverage -fi -AC_SUBST(CHECKDS) -AC_SUBST(COVERAGE) -AC_SUBST(PYTHON_TOOLS) -AC_SUBST(PYTHON_INSTALL_DIR) -AC_SUBST(PYTHON_INSTALL_LIB) # # Special processing of paths depending on whether --prefix, @@ -456,662 +246,12 @@ 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 available 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__" - ;; - # 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. - *-linux* | *-kfreebsd*-gnu*) - STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE" - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - ;; - # - # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use. - # Setting this is sufficient to select the correct behavior for BIND 9. - # - *-darwin*) - STD_CDEFINES="$STD_CDEFINES -D__APPLE_USE_RFC_3542" - CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542" - ;; -esac - -# # CCNOOPT defaults to -O0 on gcc and disables optimization when is last # if test "X$CCNOOPT" = "X" -a "X$GCC" = "Xyes"; then CCNOOPT="-O0" fi -AC_HEADER_STDC - -AC_CHECK_HEADERS(fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h sys/socket.h net/route.h linux/netlink.h linux/rtnetlink.h,,, -[$ac_includes_default -#ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif -]) - -AC_C_CONST -AC_C_INLINE -AC_C_VOLATILE -AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME)) -AC_C_FLEXIBLE_ARRAY_MEMBER - -# -# Check for the existence of mmap to enable the fast format zones -# -AC_CHECK_FUNCS(mmap) - -# -# Older versions of HP/UX don't define seteuid() and setegid() -# -AC_CHECK_FUNCS(seteuid setresuid) -AC_CHECK_FUNCS(setegid setresgid) - -# BSDI doesn't have ftello fseeko -AC_CHECK_FUNCS(ftello fseeko) - -# -# 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) -AC_TRY_COMPILE([ - static inline int foo1() { - return 0; - } - - static inline int foo2() { - return foo1(); - } - ], [foo1();], - [AC_MSG_RESULT(no)], - [AC_MSG_RESULT(yes) - AC_DEFINE(inline, ,[Define to empty if your compiler does not support "static inline".])]) - -AC_TYPE_SIZE_T -AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_TYPE(uintptr_t,unsigned long) -AC_CHECK_TYPE(socklen_t, -[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)], -[ -AC_TRY_COMPILE( -[ -#include <sys/types.h> -#include <sys/socket.h> -int getsockname(int, struct sockaddr *, size_t *); -],[], -[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)], -[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)]) -], -[ -#include <sys/types.h> -#include <sys/socket.h> -]) -AC_SUBST(ISC_SOCKADDR_LEN_T) -AC_HEADER_TIME -AC_MSG_CHECKING(for long long) -AC_TRY_COMPILE([],[long long i = 0; return (0);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"]) -AC_SUBST(ISC_PLATFORM_HAVELONGLONG) - -# -# check for uname library routine -# -AC_MSG_CHECKING(for uname) -AC_TRY_COMPILE([ -#include <sys/utsname.h> -#include <stdio.h> -], -[ -struct utsname uts; -uname(&uts); -printf("running on %s %s %s for %s\n", - uts.sysname, uts.release, uts.version, uts.machine); -], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_UNAME)], - [AC_MSG_RESULT(no) - AC_MSG_WARN([uname is not correctly supported])]) - -# -# check for GCC noreturn attribute -# -AC_MSG_CHECKING(for GCC noreturn attribute) -AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE" - ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"], - [AC_MSG_RESULT(no) - 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) -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 have kqueue -# -AC_ARG_ENABLE(kqueue, - AS_HELP_STRING([--enable-kqueue], - [use BSD kqueue when available [default=yes]]), - want_kqueue="$enableval", want_kqueue="yes") -case $want_kqueue in -yes) - AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no) - case $ac_cv_have_kqueue in - yes) - ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1" - ;; - *) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; - esac - ;; -*) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; -esac -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. -# -AC_ARG_ENABLE(epoll, - AS_HELP_STRING([--enable-epoll], - [use Linux epoll when available [default=auto]]), - want_epoll="$enableval", want_epoll="auto") -case $want_epoll in -auto) - AC_MSG_CHECKING(epoll support) - AC_TRY_RUN([ -#include <sys/epoll.h> -int main() { - if (epoll_create(1) < 0) - return (1); - return (0); -} -], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"]) - ;; -yes) - ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1" - ;; -*) - ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL" - ;; -esac -AC_SUBST(ISC_PLATFORM_HAVEEPOLL) - -# -# check if we support /dev/poll -# -AC_ARG_ENABLE(devpoll, - AS_HELP_STRING([--enable-devpoll], - [use /dev/poll when available [default=yes]]), - want_devpoll="$enableval", want_devpoll="yes") -case $want_devpoll in -yes) - AC_CHECK_HEADERS(sys/devpoll.h devpoll.h, - ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1" - , - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" - ) - ;; -*) - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" - ;; -esac -AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL) - -# -# check if we need to #include sys/select.h explicitly -# -case $ac_cv_header_unistd_h in -yes) -AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set) -AC_TRY_COMPILE([ -#include <sys/types.h> /* Ultrix */ -#include <unistd.h>], -[fd_set read_set; return (0);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"], - [AC_MSG_RESULT(no) - case $ac_cv_header_sys_select_h in - yes) - ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" - ;; - no) - AC_MSG_ERROR([need either working unistd.h or sys/select.h]) - ;; - esac - ]) - ;; -no) - case $ac_cv_header_sys_select_h in - yes) - ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" - ;; - no) - AC_MSG_ERROR([need either unistd.h or sys/select.h]) - ;; - esac - ;; -esac -AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH) - -# -# Find the machine's endian flavor. -# -AC_C_BIGENDIAN - -AC_MSG_CHECKING(for GSSAPI library) -AC_ARG_WITH(gssapi, - AS_HELP_STRING([--with-gssapi=[PATH|[/path/]krb5-config]], - [Specify path for system-supplied GSSAPI - [default=yes]]), - use_gssapi="$withval", use_gssapi="yes") - -# first try using krb5-config, if that does not work then fall back to "yes" method. - -case "$use_gssapi" in -*/krb5-config|krb5-config) - AC_MSG_RESULT(trying $use_gssapi) - if test krb5-config = "$use_gssapi" - then - AC_PATH_PROG(KRB5_CONFIG, $use_gssapi) - else - KRB5_CONFIG="$use_gssapi" - fi - gssapi_cflags=`$KRB5_CONFIG --cflags gssapi` - gssapi_libs=`$KRB5_CONFIG --libs gssapi` - saved_cppflags="$CPPFLAGS" - CPPFLAGS="$gssapi_cflags $CPPFLAGS" - AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h, - [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"]) - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - AC_MSG_RESULT([krb5-config: gssapi.h not found]) - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - AC_CHECK_HEADERS(krb5/krb5.h krb5.h, - [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"]) - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - AC_MSG_RESULT([krb5-config: krb5.h not found]) - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - CPPFLAGS="$saved_cppflags" - saved_libs="$LIBS" - LIBS=$gssapi_libs - AC_MSG_CHECKING([krb5-config linking as $LIBS]) - AC_TRY_LINK( , [gss_acquire_cred();krb5_init_context()], - gssapi_linked=yes, gssapi_linked=no) - case $gssapi_linked in - yes) AC_MSG_RESULT([krb5-config: linked]);; - no) AC_MSG_RESULT([krb5-config: could not determine proper GSSAPI linkage]) - use_gssapi="yes" - ;; - esac - LIBS=$saved_libs - fi - fi - if test "yes" = "$use_gssapi"; then - AC_MSG_CHECKING([for GSSAPI library, non krb5-config method]) - fi - ;; -esac - -case "$host" in -*darwin*) - if test "yes" = "$use_gssapi" - then - use_gssapi=framework - fi - ;; -esac - -# gssapi is just the framework, we really require kerberos v5, so -# look for those headers (the gssapi headers must be there, too) -# The problem with this implementation is that it doesn't allow -# for the specification of gssapi and krb5 headers in different locations, -# which probably ought to be fixed although fixing might raise the issue of -# trying to build with incompatible versions of gssapi and krb5. -if test "yes" = "$use_gssapi" -then - # first, deal with the obvious - if test \( -f /usr/include/kerberosv5/krb5.h -o \ - -f /usr/include/krb5/krb5.h -o \ - -f /usr/include/krb5.h \) -a \ - \( -f /usr/include/gssapi.h -o \ - -f /usr/include/gssapi/gssapi.h \) - then - use_gssapi=/usr - else - krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr" - for d in $krb5dirs - do - if test -f $d/include/gssapi/gssapi_krb5.h -o \ - -f $d/include/krb5.h - then - if test -f $d/include/gssapi/gssapi.h -o \ - -f $d/include/gssapi.h - then - use_gssapi=$d - break - fi - fi - use_gssapi="no" - done - fi -fi - -case "$use_gssapi" in - no) - AC_MSG_RESULT(disabled) - USE_GSSAPI='' - ;; - yes) - AC_MSG_ERROR([--with-gssapi must specify a path]) - ;; - */krb5-config|krb5-config) - USE_GSSAPI='-DGSSAPI' - DST_GSSAPI_INC="$gssapi_cflags" - DNS_GSSAPI_LIBS="$gssapi_libs" - ;; - framework) - USE_GSSAPI='-DGSSAPI' - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <Kerberos/Kerberos.h>" - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <Kerberos/Kerberos.h>" - DNS_GSSAPI_LIBS="-framework Kerberos" - AC_MSG_RESULT(framework) - ;; - - *) - AC_MSG_RESULT(looking in $use_gssapi/lib) - USE_GSSAPI='-DGSSAPI' - saved_cppflags="$CPPFLAGS" - CPPFLAGS="-I$use_gssapi/include $CPPFLAGS" - AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h, - [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>" - gssapi_hack="#include <$ac_header>"]) - - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - AC_MSG_ERROR([gssapi.h not found]) - fi - - AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h, - [ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>" - gssapi_krb5_hack="#include <$ac_header>"]) - - AC_CHECK_HEADERS(krb5.h krb5/krb5.h kerberosv5/krb5.h, - [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>" - krb5_hack="#include <$ac_header>"]) - - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - AC_MSG_ERROR([krb5.h not found]) - fi - - # - # 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. - saved_libs="$LIBS" - for TRY_LIBS in \ - "-lgssapi_krb5" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \ - "-lgssapi" \ - "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgss -lkrb5" - do - # Note that this does not include $saved_libs, because - # on FreeBSD machines this configure script has added - # -L/usr/local/lib to LIBS, which can make the - # -lgssapi_krb5 test succeed with shared libraries even - # when you are trying to build with KTH in /usr/lib. - if test "/usr" = "$use_gssapi" - then - LIBS="$TRY_LIBS" - else - LIBS="-L$use_gssapi/lib $TRY_LIBS" - fi - AC_MSG_CHECKING(linking as $TRY_LIBS) - AC_TRY_LINK([ -#include <sys/types.h> -$gssapi_hack -$gssapi_krb5_hack -$krb5_hack - ] , [gss_acquire_cred(NULL, NULL, 0, NULL, 0, NULL, NULL, NULL);krb5_init_context(NULL); -#if defined(HAVE_GSSAPI_KRB5_H) || defined(HAVE_GSSAPI_GSSAPI_KRB5_H) -gsskrb5_register_acceptor_identity(NULL); -#endif], - gssapi_linked=yes, gssapi_linked=no) - case $gssapi_linked in - yes) AC_MSG_RESULT(yes); break ;; - no) AC_MSG_RESULT(no) ;; - esac - done - - CPPFLAGS="$saved_cppflags" - - case $gssapi_linked in - no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;; - esac - - # - # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib - # but MIT in /usr/local/lib and trying to build with KTH. - # /usr/local/lib can end up earlier on the link lines. - # 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 - # needs to be done. - # - if test "/usr" = "$use_gssapi" -a \ - -f /usr/local/lib/libkrb5.a; then - FIX_KTH_VS_MIT=yes - fi - - case "$FIX_KTH_VS_MIT" in - yes) - case "$enable_static_linking" in - yes) gssapi_lib_suffix=".a" ;; - *) gssapi_lib_suffix=".so" ;; - esac - - for lib in $LIBS; do - case $lib in - -L*) - ;; - -l*) - new_lib=`echo $lib | - sed -e s%^-l%$use_gssapi/lib/lib% \ - -e s%$%$gssapi_lib_suffix%` - NEW_LIBS="$NEW_LIBS $new_lib" - ;; - *) - AC_MSG_ERROR([KTH vs MIT Kerberos confusion!]) - ;; - esac - done - LIBS="$NEW_LIBS" - ;; - esac - - DST_GSSAPI_INC="-I$use_gssapi/include" - DNS_GSSAPI_LIBS="$LIBS" - - AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include) - LIBS="$saved_libs" - ;; -esac - -AC_SUBST(ISC_PLATFORM_HAVEGSSAPI) -AC_SUBST(ISC_PLATFORM_GSSAPIHEADER) -AC_SUBST(ISC_PLATFORM_GSSAPI_KRB5_HEADER) -AC_SUBST(ISC_PLATFORM_KRB5HEADER) - -AC_SUBST(USE_GSSAPI) -AC_SUBST(DST_GSSAPI_INC) -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) -AC_ARG_WITH(randomdev, - AS_HELP_STRING([--with-randomdev=PATH], - [Specify path for random device]), - use_randomdev="$withval", use_randomdev="unspec") - -case "$use_randomdev" in - unspec) - case "$cross_compiling" in - yes) - AC_MSG_RESULT(unspecified) - AC_MSG_ERROR([ need --with-randomdev=PATH or --with-randomdev=no]) - esac - case "$host" in - *-openbsd*) - devrandom=/dev/arandom - ;; - *) - devrandom=/dev/random - ;; - esac - AC_MSG_RESULT($devrandom) - AC_CHECK_FILE($devrandom, - AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, - "$devrandom"),) - - ;; - yes) - AC_MSG_ERROR([--with-randomdev must specify a path]) - ;; - no) - AC_MSG_RESULT(disabled) - ;; - *) - AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev") - AC_MSG_RESULT(using "$use_randomdev") - ;; -esac - -# -# Only check dsa signature generation on these platforms when performing -# system tests. -# -CHECK_DSA=0 -if grep "#define PATH_RANDOMDEV " confdefs.h > /dev/null -then - case "$host" in - *darwin*|*freebsd*) - CHECK_DSA=1 - ;; - esac -fi -AC_SUBST(CHECK_DSA) - -# -# Do we have arc4random(), etc ? -# Will use stir and if not exist addrandom -# -AC_CHECK_FUNCS(arc4random) -AC_CHECK_FUNCS(arc4random_stir) -AC_CHECK_FUNCS(arc4random_addrandom) - -ALWAYS_DEFINES="" -AC_SUBST(ALWAYS_DEFINES) - AC_MSG_CHECKING(for libtool) AC_ARG_WITH(libtool, AS_HELP_STRING([--with-libtool], [use GNU libtool]), use_libtool="$withval", use_libtool="no") @@ -1155,1141 +295,6 @@ esac AC_SUBST(INSTALL_LIBRARY) # -# was --enable-native-pkcs11 specified? -# (note it implies both --without-openssl and --with-pkcs11) -# -AC_ARG_ENABLE(native-pkcs11, - AS_HELP_STRING([--enable-native-pkcs11], - [use native PKCS11 for all crypto [default=no]]), - want_native_pkcs11="$enableval", want_native_pkcs11="no") - -# -# was --with-openssl specified? -# -AC_ARG_WITH(openssl, - AS_HELP_STRING([--with-openssl[=PATH]], - [Build with OpenSSL [yes|no|path]. - (Crypto is required for DNSSEC)]), - use_openssl="$withval", use_openssl="auto") - -# -# was --with-pkcs11 specified? -# -AC_ARG_WITH(pkcs11, - AS_HELP_STRING([--with-pkcs11[=PATH]], - [Build with PKCS11 support [yes|no|path] - (PATH is for the PKCS11 provider)]), - use_pkcs11="$withval", use_pkcs11="auto") - -# -# were --with-ecdsa, --with-gost, --with-eddsa, --with-aes specified -# -AC_ARG_WITH(ecdsa, AS_HELP_STRING([--with-ecdsa], [Crypto ECDSA]), - with_ecdsa="$withval", with_ecdsa="auto") -AC_ARG_WITH(gost, - AS_HELP_STRING([--with-gost], [Crypto GOST [yes|no|raw|asn1].]), - with_gost="$withval", with_gost="auto") -AC_ARG_WITH(eddsa, AS_HELP_STRING([--with-eddsa], [Crypto EDDSA [yes|all|no].]), - with_eddsa="$withval", with_eddsa="auto") -AC_ARG_WITH(aes, AS_HELP_STRING([--with-aes], [Crypto AES]), - with_aes="$withval", with_aes="checksit") - -# -# was --enable-openssl-hash specified? -# -AC_ARG_ENABLE(openssl-hash, - AS_HELP_STRING([--enable-openssl-hash], - [use OpenSSL for hash functions [default=no]]), - want_openssl_hash="$enableval", want_openssl_hash="checksit") - -# -# Enable Source Identity Token support -# -AC_MSG_CHECKING(for Source Identity Token support) -AC_ARG_ENABLE(sit, - AS_HELP_STRING([--enable-sit], - [enable source identity token [default=no]]), - enable_sit="$enableval", enable_sit="no") -HAVE_SIT= -ISC_PLATFORM_USESIT="#undef ISC_PLATFORM_USESIT" - -case "$enable_sit" in -yes) - AC_MSG_RESULT(yes) - ISC_PLATFORM_USESIT="#define ISC_PLATFORM_USESIT 1" - HAVE_SIT=1 - ;; -no) - AC_MSG_RESULT(no) - ;; -*) - AC_MSG_ERROR("enable-sit requires yes or no") - ;; -esac -AC_SUBST(ISC_PLATFORM_USESIT) -AC_SUBST(HAVE_SIT) - -# -# Source Identity Token algorithm choice -# -AC_ARG_WITH(sit-alg, - AS_HELP_STRING([--with-sit-alg=ALG], - [choose the algorithm for SIT [aes|sha1|sha256]]), - with_sit_alg="$withval", with_sit_alg="auto") - -if test "yes" = "$enable_sit" -then - case $with_sit_alg in - *1) - with_sit_alg="sha1" - ;; - *2*) - with_sit_alg="sha256" - ;; - auto) - if test "no" != "$with_aes" - then - with_aes="yes" - fi - ;; - *) - with_sit_alg="aes" - if test "no" != "$with_aes" - then - with_aes="yes" - fi - ;; - esac -fi -if test "checksit" = "$with_aes" -then - with_aes="no" -fi - -AC_MSG_CHECKING(for OpenSSL library) -OPENSSL_WARNING= -openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw" -if test "yes" = "$want_native_pkcs11" -then - use_openssl="native_pkcs11" - AC_MSG_RESULT(use of native PKCS11 instead) -fi - -if test "auto" = "$use_openssl" -then - for d in $openssldirs - do - if test -f $d/include/openssl/opensslv.h - then - use_openssl=$d - break - fi - done -fi -OPENSSL_ECDSA="" -OPENSSL_GOST="" -OPENSSL_ED25519="" -gosttype="raw" -case "$with_gost" in - raw) - with_gost="yes" - ;; - asn1) - AC_DEFINE(PREFER_GOSTASN1, 1, - [Define if GOST private keys are encoded in ASN.1.]) - gosttype="asn1" - with_gost="yes" - ;; - auto|yes|no) - ;; - *) - AC_MSG_ERROR(unknown GOST private key encoding) - ;; -esac - -case "$use_openssl" in - native_pkcs11) - AC_MSG_RESULT(disabled because of native PKCS11) - DST_OPENSSL_INC="" - CRYPTO="-DPKCS11CRYPTO" - OPENSSLECDSALINKOBJS="" - OPENSSLECDSALINKSRCS="" - OPENSSLEDDSALINKOBJS="" - OPENSSLEDDSALINKSRCS="" - OPENSSLGOSTLINKOBJS="" - OPENSSLGOSTLINKSRCS="" - OPENSSLLINKOBJS="" - OPENSSLLINKSRCS="" - ;; - no) - AC_MSG_RESULT(no) - DST_OPENSSL_INC="" - CRYPTO="" - OPENSSLECDSALINKOBJS="" - OPENSSLECDSALINKSRCS="" - OPENSSLEDDSALINKOBJS="" - OPENSSLEDDSALINKSRCS="" - OPENSSLGOSTLINKOBJS="" - OPENSSLGOSTLINKSRCS="" - OPENSSLLINKOBJS="" - OPENSSLLINKSRCS="" - ;; - auto) - DST_OPENSSL_INC="" - CRYPTO="" - OPENSSLECDSALINKOBJS="" - OPENSSLECDSALINKSRCS="" - OPENSSLEDDSALINKOBJS="" - OPENSSLEDDSALINKSRCS="" - OPENSSLGOSTLINKOBJS="" - OPENSSLGOSTLINKSRCS="" - OPENSSLLINKOBJS="" - OPENSSLLINKSRCS="" - AC_MSG_ERROR( -[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path -If you don't want OpenSSL, use --without-openssl]) - ;; - *) - if test "yes" = "$want_native_pkcs11" - then - AC_MSG_RESULT() - AC_MSG_ERROR([OpenSSL and native PKCS11 cannot be used together.]) - fi - if test "yes" = "$use_openssl" - then - # User did not specify a path - guess it - for d in $openssldirs - do - if test -f $d/include/openssl/opensslv.h - then - use_openssl=$d - break - fi - done - if test "yes" = "$use_openssl" - then - AC_MSG_RESULT(not found) - AC_MSG_ERROR( -[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path]) - fi - elif ! test -f "$use_openssl"/include/openssl/opensslv.h - then - AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found]) - fi - CRYPTO='-DOPENSSL' - if test "/usr" = "$use_openssl" - then - DST_OPENSSL_INC="" - DST_OPENSSL_LIBS="-lcrypto" - else - DST_OPENSSL_INC="-I$use_openssl/include" - case $host in - *-solaris*) - DST_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto" - ;; - *-hp-hpux*) - DST_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto" - ;; - *-apple-darwin*) - # - # 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. - # - if test -f "$use_openssl/lib/libcrypto.dylib" - then - DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" - else - DST_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a" - fi - ;; - *) - DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" - ;; - esac - fi - AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include) - - saved_cc="$CC" - saved_cflags="$CFLAGS" - saved_libs="$LIBS" - CFLAGS="$DST_OPENSSL_INC $CFLAGS" - LIBS="$DST_OPENSSL_LIBS $LIBS" - AC_MSG_CHECKING(whether linking with OpenSSL works) - AC_TRY_RUN([ -#include <openssl/err.h> -int main() { - ERR_clear_error(); - return (0); -} -], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - AC_MSG_ERROR(Could not run test program using OpenSSL from -$use_openssl/lib and $use_openssl/include. -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) - AC_TRY_LINK([ -#include <openssl/opensslv.h> -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -#include <openssl/crypto.h> -#else -#include <openssl/err.h> -#include <openssl/dso.h> -#endif -], -[ -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL); -#else -DSO_METHOD_dlfcn(); -#endif -], - [AC_MSG_RESULT(no)], - [LIBS="$LIBS -ldl" - AC_TRY_LINK([ -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -#include <openssl/crypto.h> -#else -#include <openssl/err.h> -#include <openssl/dso.h> -#endif -], -[ -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L) -OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL); -#else -DSO_METHOD_dlfcn(); -#endif -], - [AC_MSG_RESULT(yes) - DST_OPENSSL_LIBS="$DST_OPENSSL_LIBS -ldl" - ], - [AC_MSG_RESULT(unknown) - 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_MSG_CHECKING(for OpenSSL FIPS mode support) - have_fips_mode="" - AC_TRY_LINK([#include <openssl/crypto.h>], - [FIPS_mode();], - have_fips_mode=yes, - have_fips_mode=no) - if test "x$have_fips_mode" = "xyes" - then - AC_DEFINE([HAVE_FIPS_MODE], [1], - [Define if OpenSSL provides FIPS_mode()]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - - 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 - - AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512) - - AC_MSG_CHECKING(for OpenSSL ECDSA support) - have_ecdsa="" - AC_TRY_RUN([ -#include <openssl/ecdsa.h> -#include <openssl/objects.h> -int main() { - EC_KEY *ec256, *ec384; - -#if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384) - return (1); -#endif - ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); - ec384 = EC_KEY_new_by_curve_name(NID_secp384r1); - if (ec256 == NULL || ec384 == NULL) - return (2); - return (0); -} -], - [AC_MSG_RESULT(yes) - have_ecdsa="yes"], - [AC_MSG_RESULT(no) - have_ecdsa="no"], - [AC_MSG_RESULT(using --with-ecdsa)]) - case "$with_ecdsa" in - yes) - case "$have_ecdsa" in - no) AC_MSG_ERROR([ecdsa not supported]) ;; - *) have_ecdsa=yes ;; - esac - ;; - no) - have_ecdsa=no ;; - *) - case "$have_ecdsa" in - yes|no) ;; - *) AC_MSG_ERROR([need --with-ecdsa=[[yes or no]]]) ;; - esac - ;; - esac - case $have_ecdsa in - yes) - OPENSSL_ECDSA="yes" - OPENSSLECDSALINKOBJS='${OPENSSLECDSALINKOBJS}' - OPENSSLECDSALINKSRCS='${OPENSSLECDSALINKSRCS}' - AC_DEFINE(HAVE_OPENSSL_ECDSA, 1, - [Define if your OpenSSL version supports ECDSA.]) - ;; - *) - ;; - esac - - AC_MSG_CHECKING(for OpenSSL GOST support) - have_gost="" - AC_TRY_RUN([ -#include <openssl/conf.h> -#include <openssl/engine.h> -int main() { -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10000000L) - ENGINE *e; - EC_KEY *ek; - - ek = NULL; - OPENSSL_config(NULL); - - e = ENGINE_by_id("gost"); - if (e == NULL) - return (1); - if (ENGINE_init(e) <= 0) - return (1); - return (0); -#else - return (1); -#endif -} -], - [AC_MSG_RESULT(yes) - have_gost="yes"], - [AC_MSG_RESULT(no) - have_gost="no"], - [AC_MSG_RESULT(using --with-gost)]) - case "$with_gost" in - yes) - case "$have_gost" in - no) AC_MSG_ERROR([gost not supported]) ;; - *) have_gost=yes ;; - esac - ;; - no) - have_gost=no ;; - *) - case "$have_gost" in - yes|no) ;; - *) AC_MSG_ERROR([need --with-gost=[[yes, no, raw or asn1]]]) ;; - esac - ;; - esac - case $have_gost in - yes) - OPENSSL_GOST="yes" - OPENSSLGOSTLINKOBJS='${OPENSSLGOSTLINKOBJS}' - OPENSSLGOSTLINKSRCS='${OPENSSLGOSTLINKSRCS}' - AC_DEFINE(HAVE_OPENSSL_GOST, 1, - [Define if your OpenSSL version supports GOST.]) - ;; - *) - ;; - esac - - AC_MSG_CHECKING(for OpenSSL Ed25519 support) - have_ed25519="" - have_ed448="" - AC_TRY_RUN([ -#include <openssl/evp.h> -#include <openssl/objects.h> -int main() { - EVP_PKEY_CTX *ctx; - - ctx = EVP_PKEY_CTX_new_id(NID_ED25519, NULL); - if (ctx == NULL) - return (2); - return (0); -} -], - [AC_MSG_RESULT(yes) - have_ed25519="yes"], - [AC_MSG_RESULT(no) - have_ed25519="no"], - [AC_MSG_RESULT(using --with-eddsa)]) - case "$with_eddsa" in - yes|all) - case "$have_ed25519" in - no) AC_MSG_ERROR([eddsa not supported]) ;; - *) have_ed25519=yes ;; - esac - ;; - no) - have_ed25519=no ;; - *) - case "$have_ed25519" in - yes|no) ;; - *) AC_MSG_ERROR([need --with-eddsa=[[yes, all or no]]]) ;; - esac - ;; - esac - case $have_ed25519 in - yes) - OPENSSL_ED25519="yes" - OPENSSLEDDSALINKOBJS='${OPENSSLEDDSALINKOBJS}' - OPENSSLEDDSALINKSRCS='${OPENSSLEDDSALINKSRCS}' - AC_DEFINE(HAVE_OPENSSL_ED25519, 1, - [Define if your OpenSSL version supports Ed25519.]) - AC_MSG_CHECKING(for OpenSSL Ed448 support) - AC_TRY_RUN([ -#include <openssl/evp.h> -#include <openssl/objects.h> -int main() { - EVP_PKEY_CTX *ctx; - - ctx = EVP_PKEY_CTX_new_id(NID_ED448, NULL); - if (ctx == NULL) - return (2); - return (0); -} -], - [AC_MSG_RESULT(yes) - have_ed448="yes"], - [AC_MSG_RESULT(no) - have_ed448="no"], - [AC_MSG_RESULT(using --with-eddsa)]) - case $with_eddsa in - all) - have_ed448=yes ;; - *) - ;; - esac - case $have_ed448 in - yes) - AC_DEFINE(HAVE_OPENSSL_ED448, 1, - [Define if your OpenSSL version supports Ed448.])], - ;; - *) - ;; - esac - ;; - *) - ;; - esac - - have_aes="no" - AC_MSG_CHECKING(for OpenSSL AES support) - AC_TRY_RUN([ -#include <openssl/evp.h> -int main() { - const EVP_CIPHER *aes128, *aes192, *aes256; - - aes128 = EVP_aes_128_ecb(); - aes192 = EVP_aes_192_ecb(); - aes256 = EVP_aes_256_ecb(); - if (aes128 == NULL || aes192 == NULL || aes256 == NULL) - return (1); - return (0); -} -], - [AC_MSG_RESULT(yes) - have_aes="evp"], - [AC_CHECK_FUNC(AES_encrypt, - [AC_MSG_RESULT(yes) - have_aes="yes"], - [AC_MSG_RESULT(no)])], - [AC_MSG_RESULT(using --with-aes) - # Expect cross-compiling with a modern OpenSSL - have_aes="evp"]) - - ISC_OPENSSL_INC="" - ISC_OPENSSL_LIBS="" - if test "yes" = "$with_aes" - then - case "$have_aes" in - evp) - AC_DEFINE(HAVE_OPENSSL_EVP_AES, 1, - [Define if your OpenSSL version supports EVP AES]) - ISC_OPENSSL_INC="$DST_OPENSSL_INC" - ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS" - ;; - yes) - AC_DEFINE(HAVE_OPENSSL_AES, 1, - [Define if your OpenSSL version supports AES]) - ISC_OPENSSL_INC="$DST_OPENSSL_INC" - ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS" - ;; - *) - ;; - esac - fi - - CC="$saved_cc" - CFLAGS="$saved_cflags" - LIBS="$saved_libs" - OPENSSLLINKOBJS='${OPENSSLLINKOBJS}' - OPENSSLLINKSRCS='${OPENSSLLINKSRCS}' - - ;; -esac - -# -# 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(OPENSSLECDSALINKOBJS) -AC_SUBST(OPENSSLECDSALINKSRCS) -AC_SUBST(OPENSSLEDDSALINKOBJS) -AC_SUBST(OPENSSLEDDSALINKSRCS) -AC_SUBST(OPENSSLGOSTLINKOBJS) -AC_SUBST(OPENSSLGOSTLINKSRCS) -AC_SUBST(OPENSSLLINKOBJS) -AC_SUBST(OPENSSLLINKSRCS) -AC_SUBST(OPENSSL_ECDSA) -AC_SUBST(OPENSSL_ED25519) -AC_SUBST(OPENSSL_GOST) - -DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DST_OPENSSL_LIBS" - -ISC_PLATFORM_WANTAES="#undef ISC_PLATFORM_WANTAES" -if test "yes" = "$with_aes" -then - if test "X$CRYPTO" = "X" - then - with_aes="no" - fi -fi -if test "yes" = "$with_aes" -then - ISC_PLATFORM_WANTAES="#define ISC_PLATFORM_WANTAES 1" -fi -AC_SUBST(ISC_PLATFORM_WANTAES) - -# -# Choose SIT algorithm -# - -if test "yes" = "$enable_sit" -then - AC_MSG_CHECKING(for the Algorithm for SIT) - if test "auto" = "$with_sit_alg" - then - if test "$with_aes" = "yes" - then - with_sit_alg="aes" - else - with_sit_alg="sha256" - fi - fi -fi -case $with_sit_alg in - sha1) - if test "$enable_sit" != "yes" - then - AC_MSG_ERROR("with-sit-alg requires enable-sit"); - fi - AC_MSG_RESULT(sha1) - if test "X$CRYPTO" = "X-DOPENSSL" - then - if test "checksit" = "$want_openssl_hash" - then - want_openssl_hash="yes" - fi - fi - AC_DEFINE(HMAC_SHA1_SIT, 1, - [Use HMAC-SHA1 for Source Identity Token generation]) - ;; - sha256) - if test "$enable_sit" != "yes" - then - AC_MSG_ERROR("with-sit-alg requires enable-sit"); - fi - AC_MSG_RESULT(sha256) - if test "X$CRYPTO" = "X-DOPENSSL" - then - if test "checksit" = "$want_openssl_hash" - then - want_openssl_hash="yes" - fi - fi - AC_DEFINE(HMAC_SHA256_SIT, 1, - [Use HMAC-SHA256 for Source Identity Token generation]) - ;; - aes) - if test "$enable_sit" != "yes" - then - AC_MSG_ERROR("with-sit-alg requires enable-sit"); - fi - AC_MSG_RESULT(aes) - if test "yes" != "$with_aes" - then - AC_MSG_ERROR("SIT wants to use unavailable AES"); - fi - AC_DEFINE(AES_SIT, 1, - [Use AES for Source Identity Token generation]) - ;; -esac -if test "checksit" = "$want_openssl_hash" -then - want_openssl_hash="no" -fi - -# -# Use OpenSSL for hash functions -# - -AC_MSG_CHECKING(for using OpenSSL for hash functions) -ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH" -case $want_openssl_hash in - yes) - if test "$CRYPTO" != "-DOPENSSL" - then - AC_MSG_ERROR([No OpenSSL for hash functions]) - fi - AC_MSG_RESULT(yes) - ISC_PLATFORM_OPENSSLHASH="#define ISC_PLATFORM_OPENSSLHASH 1" - ISC_OPENSSL_INC="$DST_OPENSSL_INC" - ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS" - ;; - no) - AC_MSG_RESULT(no) - ;; -esac -AC_SUBST(ISC_PLATFORM_OPENSSLHASH) -AC_SUBST(ISC_OPENSSL_INC) -AC_SUBST(ISC_OPENSSL_LIBS) - -# -# PKCS11 (aka crypto hardware) support (--with moved just after openssl) -# -AC_MSG_CHECKING(for PKCS11 support) - -if test "auto" = "$use_pkcs11" -then - if test "yes" = "$want_native_pkcs11" - then - use_pkcs11="yes" - else - use_pkcs11="no" - fi -fi - -case "$use_pkcs11" in - no) - AC_MSG_RESULT(no) - USE_PKCS11="" - PKCS11_TEST="" - PKCS11_TOOLS="" - ISC_PK11_C="" - ISC_PK11_O="" - ISC_PK11_API_C="" - ISC_PK11_API_O="" - ISC_PK11_RESULT_C="" - ISC_PK11_RESULT_O="" - ISC_ISCPK11_API_C="" - ISC_ISCPK11_API_O="" - ;; - yes|*) - AC_MSG_RESULT(yes) - AC_MSG_ERROR([PKCS11 requires thread support]) - if test "X$CRYPTO" = "X-DOPENSSL" - then - AC_MSG_CHECKING(for OpenSSL with PKCS11 support) - saved_cc="$CC" - saved_cflags="$CFLAGS" - saved_libs="$LIBS" - CC="$CC -pthread" - CFLAGS="$CFLAGS $DST_OPENSSL_INC" - LIBS="$LIBS $DST_OPENSSL_LIBS" - AC_TRY_RUN([ -#include <openssl/conf.h> -#include <openssl/engine.h> -int main() { - ENGINE *e; - - OPENSSL_config(NULL); - e = ENGINE_by_id("pkcs11"); - if (e == NULL) - return (1); - if (ENGINE_init(e) <= 0) - return (1); - return (0); -} -], - [AC_MSG_RESULT(yes) - PKCS11_TEST=pkcs11ssl - PKCS11_ENGINE='-DPKCS11_ENGINE="\"pkcs11\""'], - [AC_MSG_RESULT(no) - PKCS11_TEST='' - PKCS11_ENGINE='-DPKCS11_ENGINE=NULL'], - [AC_MSG_RESULT(cross compile, defaulting to no) - PKCS11_TEST='' - PKCS11_ENGINE='-DPKCS11_ENGINE=NULL']) - CC="$saved_cc" - CFLAGS="$saved_cflags" - LIBS="$saved_libs" - else - PKCS11_TEST='' - PKCS11_ENGINE='-DPKCS11_ENGINE=NULL' - - fi - USE_PKCS11='-DUSE_PKCS11' - PKCS11_TOOLS=pkcs11 - AC_CHECK_FUNC(getpassphrase, AC_DEFINE(HAVE_GETPASSPHRASE),) - ISC_PK11_C="pk11.c" - ISC_PK11_O="pk11.$O" - ISC_PK11_API_C="pk11_api.c" - ISC_PK11_API_O="pk11_api.$O" - ISC_PK11_RESULT_C="pk11_result.c" - ISC_PK11_RESULT_O="pk11_result.$O" - ISC_ISCPK11_API_C="unix/pk11_api.c" - ISC_ISCPK11_API_O="unix/pk11_api.$O" - ;; -esac -AC_SUBST(USE_PKCS11) -AC_SUBST(PKCS11_TOOLS) -AC_SUBST(PKCS11_ENGINE) -AC_SUBST(ISC_PK11_C) -AC_SUBST(ISC_PK11_O) -AC_SUBST(ISC_PK11_API_C) -AC_SUBST(ISC_PK11_API_O) -AC_SUBST(ISC_PK11_RESULT_C) -AC_SUBST(ISC_PK11_RESULT_O) -AC_SUBST(ISC_ISCPK11_API_C) -AC_SUBST(ISC_ISCPK11_API_O) - -AC_MSG_CHECKING(for PKCS11 tools) -case "$use_pkcs11" in - no) - PKCS11_PROVIDER="undefined" - AC_MSG_RESULT(disabled) - ;; - yes|'') - PKCS11_PROVIDER="undefined" - AC_MSG_RESULT(enabled) - ;; - *) - PKCS11_PROVIDER="$use_pkcs11" - AC_MSG_RESULT([enabled, PKCS11 provider is $PKCS11_PROVIDER]) - ;; -esac - -AC_SUBST(PKCS11_PROVIDER) - -PKCS11_ECDSA="" -PKCS11_GOST="" -PKCS11_ED25519="" -set_pk11_flavor="no" -AC_MSG_CHECKING(for native PKCS11) - -case "$want_native_pkcs11" in - yes) - AC_MSG_RESULT(using native PKCS11 crypto) - PKCS11LINKOBJS='${PKCS11LINKOBJS}' - PKCS11LINKSRCS='${PKCS11LINKSRCS}' - PKCS11_TEST=pkcs11 - AC_MSG_CHECKING(for PKCS11 ECDSA) - case "$with_ecdsa" in - no) - AC_MSG_RESULT(disabled) - ;; - *) - AC_MSG_RESULT(enabled) - PKCS11_ECDSA="yes" - AC_DEFINE(HAVE_PKCS11_ECDSA, 1, - [Define if your PKCS11 provider supports ECDSA.]) - ;; - esac - AC_MSG_CHECKING(for PKCS11 GOST) - case "$with_gost" in - yes) - AC_MSG_RESULT(enabled) - PKCS11_GOST="yes" - AC_DEFINE(HAVE_PKCS11_GOST, 1, - [Define if your PKCS11 provider supports GOST.]) - ;; - *) - AC_MSG_RESULT(disabled) - ;; - esac - AC_MSG_CHECKING(for PKCS11 Ed25519) - case "$with_eddsa" in - yes|all) - AC_MSG_RESULT(enabled) - PKCS11_ED25519="yes" - AC_DEFINE(HAVE_PKCS11_ED25519, 1, - [Define if your PKCS11 provider supports Ed25519.]) - AC_MSG_CHECKING(for PKCS11 Ed448) - case "$with_eddsa" in - all) - AC_MSG_RESULT(enabled) - AC_DEFINE(HAVE_PKCS11_ED448, 1, - [Define if your PKCS11 provider supports Ed448.]) - ;; - *) - AC_MSG_RESULT(disabled) - ;; - esac - ;; - *) - AC_MSG_RESULT(disabled) - ;; - esac - AC_MSG_CHECKING(for PKCS11 flavor) - case "$PKCS11_PROVIDER" in - *nfast*) - AC_MSG_RESULT(Thales nCipher) - # default - pk11_flavor="PK11_THALES_FLAVOR" - set_pk11_flavor="yes" - ;; - *libsofthsm2*) - AC_MSG_RESULT(SoftHSMv2) - pk11_flavor="PK11_SOFTHSMV2_FLAVOR" - set_pk11_flavor="yes" - ;; - *libsofthsm*) - AC_MSG_RESULT(SoftHSM) - pk11_flavor="PK11_SOFTHSMV1_FLAVOR" - set_pk11_flavor="yes" - ;; - *cryptech*) - AC_MSG_RESULT(Cryptech) - pk11_flavor="PK11_CRYPTECH_FLAVOR" - set_pk11_flavor="yes" - ;; - *Keyper*) - AC_MSG_RESULT(AEP Keyper) - pk11_flavor="PK11_AEP_FLAVOR" - set_pk11_flavor="yes" - ;; - undefined) - AC_MSG_RESULT(undefined provider?) - ;; - *) - AC_MSG_RESULT(unknown provider: tweaks are in lib/isc/include/pk11/site.h) - ;; - esac - if test "yes" = "$set_pk11_flavor" ; then - CFLAGS="$CFLAGS -DPK11_FLAVOR=$pk11_flavor" - fi - ;; - no|'') - AC_MSG_RESULT(disabled) - ;; -esac - -AC_SUBST(PKCS11LINKOBJS) -AC_SUBST(PKCS11LINKSRCS) -AC_SUBST(CRYPTO) -AC_SUBST(PKCS11_ECDSA) -AC_SUBST(PKCS11_GOST) -AC_SUBST(PKCS11_ED25519) -AC_SUBST(PKCS11_TEST) - -# for PKCS11 benchmarks - -have_clock_gt=no -AC_CHECK_FUNC(clock_gettime,have_clock_gt=yes,) -if test "no" = "$have_clock_gt"; then - AC_CHECK_LIB(rt,clock_gettime,have_clock_gt=rt,) -fi - -if test "no" != "$have_clock_gt"; then - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if clock_gettime is available.]) -fi - -if test "rt" = "$have_clock_gt"; then - LIBS="-lrt $LIBS" -fi - -# -# was --with-libxml2 specified? -# -AC_MSG_CHECKING(for libxml2 library) -AC_ARG_WITH(libxml2, - AS_HELP_STRING([--with-libxml2[=PATH]], - [build with libxml2 library [yes|no|path]]), - use_libxml2="$withval", use_libxml2="auto") - -case "$use_libxml2" in - no) - DST_LIBXML2_INC="" - ;; - auto|yes) - case X`(xml2-config --version) 2>/dev/null` in - X2.[[6789]].*) - libxml2_libs=`xml2-config --libs` - libxml2_cflags=`xml2-config --cflags` - ;; - *) - if test "yes" = "$use_libxml2" ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR(required libxml2 version not available) - else - libxml2_libs= - libxml2_cflags= - fi - ;; - esac - ;; - *) - if test -f "$use_libxml2/bin/xml2-config" ; then - libxml2_libs=`$use_libxml2/bin/xml2-config --libs` - libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags` - fi - ;; -esac - -if test "X$libxml2_libs" != "X" -then - CFLAGS="$CFLAGS $libxml2_cflags" - LIBS="$LIBS $libxml2_libs" - # - # Sanity check xml2-config output. - # - AC_TRY_LINK([#include <libxml/xmlwriter.h>], - [return(xmlTextWriterStartElement(NULL, NULL));], - AC_MSG_RESULT(yes), - AC_MSG_ERROR(xml2-config returns badness)) - AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found]) - XMLSTATS=1 -else - AC_MSG_RESULT(no) -fi -AC_SUBST(XMLSTATS) - -# -# was --with-libjson specified? -# -AC_MSG_CHECKING(for json library) -AC_ARG_WITH(libjson, - AS_HELP_STRING([--with-libjson[=PATH]], - [build with libjson0 library [yes|no|path]]), - use_libjson="$withval", use_libjson="auto") - -have_libjson="" -have_libjson_c="" -case "$use_libjson" in - no) - libjson_libs="" - ;; - auto|yes) - for d in /usr /usr/local /opt/local - do - if test -f "${d}/include/json/json.h" - then - if test ${d} != /usr - then - libjson_cflags="-I ${d}/include" - LIBS="$LIBS -L${d}/lib" - fi - have_libjson="yes" - elif test -f "${d}/include/json-c/json.h" - then - if test ${d} != /usr - then - libjson_cflags="-I ${d}/include" - LIBS="$LIBS -L${d}/lib" - fi - have_libjson="yes" - have_libjson_c="yes" - fi - done - ;; - *) - if test -f "${use_libjson}/include/json/json.h" - then - libjson_cflags="-I${use_libjson}/include" - LIBS="$LIBS -L${use_libjson}/lib" - have_libjson="yes" - elif test -f "${use_libjson}/include/json-c/json.h" - then - libjson_cflags="-I${use_libjson}/include" - LIBS="$LIBS -L${use_libjson}/lib" - have_libjson="yes" - have_libjson_c="yes" - else - AC_MSG_ERROR([$use_libjson/include/json{,-c}/json.h not found.]) - fi - ;; -esac - -if test "X${have_libjson}" != "X" -then - AC_MSG_RESULT(yes) - AC_SEARCH_LIBS([json_object_new_int64], [json json-c], [], - [AC_MSG_ERROR([found libjson include but not library.]) - have_libjson=""]) -elif test "X$use_libjson" = Xyes -then - AC_MSG_ERROR([include/json{,-c}/json.h not found.]) -else - AC_MSG_RESULT(no) -fi - -if test "X${have_libjson}" != "X" -then - CFLAGS="$CFLAGS $libjson_cflags" - AC_DEFINE(HAVE_JSON, 1, [Define if libjson was found]) - if test "X${have_libjson_c}" = Xyes - then - AC_DEFINE(HAVE_JSON_C, 1, [Define if json-c was found]) - fi - JSONSTATS=1 -fi -AC_SUBST(JSONSTATS) - -# -# 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. -# -AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),) -AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),) - -# -# End of pthreads stuff. -# - -# -# Large File -# -AC_ARG_ENABLE(largefile, - AS_HELP_STRING([--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" MKDEPCFLAGS="-M" IRIX_DNSSEC_WARNINGS_HACK="" @@ -2389,103 +394,6 @@ AC_SUBST(MKDEPCFLAGS) AC_SUBST(MKDEPPROG) AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK) -# -# NLS -# -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: -# -case "$host" in - mips-sgi-irix*) - ;; - *-linux*) - ;; - *) - AC_CHECK_LIB(socket, socket) - AC_CHECK_LIB(nsl, inet_addr) - ;; -esac - -# -# Work around Solaris's select() limitations. -# -case "$host" in - *-solaris2.[[89]]|*-solaris2.1?) - AC_DEFINE(FD_SETSIZE, 65536, - [Solaris hack to get select_large_fdset.]) - ;; -esac - -# -# Purify support -# -AC_MSG_CHECKING(whether to use purify) -AC_ARG_WITH(purify, - AS_HELP_STRING([--with-purify[=PATH]], [use Rational purify]), - use_purify="$withval", use_purify="no") - -case "$use_purify" in - no) - ;; - yes) - AC_PATH_PROG(purify_path, purify, purify) - ;; - *) - purify_path="$use_purify" - ;; -esac - -case "$use_purify" in - no) - AC_MSG_RESULT(no) - PURIFY="" - ;; - *) - if test -f "$purify_path" || test purify = "$purify_path"; then - AC_MSG_RESULT($purify_path) - PURIFYFLAGS="`echo $PURIFYOPTIONS`" - PURIFY="$purify_path $PURIFYFLAGS" - else - AC_MSG_ERROR([$purify_path not found. - -Please choose the proper path with the following command: - - configure --with-purify=PATH -]) - fi - ;; -esac - -AC_SUBST(PURIFY) - -# -# Google/Great Performance Tools CPU Profiler -# -AC_MSG_CHECKING(whether to use gperftools profiler) -AC_ARG_WITH(gperftools-profiler, - AS_HELP_STRING([--with-gperftools-profiler], - [use gperftools CPU profiler]), - use_profiler="$withval", use_profiler="no") - -case $use_profiler in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_GPERFTOOLS_PROFILER], 1, - [Define to use gperftools CPU profiler.]) - LIBS="$LIBS -lprofiler" - ;; - *) - AC_MSG_RESULT(no) - ;; -esac # # File name extension for static archive files, for those few places @@ -2507,1674 +415,15 @@ AC_SUBST(LIBTOOL_IN_MAIN) BIND9_CO_RULE=".c.$O:" AC_SUBST(BIND9_CO_RULE) -# -# Here begins a very long section to determine the system's networking -# capabilities. The order of the tests is significant. -# - -# -# IPv6 -# -AC_ARG_ENABLE(ipv6, - AS_HELP_STRING([--enable-ipv6], [use IPv6 [default=autodetect]])) - -case "$enable_ipv6" in - yes|''|autodetect) - AC_DEFINE(WANT_IPV6) - ;; - no) - ;; -esac - -# -# 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) -AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h>], -[struct sockaddr_in6 sin6; return (0);], - [AC_MSG_RESULT(yes) - found_ipv6=yes], - [AC_MSG_RESULT(no) - found_ipv6=no]) - -# -# 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) -AC_ARG_WITH(kame, - AS_HELP_STRING([--with-kame[=PATH]], - [use Kame IPv6 [default path /usr/local/v6]]), - use_kame="$withval", use_kame="no") - -case "$use_kame" in - no) - ;; - yes) - kame_path=/usr/local/v6 - ;; - *) - kame_path="$use_kame" - ;; -esac - -case "$use_kame" in - no) - AC_MSG_RESULT(no) - ;; - *) - if test -f $kame_path/lib/libinet6.a; then - AC_MSG_RESULT($kame_path/lib/libinet6.a) - LIBS="-L$kame_path/lib -linet6 $LIBS" - else - AC_MSG_ERROR([$kame_path/lib/libinet6.a not found. - -Please choose the proper path with the following command: - - configure --with-kame=PATH -]) - fi - ;; -esac - -# -# Whether netinet6/in6.h is needed has to be defined in isc/platform.h. -# 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 -# netinet6/in6.h is needed for. -# -changequote({, }) -case "$host" in -*-bsdi4.[01]*) - ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1" - isc_netinet6in6_hack="#include <netinet6/in6.h>" - ;; -*) - ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H" - isc_netinet6in6_hack="" - ;; -esac -changequote([, ]) - -# -# This is similar to the netinet6/in6.h issue. -# -case "$host" in -*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*) - # UnixWare - ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1" - ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1" - isc_netinetin6_hack="#include <netinet/in6.h>" - ;; -*) - ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H" - ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR" - isc_netinetin6_hack="" - ;; -esac - -# -# Now delve deeper into the suitability of the IPv6 support. -# -case "$found_ipv6" in - yes) - ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1" - - AC_MSG_CHECKING(for in6_addr) - AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack -], -[struct in6_addr in6; return (0);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" - isc_in_addr6_hack=""], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1" - isc_in_addr6_hack="#define in6_addr in_addr6"]) - - AC_MSG_CHECKING(for in6addr_any) - AC_TRY_LINK([ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack -$isc_in_addr6_hack -], - [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"]) - - AC_MSG_CHECKING(for in6addr_loopback) - AC_TRY_LINK([ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack -$isc_in_addr6_hack -], - [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"]) - - AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6) - AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$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" - - AC_MSG_CHECKING(for in6_pktinfo) - AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack -], - [struct in6_pktinfo xyzzy; return (0);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"], - [AC_MSG_RESULT(no -- disabling runtime ipv6 support) - ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"]) - ;; - no) - ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6" - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_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" - ISC_IPV6_C="ipv6.c" - ;; -esac - -AC_MSG_CHECKING(for struct sockaddr_storage) -AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/socket.h> -$isc_netinetin6_hack -$isc_netinet6in6_hack -], -[struct sockaddr_storage storage; return (0);], -[AC_MSG_RESULT(yes) -ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"], -[AC_MSG_RESULT(no) -ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"]) - -AC_SUBST(ISC_PLATFORM_HAVEIPV6) -AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H) -AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H) -AC_SUBST(ISC_PLATFORM_HAVEINADDR6) -AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY) -AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK) -AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO) -AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR) -AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE) -AC_SUBST(ISC_IPV6_H) -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 -# 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]) -AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -main() { -char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"], - - [AC_MSG_RESULT(no) - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c" - ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"], - [AC_MSG_RESULT(assuming inet_ntop not needed) - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"]) - - -# -# Look for a 4.4BSD-style sa_len member in struct sockaddr. -# -case "$host" in - *-dec-osf*) - # Turn on 4.4BSD style sa_len support. - AC_DEFINE(_SOCKADDR_LEN) - ;; -esac - -AC_MSG_CHECKING(for sa_len in struct sockaddr) -AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/socket.h>], -[struct sockaddr sa; sa.sa_len = 0; return (0);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"]) -AC_SUBST(ISC_PLATFORM_HAVESALEN) - -# -# Look for a 4.4BSD or 4.3BSD struct msghdr -# -AC_MSG_CHECKING(for struct msghdr flavor) -AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/socket.h>], -[struct msghdr msg; msg.msg_flags = 0; return (0);], - [AC_MSG_RESULT(4.4BSD) - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"], - [AC_MSG_RESULT(4.3BSD) - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"]) -AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR) - -# -# Look for in_port_t. -# -AC_MSG_CHECKING(for type in_port_t) -AC_TRY_COMPILE([ -#include <sys/types.h> -#include <netinet/in.h>], -[in_port_t port = 25; return (0);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"]) -AC_SUBST(ISC_PLATFORM_NEEDPORTT) - -# -# Check for addrinfo -# -AC_MSG_CHECKING(for struct addrinfo) -AC_TRY_COMPILE([ -#include <netdb.h>], -[struct addrinfo a; return (0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" - AC_DEFINE(HAVE_ADDRINFO)], - [AC_MSG_RESULT(no) - ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"]) -AC_SUBST(ISC_LWRES_NEEDADDRINFO) - -# -# Check for rrsetinfo -# -AC_MSG_CHECKING(for struct rrsetinfo) -AC_TRY_COMPILE([ -#include <netdb.h>], -[struct rrsetinfo r; return (0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"], - [AC_MSG_RESULT(no) - ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"]) -AC_SUBST(ISC_LWRES_NEEDRRSETINFO) - -AC_MSG_CHECKING(for int sethostent) -AC_TRY_COMPILE([ -#include <netdb.h>], -[int i = sethostent(0); return(0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"], - [AC_MSG_RESULT(no) - ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"]) -AC_SUBST(ISC_LWRES_SETHOSTENTINT) - -AC_MSG_CHECKING(for int endhostent) -AC_TRY_COMPILE([ -#include <netdb.h>], -[int i = endhostent(); return(0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"], - [AC_MSG_RESULT(no) - ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"]) -AC_SUBST(ISC_LWRES_ENDHOSTENTINT) - -AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...)) -AC_TRY_COMPILE([ -#include <netdb.h> -struct netent *getnetbyaddr(in_addr_t, int);], -[], - [AC_MSG_RESULT(yes) - ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"], - [AC_MSG_RESULT(no) - ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"]) -AC_SUBST(ISC_LWRES_GETNETBYADDRINADDR) - -AC_MSG_CHECKING(for int setnetent) -AC_TRY_COMPILE([ -#include <netdb.h>], -[int i = setnetent(0); return(0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"], - [AC_MSG_RESULT(no) - ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"]) -AC_SUBST(ISC_LWRES_SETNETENTINT) - -AC_MSG_CHECKING(for int endnetent) -AC_TRY_COMPILE([ -#include <netdb.h>], -[int i = endnetent(); return(0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"], - [AC_MSG_RESULT(no) - ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"]) -AC_SUBST(ISC_LWRES_ENDNETENTINT) - -AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...)) -AC_TRY_COMPILE([ -#include <netdb.h> -struct hostent *gethostbyaddr(const void *, size_t, int);], -[return(0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"], - [AC_MSG_RESULT(no) - ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"]) -AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID) - -AC_MSG_CHECKING(for h_errno in netdb.h) -AC_TRY_COMPILE([ -#include <netdb.h>], -[h_errno = 1; return(0);], - [AC_MSG_RESULT(yes) - ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"], - [AC_MSG_RESULT(no) - 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) - -AC_ARG_ENABLE(getifaddrs, - AS_HELP_STRING([--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 -# /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6 -# addresses. -# -case $want_getifaddrs in -glibc) -AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required") -AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS)) -;; -yes) -AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS)) -;; -no) -;; -esac - -# -# Look for a sysctl call to get the list of network interfaces. -# -case $ac_cv_header_sys_sysctl_h in -yes) -AC_MSG_CHECKING(for interface list sysctl) -AC_EGREP_CPP(found_rt_iflist, [ -#include <sys/param.h> -#include <sys/sysctl.h> -#include <sys/socket.h> -#ifdef NET_RT_IFLIST -found_rt_iflist -#endif -], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IFLIST_SYSCTL)], - [AC_MSG_RESULT(no)]) -;; -esac - -# -# Check for some other useful functions that are not ever-present. -# - -# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC -# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77 -# 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 -# the function itself. -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) - -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" - GENRANDOMLIB=""], - [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1" - GENRANDOMLIB='${ISCLIBS}']) -AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL) -AC_SUBST(GENRANDOMLIB) - -AC_CHECK_FUNC(strlcpy, - [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"], - [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"]) -AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY) - -AC_CHECK_FUNC(strlcat, - [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"], - [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"]) -AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT) - -AC_CHECK_FUNC(strcasestr, - [ISC_PLATFORM_NEEDSTRCASESTR="#undef ISC_PLATFORM_NEEDSTRCASESTR"], - [ISC_PLATFORM_NEEDSTRCASESTR="#define ISC_PLATFORM_NEEDSTRCASESTR 1"]) -AC_SUBST(ISC_PLATFORM_NEEDSTRCASESTR) - -AC_SUBST(READLINE_LIB) -AC_ARG_WITH(readline, - AS_HELP_STRING([--with-readline[=LIBSPEC]], - [specify readline library [default auto]]), - use_readline="$withval", use_readline="auto") -case "$use_readline" in -no) ;; -*) - saved_LIBS="$LIBS" - case "$use_readline" in - yes|auto) try_readline="-ledit"; or_readline="-lreadline" ;; - *) try_readline="$use_readline" - esac - for readline in "$try_readline" $or_readline - do - LIBS="$readline" - AC_MSG_NOTICE(checking for readline with $readline) - AC_CHECK_FUNCS(readline) - if test "yes" = "$ac_cv_func_readline" - then - READLINE_LIB="$readline" - break - fi - for lib in -lterminfo -ltermcap -lncurses -lcurses - do - AC_MSG_NOTICE(checking for readline with $readline $lib) - unset ac_cv_func_readline - LIBS="$readline $lib" - AC_CHECK_FUNCS(readline) - if test "yes" = "$ac_cv_func_readline" - then - READLINE_LIB="$readline $lib" - break - fi - done - if test "yes" = "$ac_cv_func_readline" - then - break - fi - done - if test "auto" != "$use_readline" && - test "X$READLINE_LIB" = "X" - then - AC_MSG_ERROR([The readline library was not found.]) - fi - LIBS="$saved_LIBS" - ;; -esac -if test "yes" = "$ac_cv_func_readline" -then - case "$READLINE_LIB" in - *edit*) - AC_CHECK_HEADERS(editline/readline.h) - AC_CHECK_HEADERS(edit/readline/readline.h) - AC_CHECK_HEADERS(edit/readline/history.h) - ;; - esac - AC_CHECK_HEADERS(readline/readline.h) - AC_CHECK_HEADERS(readline/history.h) -fi - -ISC_PRINT_OBJS= -ISC_PRINT_SRCS= -ISC_PLATFORM_NEEDPRINTF='#undef ISC_PLATFORM_NEEDPRINTF' -ISC_PLATFORM_NEEDFPRINTF='#undef ISC_PLATFORM_NEEDFPRINTF' -ISC_PLATFORM_NEEDSPRINTF='#undef ISC_PLATFORM_NEEDSPRINTF' -ISC_PLATFORM_NEEDVSNPRINTF='#undef ISC_PLATFORM_NEEDVSNPRINTF' - -AC_MSG_CHECKING(sprintf return type) -AC_TRY_COMPILE([ -#include <stdio.h> -], -[ char buf[2]; return(*sprintf(buf,"x"));], -[AC_MSG_RESULT(char *) -ISC_PRINT_OBJS="print.$O" -ISC_PRINT_SRCS="print.c" -ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF" -],[AC_MSG_RESULT(int)]) - -AC_CHECK_FUNC(vsnprintf, [], - [ISC_PRINT_OBJS="print.$O" - ISC_PRINT_SRCS="print.c" - ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"]) - -AC_MSG_CHECKING(printf for %z support) -AC_TRY_RUN([ -#include <stdio.h> - -int -main() { - size_t j = 0; - char buf[100]; - buf[0] = 0; - sprintf(buf, "%zu", j); - return ((buf[0] == '0' && buf[1] == '\0') ? 0 : 1); -} -], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - ISC_PRINT_OBJS="print.$O" - ISC_PRINT_SRCS="print.c" - ISC_PLATFORM_NEEDPRINTF='#define ISC_PLATFORM_NEEDPRINTF 1' - ISC_PLATFORM_NEEDFPRINTF='#define ISC_PLATFORM_NEEDFPRINTF 1' - ISC_PLATFORM_NEEDFSRINTF='#define ISC_PLATFORM_NEEDSPRINTF 1' - ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"], - [AC_MSG_RESULT(assuming target platform supports %z)]) - -AC_SUBST(ISC_PLATFORM_NEEDPRINTF) -AC_SUBST(ISC_PLATFORM_NEEDFPRINTF) -AC_SUBST(ISC_PLATFORM_NEEDSPRINTF) -AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF) - -ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS" -ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS" -AC_SUBST(ISC_EXTRA_OBJS) -AC_SUBST(ISC_EXTRA_SRCS) - -AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR)) -# -# Use our own SPNEGO implementation? -# -AC_ARG_ENABLE(isc-spnego, - AS_HELP_STRING([--disable-isc-spnego], - [use SPNEGO from GSSAPI library])) - -if test -n "$USE_GSSAPI" -then - case "$enable_isc_spnego" in - yes|'') - 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) - ;; - no) - AC_MSG_RESULT(using SPNEGO from GSSAPI library) - ;; - esac -fi - -AC_SUBST(USE_ISC_SPNEGO) AC_SUBST(DST_EXTRA_OBJS) AC_SUBST(DST_EXTRA_SRCS) -# Determine the printf format characters to use when printing -# values of type 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 -# 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) - - -# -# Security Stuff -# -# Note it is very recommended to *not* disable chroot(), -# this is only because chroot() was made obsolete by Posix. -AC_ARG_ENABLE(chroot, AS_HELP_STRING([--disable-chroot], [disable chroot])) -case "$enable_chroot" in - yes|'') - AC_CHECK_FUNCS(chroot) - ;; - no) - ;; -esac -AC_ARG_ENABLE(linux-caps, - AS_HELP_STRING([--disable-linux-caps], - [disable linux capabilities])) -case "$enable_linux_caps" in - yes|'') - AC_CHECK_HEADERS(linux/types.h) - AC_CHECK_HEADERS([sys/capability.h]) - AC_CHECK_HEADERS([linux/capability.h], [], [], - [#ifdef HAVE_LINUX_TYPES_H - #include <linux/types.h> - #endif - ]) - AC_CHECK_LIB(cap, cap_set_proc) - ;; - no) - ;; -esac -AC_CHECK_HEADERS(sys/prctl.h) - -AC_CHECK_HEADERS(sys/un.h, -ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1" -, -ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH" -) -AC_SUBST(ISC_PLATFORM_HAVESYSUNH) - -case "$host" in -*-solaris*) - AC_DEFINE(NEED_SECURE_DIRECTORY, 1, - [Define if connect does not honour the permission on the UNIX domain socket.]) - ;; -*-sunos*) - AC_DEFINE(NEED_SECURE_DIRECTORY, 1, - [Define if connect does not honour the permission on the UNIX domain socket.]) - ;; -esac - -# -# Time Zone Stuff -# -AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET)) - -AC_MSG_CHECKING(for optarg declaration) -AC_TRY_COMPILE([ -#include <unistd.h> -], -[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.])]) - -# -# Check for nanoseconds in file stats -# -AC_MSG_CHECKING(st_mtim.tv_nsec) -AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat s; return(s.st_mtim.tv_nsec);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVESTATNSEC="#define ISC_PLATFORM_HAVESTATNSEC 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC"]) -AC_SUBST(ISC_PLATFORM_HAVESTATNSEC) - -# -# BSD/OS, and perhaps some others, don't define rlim_t. -# -AC_MSG_CHECKING(for type rlim_t) -AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h>], -[rlim_t rl = 19671212; return (0);], -[AC_MSG_RESULT(yes) - rlim_t="#define ISC_PLATFORM_RLIMITTYPE rlim_t"], -[AC_MSG_RESULT(no) - -AC_MSG_CHECKING(type of rlim_cur) -AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}], -[AC_MSG_RESULT(int) -rlim_t="#define ISC_PLATFORM_RLIMITTYPE int"], -[ -AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}], -[AC_MSG_RESULT(long int) -rlim_t="#define ISC_PLATFORM_RLIMITTYPE long int"], -[ -AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}], -[AC_MSG_RESULT(long long int) -rlim_t="#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)]) -],[ -AC_ARG_WITH(rlimtype, , rlimtype="$withval", rlimtype="long long int") -rlim_t="#define ISC_PLATFORM_RLIMITTYPE $rlimtype" -AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming $rlimtype)]) -]) -AC_SUBST(rlim_t) - -# -# Older HP-UX doesn't have gettune -# -case "$host" in - *-hp-hpux*) - AC_CHECK_HEADERS(sys/dyntune.h) - ;; - *) - ;; -esac - - -# -# 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 - -# -# 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. -# -AC_SUBST(ISC_PLATFORM_USEDECLSPEC) -ISC_PLATFORM_USEDECLSPEC="#undef ISC_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" - -case "$host" in - *-aix5.[[123]].*) - hack_shutup_pthreadonceinit=yes - ;; - *-bsdi3.1*) - hack_shutup_sputaux=yes - ;; - *-bsdi4.0*) - hack_shutup_sigwait=yes - hack_shutup_sputaux=yes - ;; - [*-bsdi4.[12]*]) - hack_shutup_stdargcast=yes - ;; - [*-solaris2.[89]]) - hack_shutup_pthreadonceinit=yes - ;; - *-solaris2.1[[0-9]]) - AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], ) - ;; -esac - -case "$hack_shutup_pthreadonceinit" in - yes) - # - # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings. - # - ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" - ;; -esac - -case "$hack_shutup_sigwait" in - yes) - # - # Shut up a -Wmissing-prototypes warning for sigwait(). - # - AC_DEFINE(SHUTUP_SIGWAIT) - ;; -esac - -case "$hack_shutup_sputaux" in - yes) - # - # Shut up a -Wmissing-prototypes warning from <stdio.h>. - # - AC_DEFINE(SHUTUP_SPUTAUX) - ;; -esac - -case "$hack_shutup_stdargcast" in - yes) - # - # Shut up a -Wcast-qual warning from va_start(). - # - AC_DEFINE(SHUTUP_STDARG_CAST) - ;; -esac - -AC_CHECK_HEADERS(strings.h, - 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 -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" - AC_DEFINE(HAVE_IF_NAMETOINDEX, 1, - [Define to 1 if you have the if_nametoindex function.]) - - ;; -*) - ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX" - ;; -esac -AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX) - -AC_CHECK_FUNCS(nanosleep usleep explicit_bzero) - -# -# Machine architecture dependent features -# -have_stdatomic=no -AC_MSG_CHECKING(for usable stdatomic.h) -AC_TRY_COMPILE([ -#include <stdio.h> -#include <stdatomic.h> -], -[ -atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); -], - [AC_MSG_RESULT(yes) - have_stdatomic=yes - ISC_PLATFORM_HAVESTDATOMIC="#define ISC_PLATFORM_HAVESTDATOMIC 1"], - [AC_MSG_RESULT(no) - have_stdatomic=no - ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC"]) - -AC_ARG_ENABLE(atomic, - AS_HELP_STRING([--enable-atomic], - [enable machine specific atomic operations - [default=autodetect]]), - enable_atomic="$enableval", enable_atomic="autodetect") -case "$enable_atomic" in - yes|''|autodetect) - case "$host" in - powerpc-ibm-aix*) - if test "X$GCC" = "Xyes"; then - AC_MSG_CHECKING([if asm("ics"); works]) - AC_TRY_COMPILE(,[ - main() { asm("ics"); exit(0); } - ], - [AC_MSG_RESULT(yes) - use_atomic=yes], - [ - saved_cflags="$CFLAGS" - CFLAGS="$CFLAGS -Wa,-many" - AC_TRY_RUN([ - main() { asm("ics"); exit(0); } - ], - [AC_MSG_RESULT([yes, required -Wa,-many]) - use_atomic=yes], - [AC_MSG_RESULT([no, use_atomic disabled]) - CFLAGS="$saved_cflags" - use_atomic=no], - [AC_MSG_RESULT([cross compile, assume yes]) - CFLAGS="$saved_cflags" - use_atomic=yes]) - ] - ) - else - use_atomic=yes - fi - ;; - *) - use_atomic=yes - ;; - esac - ;; - no) - have_stdatomic=no - ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" - use_atomic=no - arch=noatomic - ;; -esac - -if test "X$have_stdatomic" = "Xyes"; then - AC_MSG_CHECKING(if -latomic is needed to use 64-bit stdatomic.h primitives) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([#include <stdatomic.h>], - [atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);])], - [AC_MSG_RESULT(no) - ISC_ATOMIC_LIBS=""], - [AC_MSG_RESULT(yes) - ISC_ATOMIC_LIBS="-latomic"] - ) - LIBS="$LIBS $ISC_ATOMIC_LIBS" -fi - -AC_SUBST(ISC_PLATFORM_HAVESTDATOMIC) - -ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM" -ISC_PLATFORM_USEGCCASM="#undef ISC_PLATFORM_USEGCCASM" -ISC_PLATFORM_USESTDASM="#undef ISC_PLATFORM_USESTDASM" -ISC_PLATFORM_USEMACASM="#undef ISC_PLATFORM_USEMACASM" -if test "yes" = "$use_atomic"; then - have_atomic=yes # set default - case "$host" in - [i[3456]86-*]) - # XXX: some old x86 architectures actually do not support - # (some of) these operations. Do we need stricter checks? - AC_CHECK_SIZEOF([void *]) - if test $ac_cv_sizeof_void_p = 8; then - arch=x86_64 - have_xaddq=yes - else - arch=x86_32 - fi - ;; - x86_64-*|amd64-*) - AC_CHECK_SIZEOF([void *]) - if test $ac_cv_sizeof_void_p = 8; then - arch=x86_64 - have_xaddq=yes - else - arch=x86_32 - fi - ;; - alpha*-*) - arch=alpha - ;; - powerpc-*|powerpc64-*) - arch=powerpc - ;; - mips-*|mipsel-*|mips64-*|mips64el-*) - arch=mips - ;; - ia64-*) - arch=ia64 - ;; - *) - have_atomic=no - arch=noatomic - ;; - esac - AC_MSG_CHECKING([architecture type for atomic operations]) - AC_MSG_RESULT($arch) -fi - -if test "yes" = "$have_atomic"; then - AC_MSG_CHECKING([compiler support for inline assembly code]) - - compiler=generic - # Check whether the compiler supports the assembly syntax we provide. - if test "X$GCC" = "Xyes"; then - # GCC's ASM extension always works - compiler=gcc - if test $arch = "x86_64"; then - # We can share the same code for gcc with x86_32 - arch=x86_32 - fi - 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]) - AC_TRY_COMPILE(, [ - __asm__ volatile ("li r0, 0x0\n"::); - ], [ - AC_MSG_RESULT(yes) - compiler="mac" - ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1" - ], [AC_MSG_RESULT(no)]) - fi - else - case "$host" in - alpha*-dec-osf*) - # Tru64 compiler has its own syntax for inline - # assembly. - AC_TRY_COMPILE(, [ -#ifndef __DECC -#error "unexpected compiler" -#endif - return (0);], - [compiler=osf],) - ;; - powerpc-ibm-aix*) - compiler=aix - ;; - esac - fi - case "$compiler" in - gcc) - ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1" - ;; - osf) - ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1" - ;; - aix) - ;; - mac) - ;; - *) - # See if the generic __asm function works. If not, - # we need to disable the atomic operations. - AC_TRY_LINK(, [ - __asm("nop") - ], - [compiler="standard" - ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"], - [compiler="not supported (atomic operations disabled)" - have_atomic=no - arch=noatomic ]); - ;; - esac - - AC_MSG_RESULT($compiler) -fi - -if test "yes" = "$have_atomic"; 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" - if test "yes" = "$have_xaddq"; then - ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1" - ISC_PLATFORM_HAVEATOMICSTOREQ="#define ISC_PLATFORM_HAVEATOMICSTOREQ 1" - else - ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ" - ISC_PLATFORM_HAVEATOMICSTOREQ="#undef ISC_PLATFORM_HAVEATOMICSTOREQ" - fi -else - ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD" - ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG" - ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE" - ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ" - ISC_PLATFORM_HAVEATOMICSTOREQ="#undef ISC_PLATFORM_HAVEATOMICSTOREQ" -fi - -AC_SUBST(ISC_PLATFORM_HAVEXADD) -AC_SUBST(ISC_PLATFORM_HAVEXADDQ) -AC_SUBST(ISC_PLATFORM_HAVECMPXCHG) -AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE) -AC_SUBST(ISC_PLATFORM_HAVEATOMICSTOREQ) - -AC_SUBST(ISC_PLATFORM_USEGCCASM) -AC_SUBST(ISC_PLATFORM_USEOSFASM) -AC_SUBST(ISC_PLATFORM_USESTDASM) -AC_SUBST(ISC_PLATFORM_USEMACASM) ISC_ARCH_DIR=$arch AC_SUBST(ISC_ARCH_DIR) # -# Check for __builtin_expect -# -AC_MSG_CHECKING([compiler support for __builtin_expect]) -AC_TRY_LINK(, [ - return (__builtin_expect(1, 1) ? 1 : 0); -], [ - have_builtin_expect=yes - AC_MSG_RESULT(yes) -], [ - have_builtin_expect=no - AC_MSG_RESULT(no) -]) -if test "yes" = "$have_builtin_expect"; then - AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if the compiler supports __builtin_expect.]) -fi - -# -# Check for __builtin_clz -# -AC_MSG_CHECKING([compiler support for __builtin_clz]) -AC_TRY_LINK(, [ - return (__builtin_clz(0xff) == 24 ? 1 : 0); -], [ - have_builtin_clz=yes - AC_MSG_RESULT(yes) -], [ - have_builtin_clz=no - AC_MSG_RESULT(no) -]) -if test "yes" = "$have_builtin_clz"; then - AC_DEFINE(HAVE_BUILTIN_CLZ, 1, [Define to 1 if the compiler supports __builtin_clz.]) -fi - -# -# Activate "rrset-order fixed" or not? -# -AC_ARG_ENABLE(fixed-rrset, - AS_HELP_STRING([--enable-fixed-rrset], - [enable fixed rrset ordering [default=no]]), - enable_fixed="$enableval", enable_fixed="no") -case "$enable_fixed" in - yes) - AC_DEFINE(DNS_RDATASET_FIXED, 1, - [Define to enable "rrset-order fixed" syntax.]) - ;; - no) - ;; - *) - ;; -esac - -# -# Enable response policy rewriting using NS IP addresses -# -AC_ARG_ENABLE(rpz-nsip, - AS_HELP_STRING([--disable-rpz-nsip], - [disable rpz nsip rules [default=enabled]]), - enable_nsip="$enableval", enable_nsip="yes") -case "$enable_nsip" in - yes) - AC_DEFINE(ENABLE_RPZ_NSIP, 1, - [Define to enable rpz-nsip rules.]) - ;; - no) - ;; - *) - ;; -esac - -# -# Enable response policy rewriting using NS name -# -AC_ARG_ENABLE(rpz-nsdname, - AS_HELP_STRING([--disable-rpz-nsdname], - [disable rpz nsdname rules [default=enabled]]), - enable_nsdname="$enableval", enable_nsdname="yes") -case "$enable_nsdname" in - yes) - AC_DEFINE(ENABLE_RPZ_NSDNAME, 1, - [Define to enable rpz-nsdname rules.]) - ;; - no) - ;; - *) - ;; -esac - -# -# Activate recursive fetch limits -# -AC_ARG_ENABLE(fetchlimit, - AS_HELP_STRING([--enable-fetchlimit], - [enable recursive fetch limits [default=no]]), - enable_fetchlimit="$enableval", enable_fetchlimit="no") -case "$enable_fetchlimit" in - yes) - AC_DEFINE(ENABLE_FETCHLIMIT, 1, - [Define to enable the "fetches-per-server" and "fetches-per-zone" options.]) - ;; - no) - ;; - *) - ;; -esac - -# -# Activate "filter-aaaa" or not? -# -AC_ARG_ENABLE(filter-aaaa, - AS_HELP_STRING([--enable-filter-aaaa], - [enable filtering of AAAA records [default=no]]), - enable_filter="$enableval", enable_filter="no") -case "$enable_filter" in - yes) - AC_DEFINE(ALLOW_FILTER_AAAA, 1, - [Define to enable the "filter-aaaa-on-v4" and "filter-aaaa-on-v6" options.]) - ;; - no) - ;; - *) - ;; -esac - -# -# The following sets up how non-blocking i/o is established. -# Sunos, cygwin and solaris 2.x (x<5) require special handling. -# -case "$host" in -*-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);; -*-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);; -*-solaris2.[[01234]]) - 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, - [Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).]) - ;; -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. -# - -# -# Look for TeX. -# - -AC_PATH_PROGS(LATEX, latex, latex) -AC_SUBST(LATEX) - -AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex) -AC_SUBST(PDFLATEX) - -AC_PATH_PROGS(DBLATEX, dblatex, dblatex) -AC_SUBST(DBLATEX) - -# -# Look for w3m -# - -AC_PATH_PROGS(W3M, w3m, w3m) -AC_SUBST(W3M) - -# -# Look for pandoc -# -AC_PATH_PROG(PANDOC, pandoc, pandoc) -AC_SUBST(PANDOC) - - -# -# Look for xsltproc (libxslt) -# - -AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc) -AC_SUBST(XSLTPROC) - -# -# Look for xmllint (libxml2) -# - -AC_PATH_PROG(XMLLINT, xmllint, xmllint) -AC_SUBST(XMLLINT) - -# -# Look for Doxygen -# - -AC_PATH_PROG(DOXYGEN, doxygen, doxygen) -AC_SUBST(DOXYGEN) - -# -# Look for curl -# - -AC_PATH_PROG(CURL, curl, curl) -AC_SUBST(CURL) - -# -# 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, [ -$1="" -AC_MSG_CHECKING(for $2) -for d in $3 -do - f=$d/$2 - if test -f $f - then - $1=$f - AC_MSG_RESULT($f) - break - fi -done -if test "X[$]$1" = "X" -then - AC_MSG_RESULT("not found"); - $1=$2 -fi -AC_SUBST($1) -]) - -# -# 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 -# of at the moment). -# -AC_MSG_CHECKING(for Docbook-XSL path) -AC_ARG_WITH(docbook-xsl, - AS_HELP_STRING([--with-docbook-xsl[=PATH]], - [specify path for Docbook-XSL stylesheets]), - docbook_path="$withval", docbook_path="auto") -case "$docbook_path" in -auto) - AC_MSG_RESULT(auto) - docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook-ns /usr/local/share/xsl/docbook /usr/share/xsl/docbook /opt/local/share/xsl/docbook-xsl /usr/share/xml/docbook/stylesheet/docbook-xsl" - ;; -*) - docbook_xsl_trees="$withval" - AC_MSG_RESULT($docbook_xsl_trees) - ;; -esac - -# -# Look for stylesheets we need. -# - -NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees) -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) -NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees) - -# -# Same dance for dblatex -# -dblatex_xsl_trees="/usr/local/share/xml/docbook/stylesheet/dblatex /usr/pkg/share/xml/docbook/stylesheet/dblatex /usr/share/xml/docbook/stylesheet/dblatex" -NOM_PATH_FILE(XSLT_DBLATEX_STYLE, xsl/docbook.xsl, $dblatex_xsl_trees) -NOM_PATH_FILE(XSLT_DBLATEX_FASTBOOK, xsl/latex_book_fast.xsl, $dblatex_xsl_trees) - -# -# IDN support -# -AC_ARG_WITH(idn, - AS_HELP_STRING([--with-idn[=MPREFIX]], - [enable IDN support using idnkit [default PREFIX]]), - use_idn="$withval", use_idn="no") -case "$use_idn" in -yes) - if test X$prefix = XNONE ; then - idn_path=/usr/local - else - idn_path=$prefix - fi - ;; -no) - ;; -*) - idn_path="$use_idn" - ;; -esac - -iconvinc= -iconvlib= -AC_ARG_WITH(libiconv, - AS_HELP_STRING([--with-libiconv[=IPREFIX]], - [GNU libiconv are in IPREFIX [default PREFIX]]), - use_libiconv="$withval", use_libiconv="no") -case "$use_libiconv" in -yes) - if test X$prefix = XNONE ; then - iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" - else - iconvlib="-L$prefix/lib -R$prefix/lib -liconv" - fi - ;; -no) - iconvlib= - ;; -*) - iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" - ;; -esac - -AC_ARG_WITH(iconv, - AS_HELP_STRING([--with-iconv[=LIBSPEC]], - [specify iconv library [default -liconv]]), - iconvlib="$withval") -case "$iconvlib" in -no) - iconvlib= - ;; -yes) - iconvlib=-liconv - ;; -esac - -AC_ARG_WITH(idnlib, - AS_HELP_STRING([--with-idnlib=ARG], [specify libidnkit]), - idnlib="$withval", idnlib="no") -if test "yes" = "$idnlib"; then - AC_MSG_ERROR([You must specify ARG for --with-idnlib.]) -fi - -IDNLIBS= -if test "no" != "$use_idn"; then - AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.]) - STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" - if test "no" != "$idnlib"; then - IDNLIBS="$idnlib $iconvlib" - else - IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" - fi -fi -AC_SUBST(IDNLIBS) - -# -# Check whether to build Automated Test Framework unit tests -# -AC_ARG_WITH(atf, - AS_HELP_STRING([--with-atf],[support Automated Test Framework]), - atf="$withval", atf="no") -if test "yes" = "$atf"; then - atf=`pwd`/unit/atf - ATFBUILD=atf-src - AC_SUBST(ATFBUILD) - AC_CONFIG_COMMANDS([atf-config], - [( - mkdir -p unit/atf-src; - cd unit/atf-src; - case "$srcdir" in - /*) ;; - *) srcdir="../../$srcdir";; - esac - ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" --enable-tools --disable-shared MISSING=: --prefix $atfdir; - ) || AC_MSG_ERROR([Failed to configure ATF.]) ], - [atfdir=`pwd`/unit/atf]) - AC_MSG_RESULT(building ATF from bind9/unit/atf-src) -fi - -ATFLIBS= -if test "no" != "$atf"; then - AC_DEFINE(ATF_TEST, 1, [define if ATF unit tests are to be built.]) - STD_CINCLUDES="$STD_CINCLUDES -I$atf/include" - ATFBIN="$atf/bin" - ATFLIBS="-L$atf/lib -latf-c" - UNITTESTS=tests -fi -AC_SUBST(ATFBIN) -AC_SUBST(ATFLIBS) -AC_SUBST(UNITTESTS) - -AC_CHECK_HEADERS(locale.h) -AC_CHECK_FUNCS(setlocale) - -# -# was --with-tuning specified? -# -AC_ARG_WITH(tuning, - AS_HELP_STRING([--with-tuning=ARG], - [Specify server tuning (large or default)]), - use_tuning="$withval", use_tuning="no") - -case "$use_tuning" in - large) - AC_MSG_ERROR([Large-system tuning requires threads.]) - AC_DEFINE(TUNE_LARGE, 1, [Define to use large-system tuning.]) - AC_MSG_RESULT(using large-system tuning) - ;; - no|default) - AC_MSG_RESULT(using default tuning) - ;; - yes|*) - AC_MSG_ERROR([You must specify "large" or "default" for --with-tuning.]) - ;; -esac - -# -# was --enable-querytrace specified? -# -AC_ARG_ENABLE(querytrace, - AS_HELP_STRING([--enable-querytrace], - [enable very verbose query trace logging - [default=no]]), - want_querytrace="$enableval", want_querytrace="no") - -AC_MSG_CHECKING([whether to enable query trace logging]) -case "$want_querytrace" in -yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WANT_QUERYTRACE, 1, [Define to enable very verbose query trace logging.]) - ;; -no) - AC_MSG_RESULT(no) - ;; -*) - AC_MSG_ERROR("--enable-querytrace requires yes or no") - ;; -esac - -# # Substitutions # AC_SUBST(BIND9_TOP_BUILDDIR) @@ -4253,155 +502,6 @@ LIBDNS_MAPAPI="$srcdir/lib/dns/mapapi" AC_SUBST_FILE(LIBLWRES_API) LIBLWRES_API="$srcdir/lib/lwres/api" -# -# Configure any DLZ drivers. -# -# If config.dlz.in selects one or more DLZ drivers, it will set -# CONTRIB_DLZ to a non-empty value, which will be our clue to -# build DLZ drivers in contrib. -# -# This section has to come after the libtool stuff because it needs to -# know how to name the driver object files. -# - -CONTRIB_DLZ="" -DLZ_DRIVER_INCLUDES="" -DLZ_DRIVER_LIBS="" -DLZ_DRIVER_SRCS="" -DLZ_DRIVER_OBJS="" -DLZ_SYSTEM_TEST="" - -# -# Configure support for building a shared library object -# -# Even when libtool is available it can't always be relied upon -# to build an object that can be dlopen()'ed, but this is necessary -# for building the dlzexternal system test, so we'll try it the -# old-fashioned way. -# -SO="so" -SO_CFLAGS="" -SO_LDFLAGS="" -SO_LD="" -SO_TARGETS="" - -AC_ARG_WITH(dlopen, - AS_HELP_STRING([--with-dlopen=ARG], - [support dynamically loadable DLZ drivers]), - dlopen="$withval", dlopen="yes") - -case $host in - *-sunos*) dlopen="no" - ;; -esac - -if test "yes" = "$dlopen"; then - AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) - if test "yes" = "$have_dl"; then - LIBS="-ldl $LIBS" - fi - AC_CHECK_FUNCS(dlopen dlclose dlsym,,dlopen=no) -fi - -if test "yes" = "$dlopen"; then - case $host in - *-linux*|*-gnu*) - SO_CFLAGS="-fPIC" - SO_LDFLAGS="" - if test "yes" = "$have_dl" - then - if test "yes" = "$use_libtool"; then - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - else - SO_LDFLAGS="-shared" - SO_LD="${CC}" - fi - else - SO_LDFLAGS="-shared" - SO_LD="ld" - fi - ;; - *-freebsd*|*-openbsd*) - SO_CFLAGS="-fpic" - if test "yes" = "$use_libtool"; then - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - else - SO_LDFLAGS="-shared" - SO_LD="${CC}" - fi - ;; - *-netbsd*) - SO_CFLAGS="-fpic" - SO_LDFLAGS="-Bshareable -x" - SO_LD="ld" - ;; - *-solaris*) - SO_CFLAGS="-KPIC" - SO_LDFLAGS="-G -z text" - SO_LD="ld" - ;; - *-hp-hpux*) - SO=sl - SO_CFLAGS="+z" - SO_LDFLAGS="-b +vnocompatwarnings" - SO_LD="ld" - ;; - *) - SO_CFLAGS="-fPIC" - ;; - esac - - if test "X$GCC" = "Xyes"; then - SO_CFLAGS="-fPIC" - if test -z "$SO_LD" - then - if test "yes" = "$use_libtool"; then - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - else - SO_LDFLAGS="-shared" - SO_LD="${CC}" - fi - fi - fi - - # If we still don't know how to make shared objects, don't make any. - if test -n "$SO_LD"; then - SO_TARGETS="\${SO_TARGETS}" - AC_DEFINE(ISC_DLZ_DLOPEN, 1, - [Define to allow building of objects for dlopen().]) - fi -fi - -AC_SUBST(SO) -AC_SUBST(SO_CFLAGS) -AC_SUBST(SO_LDFLAGS) -AC_SUBST(SO_LD) -AC_SUBST(SO_TARGETS) - -sinclude(contrib/dlz/config.dlz.in) -AC_MSG_CHECKING(contributed DLZ drivers) - -if test -n "$CONTRIB_DLZ" -then - AC_MSG_RESULT(yes) - DLZ_DRIVER_RULES=contrib/dlz/drivers/rules - AC_CONFIG_FILES([$DLZ_DRIVER_RULES]) -else - AC_MSG_RESULT(no) - DLZ_DRIVER_RULES=/dev/null -fi - -AC_SUBST(CONTRIB_DLZ) -AC_SUBST(DLZ_DRIVER_INCLUDES) -AC_SUBST(DLZ_DRIVER_LIBS) -AC_SUBST(DLZ_DRIVER_SRCS) -AC_SUBST(DLZ_DRIVER_OBJS) -AC_SUBST(DLZ_SYSTEM_TEST) -AC_SUBST_FILE(DLZ_DRIVER_RULES) - if test "yes" = "$cross_compiling"; then if test -z "$BUILD_CC"; then AC_MSG_ERROR([BUILD_CC not set]) diff --git a/usr.sbin/bind/lib/dns/Makefile.in b/usr.sbin/bind/lib/dns/Makefile.in index 00a9373f18c..d2c269b43f0 100644 --- a/usr.sbin/bind/lib/dns/Makefile.in +++ b/usr.sbin/bind/lib/dns/Makefile.in @@ -29,9 +29,9 @@ top_srcdir = @top_srcdir@ @BIND9_MAKE_INCLUDES@ CINCLUDES = -I. -I${top_srcdir}/lib/dns -Iinclude ${DNS_INCLUDES} \ - ${ISC_INCLUDES} @DST_OPENSSL_INC@ + ${ISC_INCLUDES} -CDEFINES = -DUSE_MD5 @CRYPTO@ +CDEFINES = -DUSE_MD5 CWARNINGS = @@ -47,10 +47,10 @@ OPENSSLGOSTLINKOBJS = opensslgost_link.@O@ OPENSSLECDSALINKOBJS = opensslecdsa_link.@O@ OPENSSLEDDSALINKOBJS = openssleddsa_link.@O@ OPENSSLLINKOBJS = openssl_link.@O@ openssldh_link.@O@ openssldsa_link.@O@ \ - @OPENSSLECDSALINKOBJS@ @OPENSSLEDDSALINKOBJS@ \ - @OPENSSLGOSTLINKOBJS@ opensslrsa_link.@O@ + ${OPENSSLECDSALINKOBJS} \ + opensslrsa_link.@O@ -DSTOBJS = @DST_EXTRA_OBJS@ @OPENSSLLINKOBJS@ \ +DSTOBJS = ${OPENSSLLINKOBJS} \ dst_api.@O@ dst_parse.@O@ dst_result.@O@ \ hmac_link.@O@ key.@O@ @@ -103,7 +103,7 @@ SRCS = ${DSTSRCS} ${DNSSRCS} SUBDIRS = include TARGETS = timestamp -TESTDIRS = @UNITTESTS@ +TESTDIRS = DEPENDEXTRA = ./gen -F include/dns/rdatastruct.h \ -s ${srcdir} -d >> Makefile ; @@ -118,7 +118,7 @@ libdns.la: ${OBJS} ${LIBTOOL_MODE_LINK} \ ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libdns.la -rpath ${libdir} \ -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ ${LIBS} + ${OBJS} ${ISCLIBS} -lcrypto ${LIBS} include: gen ${MAKE} include/dns/enumtype.h diff --git a/usr.sbin/bind/lib/isc/Makefile.in b/usr.sbin/bind/lib/isc/Makefile.in index c049cd123d4..a837b7f135f 100644 --- a/usr.sbin/bind/lib/isc/Makefile.in +++ b/usr.sbin/bind/lib/isc/Makefile.in @@ -23,12 +23,12 @@ top_srcdir = @top_srcdir@ CINCLUDES = -I${srcdir}/unix/include \ -I${srcdir}/nothreads/include \ -I./include \ - -I${srcdir}/include ${DNS_INCLUDES} @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ + -I${srcdir}/include ${DNS_INCLUDES} +CDEFINES = CWARNINGS = # Alphabetically -UNIXOBJS = @ISC_ISCIPV6_O@ @ISC_ISCPK11_API_O@ \ +UNIXOBJS = \ unix/app.@O@ unix/dir.@O@ unix/errno.@O@ \ unix/errno2result.@O@ unix/file.@O@ unix/fsaccess.@O@ \ unix/net.@O@ \ @@ -40,7 +40,7 @@ THREADOPTOBJS = nothreads/condition.@O@ THREADOBJS = nothreads/thread.@O@ # Alphabetically -OBJS = @ISC_EXTRA_OBJS@ @ISC_PK11_O@ @ISC_PK11_RESULT_O@ \ +OBJS = \ aes.@O@ assertions.@O@ base32.@O@ base64.@O@ \ buffer.@O@ bufferlist.@O@ \ commandline.@O@ error.@O@ event.@O@ \ @@ -58,7 +58,7 @@ OBJS = @ISC_EXTRA_OBJS@ @ISC_PK11_O@ @ISC_PK11_RESULT_O@ \ ${UNIXOBJS} ${THREADOBJS} # Alphabetically -SRCS = @ISC_EXTRA_SRCS@ @ISC_PK11_C@ @ISC_PK11_RESULT_C@ \ +SRCS = \ aes.c assertions.c base32.c base64.c \ buffer.c bufferlist.c commandline.c \ error.c event.c heap.c hex.c hmacmd5.c hmacsha.c \ diff --git a/usr.sbin/bind/lib/isc/unix/Makefile.in b/usr.sbin/bind/lib/isc/unix/Makefile.in index 9cb000d8478..8e526d6fa41 100644 --- a/usr.sbin/bind/lib/isc/unix/Makefile.in +++ b/usr.sbin/bind/lib/isc/unix/Makefile.in @@ -20,13 +20,13 @@ CINCLUDES = -I${srcdir}/include \ -I${srcdir}/../nothreads/include \ -I../include \ -I${srcdir}/../include \ - -I${srcdir}/.. @ISC_OPENSSL_INC@ + -I${srcdir}/.. -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = # Alphabetically -OBJS = @ISC_IPV6_O@ @ISC_PK11_API_O@ \ +OBJS = \ app.@O@ dir.@O@ errno.@O@ errno2result.@O@ \ file.@O@ fsaccess.@O@ \ net.@O@ \ diff --git a/usr.sbin/bind/lib/isccfg/Makefile.in b/usr.sbin/bind/lib/isccfg/Makefile.in index 2c4199f58a1..7c695a5ad22 100644 --- a/usr.sbin/bind/lib/isccfg/Makefile.in +++ b/usr.sbin/bind/lib/isccfg/Makefile.in @@ -12,7 +12,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.9 2020/01/22 07:46:26 deraadt Exp $ +# $Id: Makefile.in,v 1.10 2020/01/24 09:04:48 florian Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -58,7 +58,7 @@ libisccfg.la: ${OBJS} ${LIBTOOL_MODE_LINK} \ ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisccfg.la -rpath ${libdir} \ -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${DNSLIBS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ \ + ${OBJS} ${DNSLIBS} ${ISCLIBS} -lcrypto \ ${LIBS} timestamp: libisccfg.@A@ diff --git a/usr.sbin/bind/make/rules.in b/usr.sbin/bind/make/rules.in index e8d8bff1933..dbf0be5bda9 100644 --- a/usr.sbin/bind/make/rules.in +++ b/usr.sbin/bind/make/rules.in @@ -123,7 +123,7 @@ BUILD_LIBS = @BUILD_LIBS@ .SUFFIXES: .c .@O@ ALWAYS_INCLUDES = -I${top_builddir} -I${top_srcdir} -ALWAYS_DEFINES = @ALWAYS_DEFINES@ +ALWAYS_DEFINES = ALWAYS_WARNINGS = ALL_CPPFLAGS = \ @@ -142,7 +142,6 @@ LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@ LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@ LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@ LIBTOOL_MODE_UNINSTALL = ${LIBTOOL} @LIBTOOL_MODE_UNINSTALL@ -PURIFY = @PURIFY@ MKDEP = ${SHELL} ${top_builddir}/make/mkdep @@ -190,7 +189,7 @@ MKDEP = ${SHELL} ${top_builddir}/make/mkdep ### ${FINALBUILDCMD} ### See bin/check/Makefile.in for a complete example of the use of LIBS0. ### -FINALBUILDCMD = ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ +FINALBUILDCMD = ${LIBTOOL_MODE_LINK} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ -o $@ $${BASEOBJS} $${LIBS0} ${LIBS}; cleandir: distclean |