diff --git a/configure b/configure index 798d8d014f..fdea9e7600 100755 --- a/configure +++ b/configure @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# From configure.in Revision: 1.179 +# From configure.in Revision: 1.180 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ## Copyright (C) 1996-1999 Free Software Foundation, Inc. @@ -1044,9 +1044,8 @@ esac # # Decide whether to use multithreading or not. # -enable_threads=yes echo $ac_n "checking whether to use threads""... $ac_c" 1>&6 -echo "configure:1050: checking whether to use threads" >&5 +echo "configure:1049: checking whether to use threads" >&5 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" @@ -1054,14 +1053,14 @@ if test "${enable_threads+set}" = set; then fi case "$enable_threads" in - yes) + yes|'') echo "$ac_t""yes" 1>&6 ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" ;; no) echo "$ac_t""no" 1>&6 ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" ;; *) - { echo "configure: error: "--enable-threads take yes or no"" 1>&2; exit 1; } ;; + { echo "configure: error: "--enable-threads takes yes or no"" 1>&2; exit 1; } ;; esac @@ -1115,14 +1114,14 @@ fi # Find the machine's endian flavor. # echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1119: checking whether byte ordering is bigendian" >&5 +echo "configure:1118: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1133,11 +1132,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1148,7 +1147,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1168,7 +1167,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1209,7 +1208,7 @@ fi # was --with-openssl specified? # echo $ac_n "checking for compatible OpenSSL library""... $ac_c" 1>&6 -echo "configure:1213: checking for compatible OpenSSL library" >&5 +echo "configure:1212: checking for compatible OpenSSL library" >&5 # Check whether --with-openssl or --without-openssl was given. if test "${with_openssl+set}" = set; then withval="$with_openssl" @@ -1266,7 +1265,7 @@ esac # was --with-gssapi specified? # echo $ac_n "checking for GSSAPI library""... $ac_c" 1>&6 -echo "configure:1270: checking for GSSAPI library" >&5 +echo "configure:1269: checking for GSSAPI library" >&5 # Check whether --with-gssapi or --without-gssapi was given. if test "${with_gssapi+set}" = set; then withval="$with_gssapi" @@ -1302,7 +1301,7 @@ esac # was --with-randomdev specified? # echo $ac_n "checking for random device""... $ac_c" 1>&6 -echo "configure:1306: checking for random device" >&5 +echo "configure:1305: checking for random device" >&5 # Check whether --with-randomdev or --without-randomdev was given. if test "${with_randomdev+set}" = set; then withval="$with_randomdev" @@ -1346,62 +1345,10 @@ EOF ;; esac -# -# NetBSD has multiple pthreads implementations. The recommended -# one to use is "unproven-pthreads". The older "mit-pthreads" -# may also work on some NetBSD versions. The PTL2 thread -# library does not currently work with bind9, but can be -# chosen with the --with-ptl2 option for those who wish to -# experiment with it. -# - -case "$host" in - *-netbsd*) - CC="gcc" - echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 -echo "configure:1363: checking which NetBSD thread library to use" >&5 - - # Check whether --with-ptl2 or --without-ptl2 was given. -if test "${with_ptl2+set}" = set; then - withval="$with_ptl2" - use_ptl2="$withval" -else - use_ptl2="no" -fi - - - : ${LOCALBASE:=/usr/pkg} - - if test "X$use_ptl2" = "Xyes" - then - echo "$ac_t""PTL2" 1>&6 - echo "configure: warning: linking with PTL2 is highly experimental and not expected to work" 1>&2 - CC=ptlgcc - else - echo "$ac_t""mit-pthreads/unproven-pthreads" 1>&6 - - if test ! -d $LOCALBASE/pthreads - then - { echo "configure: error: no thread library found. - -Please install the devel/unproven-pthreads package and rerun configure. -" 1>&2; exit 1; } - fi - - pkg="$LOCALBASE/pthreads" - lib1="-L$pkg/lib -Wl,-R$pkg/lib" - lib2="-lpthread -lm -lgcc -lpthread" - LIBS="$lib1 $lib2 $LIBS" - CPPFLAGS="$CPPFLAGS -I$pkg/include" - STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" - fi - ;; -esac - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1405: checking for $ac_word" >&5 +echo "configure:1352: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1431,7 +1378,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1435: checking for $ac_word" >&5 +echo "configure:1382: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1482,7 +1429,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1486: checking for $ac_word" >&5 +echo "configure:1433: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1514,7 +1461,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1518: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1465: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1525,12 +1472,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1529 "configure" +#line 1476 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1556,12 +1503,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1507: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1565: checking whether we are using GNU C" >&5 +echo "configure:1512: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1570,7 +1517,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1589,7 +1536,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1593: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1540: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1625,7 +1572,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1629: checking for $ac_word" >&5 +echo "configure:1576: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1657,7 +1604,7 @@ test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1661: checking how to run the C preprocessor" >&5 +echo "configure:1608: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1672,13 +1619,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1689,13 +1636,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1706,13 +1653,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1737,12 +1684,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1741: checking for ANSI C header files" >&5 +echo "configure:1688: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1750,7 +1697,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1767,7 +1714,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1785,7 +1732,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1806,7 +1753,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1817,7 +1764,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1845,17 +1792,17 @@ for ac_hdr in fcntl.h sys/time.h unistd.h sys/sockio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1849: checking for $ac_hdr" >&5 +echo "configure:1796: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1883,12 +1830,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1887: checking for working const" >&5 +echo "configure:1834: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1958,21 +1905,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1962: checking for inline" >&5 +echo "configure:1909: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1998,12 +1945,12 @@ EOF esac echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2002: checking for size_t" >&5 +echo "configure:1949: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2031,12 +1978,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2035: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1982: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2045,7 +1992,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2066,12 +2013,63 @@ EOF fi +if "$enable_threads" = "yes" +then +# +# Search for / configure pthreads in a system-dependent fashion. +# case "$host" in - *-netbsd*) - ;; + *-netbsd*) + # + # NetBSD has multiple pthreads implementations. The recommended + # one to use is "unproven-pthreads". The older "mit-pthreads" + # may also work on some NetBSD versions. The PTL2 thread + # library does not currently work with bind9, but can be + # chosen with the --with-ptl2 option for those who wish to + # experiment with it. + # + CC="gcc" + echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 +echo "configure:2034: checking which NetBSD thread library to use" >&5 + + # Check whether --with-ptl2 or --without-ptl2 was given. +if test "${with_ptl2+set}" = set; then + withval="$with_ptl2" + use_ptl2="$withval" +else + use_ptl2="no" +fi + + + : ${LOCALBASE:=/usr/pkg} + + if test "X$use_ptl2" = "Xyes" + then + echo "$ac_t""PTL2" 1>&6 + echo "configure: warning: linking with PTL2 is highly experimental and not expected to work" 1>&2 + CC=ptlgcc + else + echo "$ac_t""mit-pthreads/unproven-pthreads" 1>&6 + + if test ! -d $LOCALBASE/pthreads + then + { echo "configure: error: no thread library found. + +Please install the devel/unproven-pthreads package and rerun configure. +" 1>&2; exit 1; } + fi + + pkg="$LOCALBASE/pthreads" + lib1="-L$pkg/lib -Wl,-R$pkg/lib" + lib2="-lpthread -lm -lgcc -lpthread" + LIBS="$lib1 $lib2 $LIBS" + CPPFLAGS="$CPPFLAGS -I$pkg/include" + STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" + fi + ;; *) echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2075: checking for pthread_create in -lpthread" >&5 +echo "configure:2073: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2079,7 +2077,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2116,7 +2114,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2120: checking for __pthread_create in -lpthread" >&5 +echo "configure:2118: checking for __pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2124,7 +2122,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2163,7 +2161,7 @@ else fi echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 -echo "configure:2167: checking for __pthread_create_system in -lpthread" >&5 +echo "configure:2165: checking for __pthread_create_system in -lpthread" >&5 ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2171,7 +2169,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2211,14 +2209,14 @@ fi fi - ;; + ;; esac # # We'd like to use sigwait() too # echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 -echo "configure:2222: checking for sigwait in -lc" >&5 +echo "configure:2220: checking for sigwait in -lc" >&5 ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2226,7 +2224,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2259,7 +2257,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 -echo "configure:2263: checking for sigwait in -lpthread" >&5 +echo "configure:2261: checking for sigwait in -lpthread" >&5 ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2267,7 +2265,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2300,7 +2298,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 -echo "configure:2304: checking for _Psigwait in -lpthread" >&5 +echo "configure:2302: checking for _Psigwait in -lpthread" >&5 ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2308,7 +2306,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2357,7 +2355,7 @@ case "$host" in # *-freebsd*) echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 -echo "configure:2361: checking for sigwait in -lc_r" >&5 +echo "configure:2359: checking for sigwait in -lc_r" >&5 ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2365,7 +2363,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2429,12 +2427,12 @@ EOF EOF echo $ac_n "checking for pthread_setconcurrency""... $ac_c" 1>&6 -echo "configure:2433: checking for pthread_setconcurrency" >&5 +echo "configure:2431: checking for pthread_setconcurrency" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_setconcurrency=yes" else @@ -2495,12 +2493,12 @@ esac # Look for sysconf to allow detection of the number of processors. # echo $ac_n "checking for sysconf""... $ac_c" 1>&6 -echo "configure:2499: checking for sysconf" >&5 +echo "configure:2497: checking for sysconf" >&5 if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sysconf=yes" else @@ -2546,16 +2544,64 @@ else fi +if test "X$GCC" = "Xyes"; then + case "$host" in + *-freebsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-openbsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + ;; + *-solaris*) + LIBS="$LIBS -lthread" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + esac +else + case $host in + *-dec-osf*) + CC="$CC -std -pthread" + CCOPT="$CCOPT -std -pthread" + MKDEPCC="$CC" + ;; + *-solaris*) + CC="$CC -mt" + CCOPT="$CCOPT -mt" + ;; + *-hp-hpux*) + CC="$CC -Ae -z +w1" + CCOPT="CCOPT -Ae -z" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-UnixWare*) + CC="$CC -Kthread -w" + CCOPT="$CCOPT -Kthread" + ;; + esac +fi + +fi +# +# End of pthreads stuff. +# + # # NLS # echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2554: checking for catgets" >&5 +echo "configure:2600: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else @@ -2616,7 +2662,7 @@ case "$host" in ;; *) echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2620: checking for socket in -lsocket" >&5 +echo "configure:2666: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2624,7 +2670,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2663,7 +2709,7 @@ else fi echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -echo "configure:2667: checking for inet_ntoa in -lnsl" >&5 +echo "configure:2713: checking for inet_ntoa in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2671,7 +2717,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2717,39 +2763,13 @@ MKDEPCFLAGS="-M" IRIX_DNSSEC_WARNINGS_HACK="" if test "X$GCC" = "Xyes"; then STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" - case "$host" in - *-freebsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - *-openbsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - ;; - *-solaris*) - LIBS="$LIBS -lthread" - ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - esac else case "$host" in - *-dec-osf*) - CC="$CC -std -pthread" - CCOPT="$CCOPT -std -pthread" - MKDEPCC="$CC" - ;; *-solaris*) - CC="$CC -mt" - CCOPT="$CCOPT -mt" MKDEPCC="$CC" MKDEPCFLAGS="-xM" ;; - *-hp-hpux*) - CC="$CC -Ae -z +w1" - CCOPT="CCOPT -Ae -z" + *-hp-hpux*) LIBS="-Wl,+vnocompatwarnings $LIBS" MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' ;; @@ -2764,12 +2784,7 @@ else # IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; *-UnixWare*) - CC="$CC -Kthread -w" - CCOPT="$CCOPT -Kthread" MKDEPCC="$CC" YACC="yacc" # bison calls alloca, avoid on UnixWare ;; @@ -2865,7 +2880,7 @@ else fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:2869: checking build system type" >&5 +echo "configure:2884: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -2894,7 +2909,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:2898: checking for ld used by GCC" >&5 +echo "configure:2913: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -2918,10 +2933,10 @@ echo "configure:2898: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:2922: checking for GNU ld" >&5 +echo "configure:2937: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:2925: checking for non-GNU ld" >&5 +echo "configure:2940: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2957,7 +2972,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:2961: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:2976: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2973,7 +2988,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:2977: checking for BSD-compatible nm" >&5 +echo "configure:2992: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3010,7 +3025,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3014: checking whether ln -s works" >&5 +echo "configure:3029: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3054,8 +3069,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 3058 "configure"' > conftest.$ac_ext - if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 3073 "configure"' > conftest.$ac_ext + if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -3076,19 +3091,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:3080: checking whether the C compiler needs -belf" >&5 +echo "configure:3095: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -3230,9 +3245,9 @@ fi case "$enable_ipv6" in yes|''|autodetect) echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 -echo "configure:3234: checking for IPv6 structures" >&5 +echo "configure:3249: checking for IPv6 structures" >&5 cat > conftest.$ac_ext < @@ -3242,7 +3257,7 @@ int main() { struct sockaddr_in6 sin6; return (0); ; return 0; } EOF -if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 found_ipv6=yes @@ -3265,7 +3280,7 @@ esac # This is done before other IPv6 linking tests to LIBS is properly set. # echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 -echo "configure:3269: checking for Kame IPv6 support" >&5 +echo "configure:3284: checking for Kame IPv6 support" >&5 # Check whether --with-kame or --without-kame was given. if test "${with_kame+set}" = set; then withval="$with_kame" @@ -3353,9 +3368,9 @@ case "$found_ipv6" in LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 -echo "configure:3357: checking for in6addr_any" >&5 +echo "configure:3372: checking for in6addr_any" >&5 cat > conftest.$ac_ext < @@ -3366,7 +3381,7 @@ int main() { struct in6_addr in6; in6 = in6addr_any; return (0); ; return 0; } EOF -if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" @@ -3382,9 +3397,9 @@ fi rm -f conftest* echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 -echo "configure:3386: checking for sin6_scope_id in struct sockaddr_in6" >&5 +echo "configure:3401: checking for sin6_scope_id in struct sockaddr_in6" >&5 cat > conftest.$ac_ext < @@ -3397,7 +3412,7 @@ int main() { struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); ; return 0; } EOF -if { (eval echo configure:3401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" @@ -3412,9 +3427,9 @@ rm -f conftest* LWRES_HAVE_SIN6_SCOPE_ID="$result" echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 -echo "configure:3416: checking for in6_pktinfo" >&5 +echo "configure:3431: checking for in6_pktinfo" >&5 cat > conftest.$ac_ext < @@ -3427,7 +3442,7 @@ int main() { struct in6_pktinfo xyzzy; return (0); ; return 0; } EOF -if { (eval echo configure:3431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" @@ -3476,9 +3491,9 @@ esac # which provides some (all?) of the desired functions. # echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -echo "configure:3480: checking for inet_ntop" >&5 +echo "configure:3495: checking for inet_ntop" >&5 cat > conftest.$ac_ext < @@ -3488,7 +3503,7 @@ int main() { inet_ntop(0, 0, 0, 0); return (0); ; return 0; } EOF -if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" @@ -3503,9 +3518,9 @@ else fi rm -f conftest* echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -echo "configure:3507: checking for inet_pton" >&5 +echo "configure:3522: checking for inet_pton" >&5 cat > conftest.$ac_ext < @@ -3515,7 +3530,7 @@ int main() { inet_pton(0, 0, 0); return (0); ; return 0; } EOF -if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" @@ -3530,9 +3545,9 @@ else fi rm -f conftest* echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:3534: checking for inet_aton" >&5 +echo "configure:3549: checking for inet_aton" >&5 cat > conftest.$ac_ext < @@ -3542,7 +3557,7 @@ int main() { struct in_addr in; inet_aton(0, &in); return (0); ; return 0; } EOF -if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" @@ -3575,9 +3590,9 @@ EOF esac echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 -echo "configure:3579: checking for sa_len in struct sockaddr" >&5 +echo "configure:3594: checking for sa_len in struct sockaddr" >&5 cat > conftest.$ac_ext < @@ -3586,7 +3601,7 @@ int main() { struct sockaddr sa; sa.sa_len = 0; return (0); ; return 0; } EOF -if { (eval echo configure:3590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" @@ -3607,9 +3622,9 @@ rm -f conftest* # Look for a 4.4BSD or 4.3BSD struct msghdr # echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 -echo "configure:3611: checking for struct msghdr flavor" >&5 +echo "configure:3626: checking for struct msghdr flavor" >&5 cat > conftest.$ac_ext < @@ -3618,7 +3633,7 @@ int main() { struct msghdr msg; msg.msg_flags = 0; return (0); ; return 0; } EOF -if { (eval echo configure:3622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""4.4BSD" 1>&6 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" @@ -3636,9 +3651,9 @@ rm -f conftest* # Look for in_port_t. # echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 -echo "configure:3640: checking for type in_port_t" >&5 +echo "configure:3655: checking for type in_port_t" >&5 cat > conftest.$ac_ext < @@ -3647,7 +3662,7 @@ int main() { in_port_t port = 25; return (0); ; return 0; } EOF -if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" @@ -3665,9 +3680,9 @@ rm -f conftest* # Check for addrinfo # echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 -echo "configure:3669: checking for struct addrinfo" >&5 +echo "configure:3684: checking for struct addrinfo" >&5 cat > conftest.$ac_ext < @@ -3675,7 +3690,7 @@ int main() { struct addrinfo a; return (0); ; return 0; } EOF -if { (eval echo configure:3679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" @@ -3694,9 +3709,9 @@ rm -f conftest* echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 -echo "configure:3698: checking for int sethostent" >&5 +echo "configure:3713: checking for int sethostent" >&5 cat > conftest.$ac_ext < @@ -3704,7 +3719,7 @@ int main() { int i = sethostent(0); return(0); ; return 0; } EOF -if { (eval echo configure:3708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" @@ -3719,9 +3734,9 @@ rm -f conftest* echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 -echo "configure:3723: checking for int endhostent" >&5 +echo "configure:3738: checking for int endhostent" >&5 cat > conftest.$ac_ext < @@ -3729,7 +3744,7 @@ int main() { int i = endhostent(); return(0); ; return 0; } EOF -if { (eval echo configure:3733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" @@ -3744,9 +3759,9 @@ rm -f conftest* echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 -echo "configure:3748: checking for getnetbyaddr(in_addr_t, ...)" >&5 +echo "configure:3763: checking for getnetbyaddr(in_addr_t, ...)" >&5 cat > conftest.$ac_ext < @@ -3755,7 +3770,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" @@ -3770,9 +3785,9 @@ rm -f conftest* echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 -echo "configure:3774: checking for int setnetent" >&5 +echo "configure:3789: checking for int setnetent" >&5 cat > conftest.$ac_ext < @@ -3780,7 +3795,7 @@ int main() { int i = setnetent(0); return(0); ; return 0; } EOF -if { (eval echo configure:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" @@ -3795,9 +3810,9 @@ rm -f conftest* echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 -echo "configure:3799: checking for int endnetent" >&5 +echo "configure:3814: checking for int endnetent" >&5 cat > conftest.$ac_ext < @@ -3805,7 +3820,7 @@ int main() { int i = endnetent(); return(0); ; return 0; } EOF -if { (eval echo configure:3809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" @@ -3820,9 +3835,9 @@ rm -f conftest* echo $ac_n "checking for gethostbyadd(const void *, size_t, ...)""... $ac_c" 1>&6 -echo "configure:3824: checking for gethostbyadd(const void *, size_t, ...)" >&5 +echo "configure:3839: checking for gethostbyadd(const void *, size_t, ...)" >&5 cat > conftest.$ac_ext < @@ -3831,7 +3846,7 @@ int main() { return(0); ; return 0; } EOF -if { (eval echo configure:3835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" @@ -3846,9 +3861,9 @@ rm -f conftest* echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 -echo "configure:3850: checking for h_errno in netdb.h" >&5 +echo "configure:3865: checking for h_errno in netdb.h" >&5 cat > conftest.$ac_ext < @@ -3856,7 +3871,7 @@ int main() { h_errno = 1; return(0); ; return 0; } EOF -if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" @@ -3871,12 +3886,12 @@ rm -f conftest* echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6 -echo "configure:3875: checking for getipnodebyname" >&5 +echo "configure:3890: checking for getipnodebyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getipnodebyname=yes" else @@ -3920,12 +3935,12 @@ ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1" fi echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6 -echo "configure:3924: checking for getnameinfo" >&5 +echo "configure:3939: checking for getnameinfo" >&5 if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getnameinfo=yes" else @@ -3969,12 +3984,12 @@ ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1" fi echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 -echo "configure:3973: checking for getaddrinfo" >&5 +echo "configure:3988: checking for getaddrinfo" >&5 if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getaddrinfo=yes" else @@ -4029,9 +4044,9 @@ fi # Look for a sysctl call to get the list of network interfaces. # echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 -echo "configure:4033: checking for interface list sysctl" >&5 +echo "configure:4048: checking for interface list sysctl" >&5 cat > conftest.$ac_ext < @@ -4061,12 +4076,12 @@ rm -f conftest* # Check for some other useful functions that are not ever-present. # echo $ac_n "checking for strsep""... $ac_c" 1>&6 -echo "configure:4065: checking for strsep" >&5 +echo "configure:4080: checking for strsep" >&5 if eval "test \"`echo '$''{'ac_cv_func_strsep'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strsep=yes" else @@ -4110,12 +4125,12 @@ ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1" fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:4114: checking for vsnprintf" >&5 +echo "configure:4129: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vsnprintf=yes" else @@ -4167,17 +4182,17 @@ fi echo $ac_n "checking for sizeof(long long int) == sizeof(long int)""... $ac_c" 1>&6 -echo "configure:4171: checking for sizeof(long long int) == sizeof(long int)" >&5 +echo "configure:4186: checking for sizeof(long long int) == sizeof(long int)" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""default yes" 1>&6 ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1" @@ -4197,12 +4212,12 @@ fi # Security Stuff # echo $ac_n "checking for chroot""... $ac_c" 1>&6 -echo "configure:4201: checking for chroot" >&5 +echo "configure:4216: checking for chroot" >&5 if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_chroot=yes" else @@ -4251,17 +4266,17 @@ for ac_hdr in linux/capability.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4255: checking for $ac_hdr" >&5 +echo "configure:4270: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4291,17 +4306,17 @@ for ac_hdr in linux/prctl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4295: checking for $ac_hdr" >&5 +echo "configure:4310: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/configure.in b/configure.in index 77a3bf7637..899bc2adfe 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.179 $) +AC_REVISION($Revision: 1.180 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -129,19 +129,18 @@ esac # # Decide whether to use multithreading or not. # -enable_threads=yes AC_MSG_CHECKING(whether to use threads) AC_ARG_ENABLE(threads, [ --enable-threads use multithreading]) case "$enable_threads" in - yes) + yes|'') AC_MSG_RESULT(yes) ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" ;; no) AC_MSG_RESULT(no) ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" ;; *) - AC_MSG_ERROR("--enable-threads take yes or no") ;; + AC_MSG_ERROR(["--enable-threads takes yes or no"]) ;; esac AC_SUBST(ISC_PLATFORM_USETHREADS) @@ -311,17 +310,33 @@ case "$use_randomdev" in ;; esac -# -# NetBSD has multiple pthreads implementations. The recommended -# one to use is "unproven-pthreads". The older "mit-pthreads" -# may also work on some NetBSD versions. The PTL2 thread -# library does not currently work with bind9, but can be -# chosen with the --with-ptl2 option for those who wish to -# experiment with it. -# +AC_PROG_CC +AC_PROG_YACC +AC_HEADER_STDC + +AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h) + +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_HEADER_TIME + +if "$enable_threads" = "yes" +then +# +# Search for / configure pthreads in a system-dependent fashion. +# case "$host" in *-netbsd*) + # + # NetBSD has multiple pthreads implementations. The recommended + # one to use is "unproven-pthreads". The older "mit-pthreads" + # may also work on some NetBSD versions. The PTL2 thread + # library does not currently work with bind9, but can be + # chosen with the --with-ptl2 option for those who wish to + # experiment with it. + # CC="gcc" AC_MSG_CHECKING(which NetBSD thread library to use) @@ -356,28 +371,11 @@ Please install the devel/unproven-pthreads package and rerun configure. STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" fi ;; -esac - -AC_PROG_CC -AC_PROG_YACC - -AC_HEADER_STDC - -AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h) - -AC_C_CONST -AC_C_INLINE -AC_TYPE_SIZE_T -AC_HEADER_TIME - -case "$host" in - *-netbsd*) - ;; *) AC_CHECK_LIB(pthread, pthread_create,, AC_CHECK_LIB(pthread, __pthread_create) AC_CHECK_LIB(pthread, __pthread_create_system)) - ;; + ;; esac # @@ -436,6 +434,54 @@ esac # AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),) +if test "X$GCC" = "Xyes"; then + case "$host" in + *-freebsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-openbsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + ;; + *-solaris*) + LIBS="$LIBS -lthread" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + esac +else + case $host in + *-dec-osf*) + CC="$CC -std -pthread" + CCOPT="$CCOPT -std -pthread" + MKDEPCC="$CC" + ;; + *-solaris*) + CC="$CC -mt" + CCOPT="$CCOPT -mt" + ;; + *-hp-hpux*) + CC="$CC -Ae -z +w1" + CCOPT="CCOPT -Ae -z" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-UnixWare*) + CC="$CC -Kthread -w" + CCOPT="$CCOPT -Kthread" + ;; + esac +fi + +fi +# +# End of pthreads stuff. +# + # # NLS # @@ -465,39 +511,13 @@ MKDEPCFLAGS="-M" IRIX_DNSSEC_WARNINGS_HACK="" if test "X$GCC" = "Xyes"; then STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" - case "$host" in - *-freebsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - *-openbsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - ;; - *-solaris*) - LIBS="$LIBS -lthread" - ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - esac else case "$host" in - *-dec-osf*) - CC="$CC -std -pthread" - CCOPT="$CCOPT -std -pthread" - MKDEPCC="$CC" - ;; *-solaris*) - CC="$CC -mt" - CCOPT="$CCOPT -mt" MKDEPCC="$CC" MKDEPCFLAGS="-xM" ;; - *-hp-hpux*) - CC="$CC -Ae -z +w1" - CCOPT="CCOPT -Ae -z" + *-hp-hpux*) LIBS="-Wl,+vnocompatwarnings $LIBS" MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' ;; @@ -512,12 +532,7 @@ else # IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; *-UnixWare*) - CC="$CC -Kthread -w" - CCOPT="$CCOPT -Kthread" MKDEPCC="$CC" YACC="yacc" # bison calls alloca, avoid on UnixWare ;;