diff options
author | des <des@FreeBSD.org> | 2014-07-29 20:57:38 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2014-07-29 20:57:38 +0000 |
commit | fe6d9379787eb938c503444ce243caa89cc7b08c (patch) | |
tree | 5cc01e837e3c2f3dfb21ef0136ca69be1f957059 /contrib/unbound/configure | |
parent | 1f52ac9340be3979c9bf100fe65c551bcd870cc6 (diff) | |
download | FreeBSD-src-fe6d9379787eb938c503444ce243caa89cc7b08c.zip FreeBSD-src-fe6d9379787eb938c503444ce243caa89cc7b08c.tar.gz |
MFH (r266114, r266138): upgrade to latest ldns and unbound
MFH (r266139-r266143, r266145, r266149, r266150): fix props
MFH (r266179, r266180, r266193, r266238, r266777): misc cleanup
MFH (r266863): create and use /var/unbound/conf.d
MFH (r268839): import unblock-lan-zones patch from upstream
MFH (r268840): fix reverse lookups on private networks
MFH (r268883): avoid spamming source tree during build
PR: 190739 (for r268883)
Diffstat (limited to 'contrib/unbound/configure')
-rwxr-xr-x | contrib/unbound/configure | 762 |
1 files changed, 474 insertions, 288 deletions
diff --git a/contrib/unbound/configure b/contrib/unbound/configure index 8d3a181..5672b39 100755 --- a/contrib/unbound/configure +++ b/contrib/unbound/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.4.20. +# Generated by GNU Autoconf 2.69 for unbound 1.4.22. # # Report bugs to <unbound-bugs@nlnetlabs.nl>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.4.20' -PACKAGE_STRING='unbound 1.4.20' +PACKAGE_VERSION='1.4.22' +PACKAGE_STRING='unbound 1.4.22' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -632,7 +632,7 @@ ac_includes_default="\ #endif" ac_subst_vars='LTLIBOBJS -ldnsdir +INSTALLTARGET ALLTARGET SOURCEFILE SOURCEDETERMINE @@ -651,6 +651,8 @@ WINAPPS WINDRES CHECKLOCK_OBJ staticexe +UNBOUND_EVENT_UNINSTALL +UNBOUND_EVENT_INSTALL HAVE_SSL CONFIG_DATE NETBSD_LINTFLAGS @@ -677,7 +679,7 @@ PYTHON_VERSION PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC -acx_pthread_config +ax_pthread_config RUNTIME_PATH LIBOBJS OTOOL64 @@ -739,6 +741,9 @@ CC LIBUNBOUND_AGE LIBUNBOUND_REVISION LIBUNBOUND_CURRENT +UNBOUND_VERSION_MICRO +UNBOUND_VERSION_MINOR +UNBOUND_VERSION_MAJOR target_alias host_alias build_alias @@ -790,6 +795,7 @@ with_rootcert_file with_username enable_checking enable_debug +enable_flto enable_shared enable_static with_pic @@ -811,13 +817,13 @@ with_ssl enable_sha2 enable_gost enable_ecdsa +enable_event_api with_libevent with_libexpat enable_static_exe enable_lock_checks enable_allsymbols with_libunbound_only -with_ldns ' ac_precious_vars='build_alias host_alias @@ -1371,7 +1377,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.4.20 to adapt to many kinds of systems. +\`configure' configures unbound 1.4.22 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1436,7 +1442,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.4.20:";; + short | recursive ) echo "Configuration of unbound 1.4.22:";; esac cat <<\_ACEOF @@ -1446,6 +1452,7 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-checking Enable warnings, asserts, makefile-dependencies --enable-debug same as enable-checking + --disable-flto Disable link-time optimization (gcc specific option) --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1464,8 +1471,10 @@ Optional Features: --disable-sha2 Disable SHA256 and SHA512 RRSIG support --disable-gost Disable GOST support --disable-ecdsa Disable ECDSA support + --enable-event-api Enable (experimental) libevent-based libunbound API + installed to unbound-event.h --enable-static-exe enable to compile executables statically against - event, ldns libs, for debug purposes + (event) libs, for debug purposes --enable-lock-checks enable to check lock and unlock calls, for debug purposes --enable-allsymbols export all symbols from libunbound and link binaries @@ -1516,7 +1525,6 @@ Optional Packages: outgoing port ranges. --with-libexpat=path specify explicit path for libexpat. --with-libunbound-only do not build daemon and tool programs - --with-ldns=PATH specify prefix of path of ldns library to use Some influential environment variables: CC C compiler command @@ -1604,7 +1612,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.4.20 +unbound configure 1.4.22 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2024,6 +2032,189 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type +# 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 + # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @@ -2130,7 +2321,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.4.20, which was +It was created by unbound $as_me 1.4.22, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2478,10 +2669,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +UNBOUND_VERSION_MAJOR=1 -LIBUNBOUND_CURRENT=3 -LIBUNBOUND_REVISION=5 -LIBUNBOUND_AGE=1 +UNBOUND_VERSION_MINOR=4 + +UNBOUND_VERSION_MICRO=22 + + +LIBUNBOUND_CURRENT=4 +LIBUNBOUND_REVISION=1 +LIBUNBOUND_AGE=2 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 # 1.0.2 had 0:14:0 @@ -2516,7 +2713,8 @@ LIBUNBOUND_AGE=1 # 1.4.17 had 3:2:1 # 1.4.18 had 3:3:1 # 1.4.19 had 3:4:1 -# 1.4.20 had 4:0:2 # adds libunbound.ttl +# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1 +# 1.4.21 had 4:1:2 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -3790,6 +3988,11 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } +if test "$ac_cv_header_minix_config_h" = "yes"; then + +$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h + +fi case "$prefix" in NONE) @@ -3971,7 +4174,7 @@ _ACEOF $as_echo "#define WINVER 0x0502" >>confdefs.h -wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' ` +wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' ` cat >>confdefs.h <<_ACEOF @@ -4078,7 +4281,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -4109,7 +4312,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -4699,7 +4902,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -4730,7 +4933,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -4763,7 +4966,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -4794,7 +4997,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -5461,7 +5664,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -5492,7 +5695,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -5523,7 +5726,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -5554,7 +5757,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -5584,11 +5787,19 @@ $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h # nothing to do. ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5 + + # Check whether --enable-flto was given. +if test "${enable_flto+set}" = set; then : + enableval=$enable_flto; +fi + + if test "x$enable_flto" != "xno"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5 $as_echo_n "checking if $CC supports -flto... " >&6; } -BAKCFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -flto" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + BAKCFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -flto" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5601,15 +5812,15 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : - if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then - CFLAGS="$BAKCFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + CFLAGS="$BAKCFLAGS" + { $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 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - fi - rm -f conftest conftest.c conftest.o + fi + rm -f conftest conftest.c conftest.o else CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -5618,6 +5829,8 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } @@ -13793,6 +14006,53 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi +# 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 time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if ${ac_cv_sizeof_time_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" " +$ac_includes_default +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + +"; then : + +else + if test "$ac_cv_type_time_t" = 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 (time_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_time_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t +_ACEOF + + + # add option to disable the evil rpath # Check whether --enable-rpath was given. @@ -15002,14 +15262,13 @@ ub_have_pthreads=no if test x_$withval != x_no; then - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -acx_pthread_ok=no +ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). @@ -15044,13 +15303,13 @@ return pthread_join (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - acx_pthread_ok=yes + ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test x"$acx_pthread_ok" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi @@ -15068,7 +15327,7 @@ fi # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -15090,8 +15349,8 @@ acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -m # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case "${host_cpu}-${host_os}" in - *solaris*) +case ${host_os} in + solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based @@ -15101,12 +15360,16 @@ case "${host_cpu}-${host_os}" in # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + ax_pthread_flags="-pthread $ax_pthread_flags" ;; esac -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do case $flag in none) @@ -15120,16 +15383,16 @@ $as_echo_n "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" ;; - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; 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_prog_acx_pthread_config+:} false; then : +if ${ac_cv_prog_ax_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$acx_pthread_config"; then - ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -15138,7 +15401,7 @@ do 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_prog_acx_pthread_config="yes" + ac_cv_prog_ax_pthread_config="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -15146,23 +15409,23 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" fi fi -acx_pthread_config=$ac_cv_prog_acx_pthread_config -if test -n "$acx_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 -$as_echo "$acx_pthread_config" >&6; } +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 @@ -15188,18 +15451,23 @@ $as_echo_n "checking for the pthreads library -l$flag... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pthread.h> + static void routine(void *a) { *((int*)a) = 0; } + static void *start_routine(void *a) { return a; } int main () { -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - acx_pthread_ok=yes + ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -15207,9 +15475,9 @@ rm -f core conftest.err conftest.$ac_objext \ LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test "x$acx_pthread_ok" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then break; fi @@ -15219,24 +15487,24 @@ done fi # Various other checks: -if test "x$acx_pthread_ok" = xyes; then +if test "x$ax_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pthread.h> int main () { -int attr=$attr; return attr; +int attr = $attr; return attr /* ; */ ; return 0; } @@ -15246,7 +15514,7 @@ if ac_fn_c_try_link "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - done + done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 $as_echo "$attr_name" >&6; } if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then @@ -15260,9 +15528,16 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 $as_echo_n "checking if more special flags are required for pthreads... " >&6; } flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 $as_echo "${flag}" >&6; } @@ -15270,12 +15545,58 @@ $as_echo "${flag}" >&6; } PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <pthread.h> +int +main () +{ +int i = PTHREAD_PRIO_INHERIT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else + ax_cv_PTHREAD_PRIO_INHERIT=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then : + +$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + +fi + LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - for ac_prog in xlc_r cc_r + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r; then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -15316,21 +15637,25 @@ fi test -n "$PTHREAD_CC" && break done -test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" - - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi fi +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then +if test x"$ax_pthread_ok" = xyes; then $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h @@ -15363,7 +15688,7 @@ fi : else - acx_pthread_ok=no + ax_pthread_ok=no fi ac_ext=c @@ -15457,7 +15782,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then : $as_echo_n "(cached) " >&6 else -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_$cache=yes" else @@ -16570,7 +16895,7 @@ else #include <openssl/evp.h> #include <openssl/engine.h> #include <openssl/conf.h> -/* routine to load gost from ldns */ +/* routine to load gost (from sldns) */ int load_gost_id(void) { static int gost_id = 0; @@ -16760,6 +17085,20 @@ _ACEOF ;; esac +# Check whether --enable-event-api was given. +if test "${enable_event_api+set}" = set; then : + enableval=$enable_event_api; +fi + +use_unbound_event="no" +case "$enable_event_api" in + yes) + use_unbound_event="yes" + ;; + *) + ;; +esac + # check for libevent # Check whether --with-libevent was given. @@ -16777,7 +17116,7 @@ $as_echo_n "checking for libevent... " >&6; } fi for dir in $withval; do thedir="$dir" - if test -f "$dir/include/event.h"; then + if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then found_libevent="yes" if test "$thedir" != "/usr"; then CPPFLAGS="$CPPFLAGS -I$thedir/include" @@ -16814,8 +17153,18 @@ large outgoing port ranges. " "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5 $as_echo "found in $thedir" >&6; } - if test "$thedir" != "/usr" -a "$thedir" != ""; then - LDFLAGS="$LDFLAGS -L$thedir/lib" + if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then + LDFLAGS="$LDFLAGS -L$thedir/lib/event2" + + if test "x$enable_rpath" = xyes; then + if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then + RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2" + fi + fi + + else + if test "$thedir" != "/usr" -a "$thedir" != ""; then + LDFLAGS="$LDFLAGS -L$thedir/lib" if test "x$enable_rpath" = xyes; then if echo "$thedir/lib" | grep "^/" >/dev/null; then @@ -16823,6 +17172,7 @@ $as_echo "found in $thedir" >&6; } fi fi + fi fi fi # check for library used by libevent after 1.3c @@ -17090,6 +17440,12 @@ done if test -n "$BAK_LDFLAGS_SET"; then LDFLAGS="$BAK_LDFLAGS" fi + if test "$use_unbound_event" = "yes"; then + UNBOUND_EVENT_INSTALL=unbound-event-install + + UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall + + fi else $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h @@ -17577,7 +17933,7 @@ if test "$ac_res" != no; then : fi -for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex +for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent 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" @@ -17698,6 +18054,20 @@ esac fi +ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" +if test "x$ac_cv_func_strlcat" = xyes; then : + $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strlcat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" + ;; +esac + +fi + + ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" if test "x$ac_cv_func_strlcpy" = xyes; then : $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h @@ -17835,204 +18205,20 @@ rm -f conftest.lo # see if we want to build the library or everything ALLTARGET="alltargets" +INSTALLTARGET="install-all" # Check whether --with-libunbound-only was given. if test "${with_libunbound_only+set}" = set; then : withval=$with_libunbound_only; if test "$withval" = "yes"; then ALLTARGET="lib" + INSTALLTARGET="install-lib" fi fi -# check this after all other compilation checks, since the linking of the lib -# may break checks after this. - -# Check whether --with-ldns was given. -if test "${with_ldns+set}" = set; then : - withval=$with_ldns; - if test "$withval" != "yes"; then - if test "$withval" != "/usr" -a "$withval" != ""; then - CPPFLAGS="-I$withval/include $CPPFLAGS" - LDFLAGS="-L$withval/lib $LDFLAGS" - - if test "x$enable_rpath" = xyes; then - if echo "$withval/lib" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib" - fi - fi - - fi - ldnsdir="$withval" - - fi - -fi - - -# check if ldns is good enough -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns_rr_new in -lldns" >&5 -$as_echo_n "checking for ldns_rr_new in -lldns... " >&6; } -if ${ac_cv_lib_ldns_ldns_rr_new+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lldns $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 ldns_rr_new (); -int -main () -{ -return ldns_rr_new (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ldns_ldns_rr_new=yes -else - ac_cv_lib_ldns_ldns_rr_new=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_ldns_ldns_rr_new" >&5 -$as_echo "$ac_cv_lib_ldns_ldns_rr_new" >&6; } -if test "x$ac_cv_lib_ldns_ldns_rr_new" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBLDNS 1 -_ACEOF - - LIBS="-lldns $LIBS" - -else - - as_fn_error $? "No ldns library found, install the ldns library into system lib dir or use --with-ldns=path to other location. The --with-ldns can point to the make-dir of ldns. Install the package ldns or download source http://www.nlnetlabs.nl/projects/ldns" "$LINENO" 5 - -fi - -ac_fn_c_check_func "$LINENO" "ldns_buffer_copy" "ac_cv_func_ldns_buffer_copy" -if test "x$ac_cv_func_ldns_buffer_copy" = xyes; then : - -fi - -if test $USE_NSS = "no"; then - ac_fn_c_check_func "$LINENO" "ldns_key_buf2rsa_raw" "ac_cv_func_ldns_key_buf2rsa_raw" -if test "x$ac_cv_func_ldns_key_buf2rsa_raw" = xyes; then : - -fi - -else - ac_cv_func_ldns_key_buf2rsa_raw="yes" -fi -ac_fn_c_check_func "$LINENO" "ldns_get_random" "ac_cv_func_ldns_get_random" -if test "x$ac_cv_func_ldns_get_random" = xyes; then : - -fi - -ac_fn_c_check_func "$LINENO" "ldns_b32_ntop_extended_hex" "ac_cv_func_ldns_b32_ntop_extended_hex" -if test "x$ac_cv_func_ldns_b32_ntop_extended_hex" = xyes; then : - -fi - -if test x$use_gost = xyes -a x$USE_NSS = xno; then - ac_fn_c_check_func "$LINENO" "ldns_key_EVP_load_gost_id" "ac_cv_func_ldns_key_EVP_load_gost_id" -if test "x$ac_cv_func_ldns_key_EVP_load_gost_id" = xyes; then : - -fi - - for ac_func in ldns_key_EVP_unload_gost -do : - ac_fn_c_check_func "$LINENO" "ldns_key_EVP_unload_gost" "ac_cv_func_ldns_key_EVP_unload_gost" -if test "x$ac_cv_func_ldns_key_EVP_unload_gost" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LDNS_KEY_EVP_UNLOAD_GOST 1 -_ACEOF - -fi -done - -else - ac_cv_func_ldns_key_EVP_load_gost_id="yes" -fi -if test x$use_ecdsa = xyes; then - ac_fn_c_check_decl "$LINENO" "LDNS_ECDSAP384SHA384" "ac_cv_have_decl_LDNS_ECDSAP384SHA384" " -$ac_includes_default -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif -#ifdef HAVE_WS2TCPIP_H -# include <ws2tcpip.h> -#endif -#include <ldns/ldns.h> - -" -if test "x$ac_cv_have_decl_LDNS_ECDSAP384SHA384" = xyes; then : - -fi - -else - ac_cv_have_decl_LDNS_ECDSAP384SHA384="yes" -fi -for ac_header in ldns/ldns.h -do : - ac_fn_c_check_header_compile "$LINENO" "ldns/ldns.h" "ac_cv_header_ldns_ldns_h" "$ac_includes_default -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif - -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif - -#ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif - -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif - -#ifdef HAVE_WS2TCPIP_H -#include <ws2tcpip.h> -#endif - -" -if test "x$ac_cv_header_ldns_ldns_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LDNS_LDNS_H 1 -_ACEOF - -else - - as_fn_error $? "No ldns include file found, install the ldns library development files. Install package ldns-dev or ldns-devel or download source http://www.nlnetlabs.nl/projects/ldns" "$LINENO" 5 - -fi - -done - -if test $ac_cv_func_ldns_buffer_copy = yes \ - -a $ac_cv_func_ldns_key_buf2rsa_raw = yes \ - -a $ac_cv_func_ldns_get_random = yes \ - -a $ac_cv_header_ldns_ldns_h = yes \ - -a $ac_cv_func_ldns_b32_ntop_extended_hex = yes \ - -a $ac_cv_func_ldns_key_EVP_load_gost_id = yes \ - -a $ac_cv_have_decl_LDNS_ECDSAP384SHA384 = yes; then - : -else - as_fn_error $? "ldns library is not recent, update the ldns library, install it into system lib dir or use --with-ldns=path to other location. The --with-ldns can point to the make-dir of ldns. Package libldns or download source http://www.nlnetlabs.nl/projects/ldns" "$LINENO" 5 -fi { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5 @@ -18622,7 +18808,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.4.20, which was +This file was extended by unbound $as_me 1.4.22, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18688,7 +18874,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.4.20 +unbound config.status 1.4.22 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" |