From: David Lawrence Date: Sat, 23 Dec 2000 18:27:43 +0000 (+0000) Subject: Also look in libc for pthread_create before deciding the system doesn't X-Git-Tag: v9.1.0b2~22 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=9a2574531e3d2ced31072200b416467fdee0c29c;p=thirdparty%2Fbind9.git Also look in libc for pthread_create before deciding the system doesn't have pthreads support. Not all systems have libpthread (eg, BSD/OS). Many compiler options that were not particular to whether threads were being used were being set in a threads-specific block, meaning they didn't get set at all if threads were not being used. ISC_PLATFORM_USETHREADS could end up still defined even if threading was later disabled, such as if pthread_create was not found. --- diff --git a/configure b/configure index 96ce4467155..2e0d4f8826c 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.202 +# From configure.in Revision: 1.203 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. @@ -128,8 +128,6 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: -ac_help="$ac_help - --enable-threads use multithreading" ac_help="$ac_help --with-openssl=PATH Specify path for system-supplied openssl (rather than using bind-9 internal openssl)" @@ -137,6 +135,8 @@ ac_help="$ac_help --with-gssapi=PATH Specify path for system-supplied GSSAPI" ac_help="$ac_help --with-randomdev=PATH Specify path for random device" +ac_help="$ac_help + --enable-threads use multithreading" ac_help="$ac_help --with-ptl2 on NetBSD, use the ptl2 thread library (experimental)" ac_help="$ac_help @@ -1045,34 +1045,6 @@ case "$INSTALL" in ;; esac -# -# Decide whether to use multithreading or not. -# -echo $ac_n "checking whether to use threads""... $ac_c" 1>&6 -echo "configure:1053: 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" - : -fi - -case "$enable_threads" in - yes|'') - echo "$ac_t""yes" 1>&6 - use_threads=true - ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" - ;; - no) - echo "$ac_t""no" 1>&6 - use_threads=false - ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" - ;; - *) - { echo "configure: error: "--enable-threads takes yes or no"" 1>&2; exit 1; } - ;; -esac - - # # On these hosts, we really want to use cc, not gcc, even if it is # found. The gcc that these systems have will not correctly handle @@ -1123,14 +1095,14 @@ fi # Find the machine's endian flavor. # echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1127: checking whether byte ordering is bigendian" >&5 +echo "configure:1099: 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 @@ -1141,11 +1113,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1117: \"$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 @@ -1156,7 +1128,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1176,7 +1148,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:1165: \"$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 @@ -1217,7 +1189,7 @@ fi # was --with-openssl specified? # echo $ac_n "checking for compatible OpenSSL library""... $ac_c" 1>&6 -echo "configure:1221: checking for compatible OpenSSL library" >&5 +echo "configure:1193: 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" @@ -1274,7 +1246,7 @@ esac # was --with-gssapi specified? # echo $ac_n "checking for GSSAPI library""... $ac_c" 1>&6 -echo "configure:1278: checking for GSSAPI library" >&5 +echo "configure:1250: checking for GSSAPI library" >&5 # Check whether --with-gssapi or --without-gssapi was given. if test "${with_gssapi+set}" = set; then withval="$with_gssapi" @@ -1310,7 +1282,7 @@ esac # was --with-randomdev specified? # echo $ac_n "checking for random device""... $ac_c" 1>&6 -echo "configure:1314: checking for random device" >&5 +echo "configure:1286: checking for random device" >&5 # Check whether --with-randomdev or --without-randomdev was given. if test "${with_randomdev+set}" = set; then withval="$with_randomdev" @@ -1357,7 +1329,7 @@ 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:1361: checking for $ac_word" >&5 +echo "configure:1333: 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 @@ -1387,7 +1359,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:1391: checking for $ac_word" >&5 +echo "configure:1363: 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 @@ -1438,7 +1410,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:1442: checking for $ac_word" >&5 +echo "configure:1414: 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 @@ -1470,7 +1442,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1474: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1446: 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. @@ -1481,12 +1453,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1485 "configure" +#line 1457 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1462: \"$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 @@ -1512,12 +1484,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:1516: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1488: 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:1521: checking whether we are using GNU C" >&5 +echo "configure:1493: 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 @@ -1526,7 +1498,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1530: \"$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:1502: \"$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 @@ -1545,7 +1517,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:1549: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1521: 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 @@ -1581,7 +1553,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:1585: checking for $ac_word" >&5 +echo "configure:1557: 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 @@ -1613,7 +1585,7 @@ test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1617: checking how to run the C preprocessor" >&5 +echo "configure:1589: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1628,13 +1600,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:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1610: \"$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 : @@ -1645,13 +1617,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:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1627: \"$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 : @@ -1662,13 +1634,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:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1644: \"$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 : @@ -1693,12 +1665,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1697: checking for ANSI C header files" >&5 +echo "configure:1669: 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 @@ -1706,7 +1678,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1682: \"$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* @@ -1723,7 +1695,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 @@ -1741,7 +1713,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 @@ -1762,7 +1734,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1773,7 +1745,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1801,17 +1773,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:1805: checking for $ac_hdr" >&5 +echo "configure:1777: 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:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1787: \"$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* @@ -1839,12 +1811,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1843: checking for working const" >&5 +echo "configure:1815: 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:1869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1914,21 +1886,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1918: checking for inline" >&5 +echo "configure:1890: 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:1904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1954,12 +1926,12 @@ EOF esac echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1958: checking for size_t" >&5 +echo "configure:1930: 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 @@ -1987,12 +1959,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1991: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1963: 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 @@ -2001,7 +1973,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2022,6 +1994,33 @@ EOF fi +# +# Begin pthreads checking. +# +# First, decide whether to use multithreading or not. +# +echo $ac_n "checking whether to look for thread support""... $ac_c" 1>&6 +echo "configure:2004: checking whether to look for thread support" >&5 +# Check whether --enable-threads or --disable-threads was given. +if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + : +fi + +case "$enable_threads" in + yes|'') + echo "$ac_t""yes" 1>&6 + use_threads=true + ;; + no) + echo "$ac_t""no" 1>&6 + use_threads=false + ;; + *) + { echo "configure: error: "--enable-threads takes yes or no"" 1>&2; exit 1; } + ;; +esac + if $use_threads then # @@ -2038,7 +2037,7 @@ then # experiment with it. CC="gcc" echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 -echo "configure:2042: checking which NetBSD thread library to use" >&5 +echo "configure:2041: checking which NetBSD thread library to use" >&5 # Check whether --with-ptl2 or --without-ptl2 was given. if test "${with_ptl2+set}" = set; then @@ -2076,8 +2075,53 @@ Please install the devel/unproven-pthreads package and rerun configure. fi ;; *) - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2081: checking for pthread_create in -lpthread" >&5 + echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 +echo "configure:2080: checking for pthread_create in -lc" >&5 +ac_lib_var=`echo c'_'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 +else + ac_save_LIBS="$LIBS" +LIBS="-lc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo c | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:2125: 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 @@ -2085,7 +2129,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:2144: \"$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 @@ -2111,7 +2155,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/^a-zA-Z0-9_/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2126: checking for __pthread_create in -lpthread" >&5 +echo "configure:2170: 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 @@ -2130,7 +2174,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:2189: \"$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 @@ -2167,7 +2211,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 -echo "configure:2171: checking for __pthread_create_system in -lpthread" >&5 +echo "configure:2215: 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 @@ -2175,7 +2219,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:2234: \"$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 @@ -2216,22 +2260,21 @@ fi fi +fi + fi ;; esac fi -# -# We may have failed to find libpthread, so check again. -# if $use_threads then # # We'd like to use sigwait() too # echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 -echo "configure:2235: checking for sigwait in -lc" >&5 +echo "configure:2278: 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 @@ -2239,7 +2282,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:2297: \"$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 @@ -2272,7 +2315,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 -echo "configure:2276: checking for sigwait in -lpthread" >&5 +echo "configure:2319: 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 @@ -2280,7 +2323,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:2338: \"$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 @@ -2313,7 +2356,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 -echo "configure:2317: checking for _Psigwait in -lpthread" >&5 +echo "configure:2360: 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 @@ -2321,7 +2364,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:2379: \"$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 @@ -2362,12 +2405,12 @@ fi echo $ac_n "checking for pthread_attr_getstacksize""... $ac_c" 1>&6 -echo "configure:2366: checking for pthread_attr_getstacksize" >&5 +echo "configure:2409: checking for pthread_attr_getstacksize" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+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:2437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_attr_getstacksize=yes" else @@ -2422,7 +2465,7 @@ fi # *-freebsd*) echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 -echo "configure:2426: checking for sigwait in -lc_r" >&5 +echo "configure:2469: 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 @@ -2430,7 +2473,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:2488: \"$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 @@ -2496,12 +2539,12 @@ EOF EOF echo $ac_n "checking for pthread_setconcurrency""... $ac_c" 1>&6 -echo "configure:2500: checking for pthread_setconcurrency" >&5 +echo "configure:2543: 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:2571: \"$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 @@ -2562,12 +2605,12 @@ EOF # Look for sysconf to allow detection of the number of processors. # echo $ac_n "checking for sysconf""... $ac_c" 1>&6 -echo "configure:2566: checking for sysconf" >&5 +echo "configure:2609: 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:2637: \"$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 @@ -2634,49 +2677,30 @@ fi else case $host in *-dec-osf*) - CC="$CC -std -pthread" - CCOPT="$CCOPT -std -pthread" - MKDEPCC="$CC" + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" ;; *-solaris*) CC="$CC -mt" CCOPT="$CCOPT -mt" ;; - *-hp-hpux*) - CC="$CC -Ae -z" - # The version of the C compiler that constantly - # warns about 'const' as well as alignment issues - # is unfortunately not able to be discerned via - # the version of the operating system, nor does - # cc have a version flag. - case "`$CC +W 123 2>&1`" in - *Unknown?option*) - STD_CWARNINGS="+w1" - ;; - *) - # Turn off the pointlessly noisy warnings. - STD_CWARNINGS="+w1 +W 474,530" - ;; - esac - CCOPT="$CCOPT -Ae -z" - LIBS="-Wl,+vnocompatwarnings $LIBS" - ;; *-ibm-aix*) STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" ;; *-UnixWare*) - CC="$CC -Kthread -w" + CC="$CC -Kthread" CCOPT="$CCOPT -Kthread" ;; esac fi + ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" thread_dir=pthreads else + ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" thread_dir=nothreads fi -# -# End of pthreads stuff. -# + + ISC_THREAD_DIR=$thread_dir @@ -2686,12 +2710,12 @@ ISC_THREAD_DIR=$thread_dir # even if compiled with --disable-threads. # echo $ac_n "checking for flockfile""... $ac_c" 1>&6 -echo "configure:2690: checking for flockfile" >&5 +echo "configure:2714: checking for flockfile" >&5 if eval "test \"`echo '$''{'ac_cv_func_flockfile'+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:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_flockfile=yes" else @@ -2737,16 +2761,92 @@ else fi +# +# Indicate what the final decision was regarding threads. +# +echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 +echo "configure:2769: checking whether to build with threads" >&5 +if $use_threads; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# +# End of pthreads stuff. +# + +# +# Additional compiler settings. +# +MKDEPCC="$CC" +MKDEPCFLAGS="-M" +IRIX_DNSSEC_WARNINGS_HACK="" + +if test "X$GCC" = "Xyes"; then + STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" +else + case $host in + *-dec-osf*) + CC="$CC -std" + CCOPT="$CCOPT -std" + MKDEPCC="$CC" + ;; + *-hp-hpux*) + CC="$CC -Ae -z" + # The version of the C compiler that constantly warns about + # 'const' as well as alignment issues is unfortunately not + # able to be discerned via the version of the operating + # system, nor does cc have a version flag. + case "`$CC +W 123 2>&1`" in + *Unknown?option*) + STD_CWARNINGS="+w1" + ;; + *) + # Turn off the pointlessly noisy warnings. + STD_CWARNINGS="+w1 +W 474,530" + ;; + esac + CCOPT="$CCOPT -Ae -z" + LIBS="-Wl,+vnocompatwarnings $LIBS" + MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' + ;; + *-sgi-irix*) + STD_CWARNINGS="-fullwarn -woff 1209" + # + # Silence more than 250 instances of + # "prototyped function redeclared without prototype" + # and 11 instances of + # "variable ... was set but never used" + # from lib/dns/sec/openssl. + # + IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" + ;; + *-solaris*) + MKDEPCFLAGS="-xM" + ;; + *-UnixWare*) + CC="$CC -w" + YACC="yacc" # bison calls alloca, avoid on UnixWare + ;; + esac +fi + + + + + + # # NLS # echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2745: checking for catgets" >&5 +echo "configure:2845: 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:2873: \"$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 @@ -2807,7 +2907,7 @@ case "$host" in ;; *) echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2811: checking for socket in -lsocket" >&5 +echo "configure:2911: 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 @@ -2815,7 +2915,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:2930: \"$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 @@ -2854,7 +2954,7 @@ else fi echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -echo "configure:2858: checking for inet_ntoa in -lnsl" >&5 +echo "configure:2958: 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 @@ -2862,7 +2962,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:2977: \"$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 @@ -2903,42 +3003,6 @@ fi ;; esac -MKDEPCC="$CC" -MKDEPCFLAGS="-M" -IRIX_DNSSEC_WARNINGS_HACK="" -if test "X$GCC" = "Xyes"; then - STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" -else - case "$host" in - *-solaris*) - MKDEPCC="$CC" - MKDEPCFLAGS="-xM" - ;; - *-hp-hpux*) - MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' - ;; - *-sgi-irix*) - STD_CWARNINGS="-fullwarn -woff 1209" - # - # Silence more than 250 instances of - # "prototyped function redeclared without prototype" - # and 11 instances of - # "variable ... was set but never used" - # from lib/dns/sec/openssl. - # - IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" - ;; - *-UnixWare*) - MKDEPCC="$CC" - YACC="yacc" # bison calls alloca, avoid on UnixWare - ;; - esac -fi - - - - - # # # GNU libtool support @@ -3024,7 +3088,7 @@ else fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:3028: checking build system type" >&5 +echo "configure:3092: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -3053,7 +3117,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:3057: checking for ld used by GCC" >&5 +echo "configure:3121: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -3077,10 +3141,10 @@ echo "configure:3057: 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:3081: checking for GNU ld" >&5 +echo "configure:3145: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:3084: checking for non-GNU ld" >&5 +echo "configure:3148: 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 @@ -3115,7 +3179,7 @@ else 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:3119: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:3183: 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 @@ -3131,7 +3195,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:3135: checking for BSD-compatible nm" >&5 +echo "configure:3199: 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 @@ -3167,7 +3231,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3171: checking whether ln -s works" >&5 +echo "configure:3235: 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 @@ -3216,8 +3280,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 3220 "configure"' > conftest.$ac_ext - if { (eval echo configure:3221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 3284 "configure"' > conftest.$ac_ext + if { (eval echo configure:3285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -3238,19 +3302,19 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:3242: checking whether the C compiler needs -belf" >&5 +echo "configure:3306: 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:3318: \"$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 @@ -3401,9 +3465,9 @@ esac # the right suffix on the files. # echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 -echo "configure:3405: checking for IPv6 structures" >&5 +echo "configure:3469: checking for IPv6 structures" >&5 cat > conftest.$ac_ext < @@ -3413,7 +3477,7 @@ int main() { struct sockaddr_in6 sin6; return (0); ; return 0; } EOF -if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 found_ipv6=yes @@ -3431,7 +3495,7 @@ rm -f conftest* # 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:3435: checking for Kame IPv6 support" >&5 +echo "configure:3499: 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" @@ -3521,9 +3585,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:3525: checking for in6addr_any" >&5 +echo "configure:3589: checking for in6addr_any" >&5 cat > conftest.$ac_ext < @@ -3534,7 +3598,7 @@ int main() { struct in6_addr in6; in6 = in6addr_any; return (0); ; return 0; } EOF -if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3602: \"$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" @@ -3550,9 +3614,9 @@ fi rm -f conftest* echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 -echo "configure:3554: checking for sin6_scope_id in struct sockaddr_in6" >&5 +echo "configure:3618: checking for sin6_scope_id in struct sockaddr_in6" >&5 cat > conftest.$ac_ext < @@ -3565,7 +3629,7 @@ int main() { struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); ; return 0; } EOF -if { (eval echo configure:3569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3633: \"$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" @@ -3580,9 +3644,9 @@ rm -f conftest* LWRES_HAVE_SIN6_SCOPE_ID="$result" echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 -echo "configure:3584: checking for in6_pktinfo" >&5 +echo "configure:3648: checking for in6_pktinfo" >&5 cat > conftest.$ac_ext < @@ -3595,7 +3659,7 @@ int main() { struct in6_pktinfo xyzzy; return (0); ; return 0; } EOF -if { (eval echo configure:3599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3663: \"$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" @@ -3645,9 +3709,9 @@ esac # which provides some (all?) of the desired functions. # echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -echo "configure:3649: checking for inet_ntop" >&5 +echo "configure:3713: checking for inet_ntop" >&5 cat > conftest.$ac_ext < @@ -3657,7 +3721,7 @@ int main() { inet_ntop(0, 0, 0, 0); return (0); ; return 0; } EOF -if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3725: \"$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" @@ -3672,9 +3736,9 @@ else fi rm -f conftest* echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -echo "configure:3676: checking for inet_pton" >&5 +echo "configure:3740: checking for inet_pton" >&5 cat > conftest.$ac_ext < @@ -3684,7 +3748,7 @@ int main() { inet_pton(0, 0, 0); return (0); ; return 0; } EOF -if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3752: \"$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" @@ -3699,9 +3763,9 @@ else fi rm -f conftest* echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:3703: checking for inet_aton" >&5 +echo "configure:3767: checking for inet_aton" >&5 cat > conftest.$ac_ext < @@ -3711,7 +3775,7 @@ int main() { struct in_addr in; inet_aton(0, &in); return (0); ; return 0; } EOF -if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3779: \"$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" @@ -3744,9 +3808,9 @@ EOF esac echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 -echo "configure:3748: checking for sa_len in struct sockaddr" >&5 +echo "configure:3812: checking for sa_len in struct sockaddr" >&5 cat > conftest.$ac_ext < @@ -3755,7 +3819,7 @@ int main() { struct sockaddr sa; sa.sa_len = 0; return (0); ; return 0; } EOF -if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3823: \"$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" @@ -3776,9 +3840,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:3780: checking for struct msghdr flavor" >&5 +echo "configure:3844: checking for struct msghdr flavor" >&5 cat > conftest.$ac_ext < @@ -3787,7 +3851,7 @@ int main() { struct msghdr msg; msg.msg_flags = 0; return (0); ; return 0; } EOF -if { (eval echo configure:3791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3855: \"$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" @@ -3805,9 +3869,9 @@ rm -f conftest* # Look for in_port_t. # echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 -echo "configure:3809: checking for type in_port_t" >&5 +echo "configure:3873: checking for type in_port_t" >&5 cat > conftest.$ac_ext < @@ -3816,7 +3880,7 @@ int main() { in_port_t port = 25; return (0); ; return 0; } EOF -if { (eval echo configure:3820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3884: \"$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" @@ -3834,9 +3898,9 @@ rm -f conftest* # Check for addrinfo # echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 -echo "configure:3838: checking for struct addrinfo" >&5 +echo "configure:3902: checking for struct addrinfo" >&5 cat > conftest.$ac_ext < @@ -3844,7 +3908,7 @@ int main() { struct addrinfo a; return (0); ; return 0; } EOF -if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3912: \"$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" @@ -3863,9 +3927,9 @@ rm -f conftest* echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 -echo "configure:3867: checking for int sethostent" >&5 +echo "configure:3931: checking for int sethostent" >&5 cat > conftest.$ac_ext < @@ -3873,7 +3937,7 @@ int main() { int i = sethostent(0); return(0); ; return 0; } EOF -if { (eval echo configure:3877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3941: \"$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" @@ -3888,9 +3952,9 @@ rm -f conftest* echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 -echo "configure:3892: checking for int endhostent" >&5 +echo "configure:3956: checking for int endhostent" >&5 cat > conftest.$ac_ext < @@ -3898,7 +3962,7 @@ int main() { int i = endhostent(); return(0); ; return 0; } EOF -if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3966: \"$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" @@ -3913,9 +3977,9 @@ rm -f conftest* echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 -echo "configure:3917: checking for getnetbyaddr(in_addr_t, ...)" >&5 +echo "configure:3981: checking for getnetbyaddr(in_addr_t, ...)" >&5 cat > conftest.$ac_ext < @@ -3924,7 +3988,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3992: \"$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" @@ -3939,9 +4003,9 @@ rm -f conftest* echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 -echo "configure:3943: checking for int setnetent" >&5 +echo "configure:4007: checking for int setnetent" >&5 cat > conftest.$ac_ext < @@ -3949,7 +4013,7 @@ int main() { int i = setnetent(0); return(0); ; return 0; } EOF -if { (eval echo configure:3953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4017: \"$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" @@ -3964,9 +4028,9 @@ rm -f conftest* echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 -echo "configure:3968: checking for int endnetent" >&5 +echo "configure:4032: checking for int endnetent" >&5 cat > conftest.$ac_ext < @@ -3974,7 +4038,7 @@ int main() { int i = endnetent(); return(0); ; return 0; } EOF -if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4042: \"$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" @@ -3989,9 +4053,9 @@ rm -f conftest* echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 -echo "configure:3993: checking for gethostbyaddr(const void *, size_t, ...)" >&5 +echo "configure:4057: checking for gethostbyaddr(const void *, size_t, ...)" >&5 cat > conftest.$ac_ext < @@ -4000,7 +4064,7 @@ int main() { return(0); ; return 0; } EOF -if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4068: \"$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" @@ -4015,9 +4079,9 @@ rm -f conftest* echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 -echo "configure:4019: checking for h_errno in netdb.h" >&5 +echo "configure:4083: checking for h_errno in netdb.h" >&5 cat > conftest.$ac_ext < @@ -4025,7 +4089,7 @@ int main() { h_errno = 1; return(0); ; return 0; } EOF -if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4093: \"$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" @@ -4040,12 +4104,12 @@ rm -f conftest* echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6 -echo "configure:4044: checking for getipnodebyname" >&5 +echo "configure:4108: 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:4136: \"$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 @@ -4089,12 +4153,12 @@ ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1" fi echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6 -echo "configure:4093: checking for getnameinfo" >&5 +echo "configure:4157: 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:4185: \"$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 @@ -4138,12 +4202,12 @@ ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1" fi echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 -echo "configure:4142: checking for getaddrinfo" >&5 +echo "configure:4206: 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:4234: \"$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 @@ -4198,9 +4262,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:4202: checking for interface list sysctl" >&5 +echo "configure:4266: checking for interface list sysctl" >&5 cat > conftest.$ac_ext < @@ -4230,12 +4294,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:4234: checking for strsep" >&5 +echo "configure:4298: 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:4326: \"$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 @@ -4279,12 +4343,12 @@ ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1" fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:4283: checking for vsnprintf" >&5 +echo "configure:4347: 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:4375: \"$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 @@ -4336,17 +4400,17 @@ fi echo $ac_n "checking for sizeof(long long int) == sizeof(long int)""... $ac_c" 1>&6 -echo "configure:4340: checking for sizeof(long long int) == sizeof(long int)" >&5 +echo "configure:4404: 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:4414: \"$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" @@ -4366,12 +4430,12 @@ fi # Security Stuff # echo $ac_n "checking for chroot""... $ac_c" 1>&6 -echo "configure:4370: checking for chroot" >&5 +echo "configure:4434: 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:4462: \"$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 @@ -4420,17 +4484,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:4424: checking for $ac_hdr" >&5 +echo "configure:4488: 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:4434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4498: \"$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* @@ -4460,17 +4524,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:4464: checking for $ac_hdr" >&5 +echo "configure:4528: 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:4474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4538: \"$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* @@ -4501,9 +4565,9 @@ done # BSD/OS, and perhaps some others, don't define rlim_t. # echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 -echo "configure:4505: checking for type rlim_t" >&5 +echo "configure:4569: checking for type rlim_t" >&5 cat > conftest.$ac_ext < @@ -4513,7 +4577,7 @@ int main() { rlim_t rl = 19671212; return (0); ; return 0; } EOF -if { (eval echo configure:4517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -4606,7 +4670,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:4610: checking for $ac_word" >&5 +echo "configure:4674: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4652,7 +4716,7 @@ test -n "$JADE" || JADE="jade" SGMLDIR="" echo $ac_n "checking for SGML files""... $ac_c" 1>&6 -echo "configure:4656: checking for SGML files" >&5 +echo "configure:4720: checking for SGML files" >&5 for d in /usr/pkg/share/sgml /usr/local/share/sgml do if test -f $d/docbook/dsssl/modular/html/docbook.dsl @@ -4678,7 +4742,7 @@ fi XGMLDIR="" echo $ac_n "checking for XML files""... $ac_c" 1>&6 -echo "configure:4682: checking for XML files" >&5 +echo "configure:4746: checking for XML files" >&5 for d in /usr/pkg/share/xml /usr/local/share/xml do if test -f $d/dtd/docbook/docbookx.dtd @@ -4961,7 +5025,6 @@ s%@ARFLAGS@%$ARFLAGS%g s%@LN@%$LN%g s%@ETAGS@%$ETAGS%g s%@PERL@%$PERL%g -s%@ISC_PLATFORM_USETHREADS@%$ISC_PLATFORM_USETHREADS%g s%@DST_PRIVATEOPENSSL@%$DST_PRIVATEOPENSSL%g s%@dst_privateopenssl@%$dst_privateopenssl%g s%@DST_OPENSSL_INC@%$DST_OPENSSL_INC%g @@ -4974,6 +5037,7 @@ s%@DNS_GSSAPI_LIBS@%$DNS_GSSAPI_LIBS%g s%@CC@%$CC%g s%@YACC@%$YACC%g s%@CPP@%$CPP%g +s%@ISC_PLATFORM_USETHREADS@%$ISC_PLATFORM_USETHREADS%g s%@ISC_THREAD_DIR@%$ISC_THREAD_DIR%g s%@MKDEPCC@%$MKDEPCC%g s%@MKDEPCFLAGS@%$MKDEPCFLAGS%g diff --git a/configure.in b/configure.in index dc9a8985037..70eccde5a79 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.202 $) +AC_REVISION($Revision: 1.203 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -126,29 +126,6 @@ case "$INSTALL" in ;; esac -# -# Decide whether to use multithreading or not. -# -AC_MSG_CHECKING(whether to use threads) -AC_ARG_ENABLE(threads, - [ --enable-threads use multithreading]) -case "$enable_threads" in - yes|'') - AC_MSG_RESULT(yes) - use_threads=true - ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" - ;; - no) - AC_MSG_RESULT(no) - use_threads=false - ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" - ;; - *) - AC_MSG_ERROR(["--enable-threads takes yes or no"]) - ;; -esac -AC_SUBST(ISC_PLATFORM_USETHREADS) - # # On these hosts, we really want to use cc, not gcc, even if it is # found. The gcc that these systems have will not correctly handle @@ -327,6 +304,28 @@ AC_C_INLINE AC_TYPE_SIZE_T AC_HEADER_TIME +# +# Begin pthreads checking. +# +# First, decide whether to use multithreading or not. +# +AC_MSG_CHECKING(whether to look for thread support) +AC_ARG_ENABLE(threads, + [ --enable-threads use multithreading]) +case "$enable_threads" in + yes|'') + AC_MSG_RESULT(yes) + use_threads=true + ;; + no) + AC_MSG_RESULT(no) + use_threads=false + ;; + *) + AC_MSG_ERROR(["--enable-threads takes yes or no"]) + ;; +esac + if $use_threads then # @@ -376,17 +375,15 @@ Please install the devel/unproven-pthreads package and rerun configure. fi ;; *) - AC_CHECK_LIB(pthread, pthread_create,, - AC_CHECK_LIB(pthread, __pthread_create,, - AC_CHECK_LIB(pthread, __pthread_create_system,, - use_threads=false))) + AC_CHECK_LIB(c, pthread_create,, + AC_CHECK_LIB(pthread, pthread_create,, + AC_CHECK_LIB(pthread, __pthread_create,, + AC_CHECK_LIB(pthread, __pthread_create_system,, + use_threads=false)))) ;; esac fi -# -# We may have failed to find libpthread, so check again. -# if $use_threads then # @@ -471,49 +468,30 @@ then else case $host in *-dec-osf*) - CC="$CC -std -pthread" - CCOPT="$CCOPT -std -pthread" - MKDEPCC="$CC" + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" ;; *-solaris*) CC="$CC -mt" CCOPT="$CCOPT -mt" ;; - *-hp-hpux*) - CC="$CC -Ae -z" - # The version of the C compiler that constantly - # warns about 'const' as well as alignment issues - # is unfortunately not able to be discerned via - # the version of the operating system, nor does - # cc have a version flag. - case "`$CC +W 123 2>&1`" in - *Unknown?option*) - STD_CWARNINGS="+w1" - ;; - *) - # Turn off the pointlessly noisy warnings. - STD_CWARNINGS="+w1 +W 474,530" - ;; - esac - CCOPT="$CCOPT -Ae -z" - LIBS="-Wl,+vnocompatwarnings $LIBS" - ;; *-ibm-aix*) STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" ;; *-UnixWare*) - CC="$CC -Kthread -w" + CC="$CC -Kthread" CCOPT="$CCOPT -Kthread" ;; esac fi + ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" thread_dir=pthreads else + ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" thread_dir=nothreads fi -# -# End of pthreads stuff. -# + +AC_SUBST(ISC_PLATFORM_USETHREADS) ISC_THREAD_DIR=$thread_dir AC_SUBST(ISC_THREAD_DIR) @@ -524,6 +502,81 @@ AC_SUBST(ISC_THREAD_DIR) # AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),) +# +# Indicate what the final decision was regarding threads. +# +AC_MSG_CHECKING(whether to build with threads) +if $use_threads; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +# +# End of pthreads stuff. +# + +# +# Additional compiler settings. +# +MKDEPCC="$CC" +MKDEPCFLAGS="-M" +IRIX_DNSSEC_WARNINGS_HACK="" + +if test "X$GCC" = "Xyes"; then + STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" +else + case $host in + *-dec-osf*) + CC="$CC -std" + CCOPT="$CCOPT -std" + MKDEPCC="$CC" + ;; + *-hp-hpux*) + CC="$CC -Ae -z" + # The version of the C compiler that constantly warns about + # 'const' as well as alignment issues is unfortunately not + # able to be discerned via the version of the operating + # system, nor does cc have a version flag. + case "`$CC +W 123 2>&1`" in + *Unknown?option*) + STD_CWARNINGS="+w1" + ;; + *) + # Turn off the pointlessly noisy warnings. + STD_CWARNINGS="+w1 +W 474,530" + ;; + esac + CCOPT="$CCOPT -Ae -z" + LIBS="-Wl,+vnocompatwarnings $LIBS" + MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' + ;; + *-sgi-irix*) + STD_CWARNINGS="-fullwarn -woff 1209" + # + # Silence more than 250 instances of + # "prototyped function redeclared without prototype" + # and 11 instances of + # "variable ... was set but never used" + # from lib/dns/sec/openssl. + # + IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" + ;; + *-solaris*) + MKDEPCFLAGS="-xM" + ;; + *-UnixWare*) + CC="$CC -w" + YACC="yacc" # bison calls alloca, avoid on UnixWare + ;; + esac +fi + +AC_SUBST(MKDEPCC) +AC_SUBST(MKDEPCFLAGS) +AC_SUBST(MKDEPPROG) +AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK) + # # NLS # @@ -548,42 +601,6 @@ case "$host" in ;; esac -MKDEPCC="$CC" -MKDEPCFLAGS="-M" -IRIX_DNSSEC_WARNINGS_HACK="" -if test "X$GCC" = "Xyes"; then - STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" -else - case "$host" in - *-solaris*) - MKDEPCC="$CC" - MKDEPCFLAGS="-xM" - ;; - *-hp-hpux*) - MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' - ;; - *-sgi-irix*) - STD_CWARNINGS="-fullwarn -woff 1209" - # - # Silence more than 250 instances of - # "prototyped function redeclared without prototype" - # and 11 instances of - # "variable ... was set but never used" - # from lib/dns/sec/openssl. - # - IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" - ;; - *-UnixWare*) - MKDEPCC="$CC" - YACC="yacc" # bison calls alloca, avoid on UnixWare - ;; - esac -fi -AC_SUBST(MKDEPCC) -AC_SUBST(MKDEPCFLAGS) -AC_SUBST(MKDEPPROG) -AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK) - # # # GNU libtool support