From: hno <> Date: Wed, 31 May 2000 14:57:07 +0000 (+0000) Subject: Corrected --disable-unlinkd. It didn't correctly parse the arguments X-Git-Tag: SQUID_3_0_PRE1~1938 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c573763cd75a1d4caa48c1e5568d2b40438e339;p=thirdparty%2Fsquid.git Corrected --disable-unlinkd. It didn't correctly parse the arguments and always enabled unlinkd.. Excended the makefile trickery used for --disable-unlinkd to also apply to dnsserver and pinger. Now no helpers are built or installed unless requested. Note: The makefile trickery will probably fail on old UNIX:es if no helpers are to be installed. Need to find a way to test if a variable contains anything else besides whitespace.. Workaround: Don't use --disable-unlinkd or use --disable-internal-dns. --- diff --git a/configure b/configure index 6e0b91fe70..4bff448079 100755 --- a/configure +++ b/configure @@ -1254,6 +1254,7 @@ echo "Store modules built: $STORE_MODULES" STORE_OBJS="fs/`echo $STORE_MODULES|sed -e's% %.a fs/%g'`.a" +OPT_PINGER_EXE='' # Check whether --enable-icmp or --disable-icmp was given. if test "${enable_icmp+set}" = set; then enableval="$enable_icmp" @@ -1263,11 +1264,13 @@ if test "${enable_icmp+set}" = set; then #define USE_ICMP 1 EOF + OPT_PINGER_EXE='$(OPT_PINGER_EXE)' fi fi + # Check whether --enable-delay_pools or --disable-delay_pools was given. if test "${enable_delay_pools+set}" = set; then enableval="$enable_delay_pools" @@ -1592,25 +1595,32 @@ EOF fi +use_dnsserver= # Check whether --enable-internal-dns or --disable-internal-dns was given. if test "${enable_internal_dns+set}" = set; then enableval="$enable_internal_dns" if test "$enableval" = "no" ; then echo "Disabling Internal DNS queries" - cat >> confdefs.h <<\EOF -#define USE_DNSSERVERS 1 -EOF + use_dnsserver="yes" + fi - else +fi + +if test "$use_dnsserver" = "yes"; then cat >> confdefs.h <<\EOF -#define USE_DNSSERVERS 0 +#define USE_DNSSERVER 1 EOF - fi - + OPT_DNSSERVER_EXE='$(OPT_DNSSERVER_EXE)' + DNS_OBJS='dns.o' +else + OPT_DNSSERVER_EXE='' + DNS_OBJS='dns_internal.o' fi + + # Check whether --enable-truncate or --disable-truncate was given. if test "${enable_truncate+set}" = set; then enableval="$enable_truncate" @@ -1682,20 +1692,20 @@ fi if test "${enable_unlinkd+set}" = set; then enableval="$enable_unlinkd" if test "$enableval" = "no" ; then - USE_UNLINKD=0 + use_unlinkd=no else - USE_UNLINKD=1 + use_unlinkd=yes fi else # Here we should probably use some magic depending on the selected # storage models - USE_UNLINKD=1 + use_unlinkd=yes fi -if test $USE_UNLINKD; then +if test "$use_unlinkd" = "yes"; then echo "unlinkd enabled" cat >> confdefs.h <<\EOF #define USE_UNLINKD 1 @@ -1745,7 +1755,7 @@ case "$host" in esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1749: checking how to run the C preprocessor" >&5 +echo "configure:1759: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1760,13 +1770,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:1770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1780: \"$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 : @@ -1777,13 +1787,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:1787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1797: \"$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 : @@ -1794,13 +1804,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:1804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1814: \"$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 : @@ -1836,7 +1846,7 @@ echo "$ac_t""$CPP" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1840: checking for a BSD compatible install" >&5 +echo "configure:1850: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1891,7 +1901,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1895: checking for $ac_word" >&5 +echo "configure:1905: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1919,7 +1929,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1923: checking whether ln -s works" >&5 +echo "configure:1933: 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 @@ -1942,7 +1952,7 @@ fi # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1946: checking for $ac_word" >&5 +echo "configure:1956: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1978,7 +1988,7 @@ fi # Extract the first word of "false", so it can be a program name with args. set dummy false; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1982: checking for $ac_word" >&5 +echo "configure:1992: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FALSE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2014,7 +2024,7 @@ fi # Extract the first word of "true", so it can be a program name with args. set dummy true; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2018: checking for $ac_word" >&5 +echo "configure:2028: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TRUE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2050,7 +2060,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2054: checking for $ac_word" >&5 +echo "configure:2064: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2086,7 +2096,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2090: checking for $ac_word" >&5 +echo "configure:2100: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2122,7 +2132,7 @@ fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2126: checking for $ac_word" >&5 +echo "configure:2136: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2158,7 +2168,7 @@ fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2162: checking for $ac_word" >&5 +echo "configure:2172: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2194,7 +2204,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2198: checking for $ac_word" >&5 +echo "configure:2208: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2230,7 +2240,7 @@ fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2234: checking for $ac_word" >&5 +echo "configure:2244: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2266,7 +2276,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2270: checking for $ac_word" >&5 +echo "configure:2280: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2320,12 +2330,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2324: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2334: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2333,7 +2343,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2358,7 +2368,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2362: checking for opendir in -ldir" >&5 +echo "configure:2372: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2366,7 +2376,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2391: \"$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 @@ -2399,7 +2409,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2403: checking for opendir in -lx" >&5 +echo "configure:2413: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2407,7 +2417,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2432: \"$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 @@ -2441,12 +2451,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2445: checking for ANSI C header files" >&5 +echo "configure:2455: 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 @@ -2454,7 +2464,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2468: \"$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* @@ -2471,7 +2481,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 @@ -2489,7 +2499,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 @@ -2510,7 +2520,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2521,7 +2531,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2613,17 +2623,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2617: checking for $ac_hdr" >&5 +echo "configure:2627: 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:2627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2637: \"$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* @@ -2651,12 +2661,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2655: checking for working const" >&5 +echo "configure:2665: 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:2719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2726,14 +2736,14 @@ EOF fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2730: checking whether byte ordering is bigendian" >&5 +echo "configure:2740: 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 @@ -2744,11 +2754,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2758: \"$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 @@ -2759,7 +2769,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2779,7 +2789,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:2806: \"$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 @@ -2817,20 +2827,20 @@ fi echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6 -echo "configure:2821: checking if ANSI prototypes work" >&5 +echo "configure:2831: checking if ANSI prototypes work" >&5 if eval "test \"`echo '$''{'ac_cv_have_ansi_prototypes'+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:2844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ansi_prototypes="yes" else @@ -2852,13 +2862,13 @@ EOF fi echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 -echo "configure:2856: checking for tm->tm_gmtoff" >&5 +echo "configure:2866: checking for tm->tm_gmtoff" >&5 if eval "test \"`echo '$''{'ac_cv_have_tm_gmoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2867,7 +2877,7 @@ struct tm foo; foo.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:2871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_tm_gmoff="yes" else @@ -2889,13 +2899,13 @@ EOF fi echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6 -echo "configure:2893: checking for struct mallinfo" >&5 +echo "configure:2903: checking for struct mallinfo" >&5 if eval "test \"`echo '$''{'ac_cv_have_struct_mallinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if HAVE_MALLOC_H @@ -2913,7 +2923,7 @@ struct mallinfo foo; foo.keepcost = 0; ; return 0; } EOF -if { (eval echo configure:2917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_mallinfo="yes" else @@ -2935,13 +2945,13 @@ EOF fi echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 -echo "configure:2939: checking for extended mallinfo" >&5 +echo "configure:2949: checking for extended mallinfo" >&5 if eval "test \"`echo '$''{'ac_cv_have_ext_mallinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2950,7 +2960,7 @@ struct mallinfo foo; foo.mxfast = 0; ; return 0; } EOF -if { (eval echo configure:2954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ext_mallinfo="yes" else @@ -2972,13 +2982,13 @@ EOF fi echo $ac_n "checking for struct rusage""... $ac_c" 1>&6 -echo "configure:2976: checking for struct rusage" >&5 +echo "configure:2986: checking for struct rusage" >&5 if eval "test \"`echo '$''{'ac_cv_have_struct_rusage'+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:3005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_rusage="yes" else @@ -3013,13 +3023,13 @@ EOF fi echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6 -echo "configure:3017: checking for ip->ip_hl" >&5 +echo "configure:3027: checking for ip->ip_hl" >&5 if eval "test \"`echo '$''{'ac_cv_have_ip_hl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3036,7 +3046,7 @@ struct iphdr ip; ip.ip_hl= 0; ; return 0; } EOF -if { (eval echo configure:3040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ip_hl="yes" else @@ -3058,7 +3068,7 @@ EOF fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:3062: checking size of int" >&5 +echo "configure:3072: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3066,7 +3076,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -3077,7 +3087,7 @@ main() exit(0); } EOF -if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -3097,7 +3107,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:3101: checking size of long" >&5 +echo "configure:3111: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3105,7 +3115,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -3116,7 +3126,7 @@ main() exit(0); } EOF -if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -3136,7 +3146,7 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:3140: checking size of void *" >&5 +echo "configure:3150: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3144,7 +3154,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -3155,7 +3165,7 @@ main() exit(0); } EOF -if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_void_p=`cat conftestval` else @@ -3178,19 +3188,19 @@ EOF # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3182: checking for working alloca.h" >&5 +echo "configure:3192: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3211,12 +3221,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3215: checking for alloca" >&5 +echo "configure:3225: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3276,12 +3286,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3280: checking whether alloca needs Cray hooks" >&5 +echo "configure:3290: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3310: checking for $ac_func" >&5 +echo "configure:3320: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3361,7 +3371,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3365: checking stack direction for C alloca" >&5 +echo "configure:3375: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3369,7 +3379,7 @@ else ac_cv_c_stack_direction=0 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:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3411,12 +3421,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3415: checking for pid_t" >&5 +echo "configure:3425: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3444,12 +3454,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3448: checking for size_t" >&5 +echo "configure:3458: 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 @@ -3477,12 +3487,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3481: checking for ssize_t" >&5 +echo "configure:3491: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3510,12 +3520,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3514: checking for off_t" >&5 +echo "configure:3524: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3543,12 +3553,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3547: checking for mode_t" >&5 +echo "configure:3557: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3576,12 +3586,12 @@ EOF fi echo $ac_n "checking for fd_mask""... $ac_c" 1>&6 -echo "configure:3580: checking for fd_mask" >&5 +echo "configure:3590: checking for fd_mask" >&5 if eval "test \"`echo '$''{'ac_cv_type_fd_mask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3610,13 +3620,13 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:3614: checking for socklen_t" >&5 +echo "configure:3624: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3647,13 +3657,13 @@ EOF fi echo $ac_n "checking for mtyp_t""... $ac_c" 1>&6 -echo "configure:3651: checking for mtyp_t" >&5 +echo "configure:3661: checking for mtyp_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mtyp_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3681,7 +3691,7 @@ EOF fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:3685: checking for main in -lnsl" >&5 +echo "configure:3695: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3689,14 +3699,14 @@ 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:3710: \"$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 @@ -3724,7 +3734,7 @@ else fi echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:3728: checking for main in -lsocket" >&5 +echo "configure:3738: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3732,14 +3742,14 @@ 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:3753: \"$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 @@ -3771,7 +3781,7 @@ if test "x$ac_cv_enabled_dlmalloc" = "xyes" ; then echo "skipping libmalloc check (--enable-dlmalloc specified)" else echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6 -echo "configure:3775: checking for main in -lgnumalloc" >&5 +echo "configure:3785: checking for main in -lgnumalloc" >&5 ac_lib_var=`echo gnumalloc'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3779,14 +3789,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnumalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3800: \"$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 @@ -3829,7 +3839,7 @@ fi *) echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 -echo "configure:3833: checking for main in -lmalloc" >&5 +echo "configure:3843: checking for main in -lmalloc" >&5 ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3837,14 +3847,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3858: \"$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 @@ -3877,7 +3887,7 @@ fi fi echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6 -echo "configure:3881: checking for main in -lbsd" >&5 +echo "configure:3891: checking for main in -lbsd" >&5 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3885,14 +3895,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3906: \"$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 @@ -3920,7 +3930,7 @@ else fi echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6 -echo "configure:3924: checking for main in -lregex" >&5 +echo "configure:3934: checking for main in -lregex" >&5 ac_lib_var=`echo regex'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3928,14 +3938,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lregex $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3949: \"$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 @@ -3956,7 +3966,7 @@ else fi echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6 -echo "configure:3960: checking for gethostbyname in -lbind" >&5 +echo "configure:3970: checking for gethostbyname in -lbind" >&5 ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3964,7 +3974,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3989: \"$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 @@ -4009,7 +4019,7 @@ if test $ac_cv_lib_bind_gethostbyname = "no" ; then ;; *) echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:4013: checking for inet_aton in -lresolv" >&5 +echo "configure:4023: checking for inet_aton in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4017,7 +4027,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4042: \"$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 @@ -4044,7 +4054,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6 -echo "configure:4048: checking for inet_aton in -l44bsd" >&5 +echo "configure:4058: checking for inet_aton in -l44bsd" >&5 ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4052,7 +4062,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4077: \"$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 @@ -4095,7 +4105,7 @@ else fi echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6 -echo "configure:4099: checking for main in -lresolv" >&5 +echo "configure:4109: checking for main in -lresolv" >&5 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4103,14 +4113,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4124: \"$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 @@ -4141,7 +4151,7 @@ fi esac fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:4145: checking for main in -lm" >&5 +echo "configure:4155: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4149,14 +4159,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4170: \"$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 @@ -4185,7 +4195,7 @@ fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4189: checking for crypt in -lcrypt" >&5 +echo "configure:4199: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4193,7 +4203,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4218: \"$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 @@ -4237,7 +4247,7 @@ fi echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:4241: checking for main in -lpthread" >&5 +echo "configure:4251: checking for main in -lpthread" >&5 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4245,14 +4255,14 @@ 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:4266: \"$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 @@ -4287,7 +4297,7 @@ fi case "$host" in *-pc-sco3.2*) echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:4291: checking for strftime in -lintl" >&5 +echo "configure:4301: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4295,7 +4305,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4320: \"$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 @@ -4487,12 +4497,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4491: checking for $ac_func" >&5 +echo "configure:4501: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4541,7 +4551,7 @@ done echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6 -echo "configure:4545: checking if setresuid is implemented" >&5 +echo "configure:4555: checking if setresuid is implemented" >&5 if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4549,7 +4559,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -4562,7 +4572,7 @@ else } EOF -if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_setresuid="yes" else @@ -4587,7 +4597,7 @@ fi if test "$IPF_TRANSPARENT" ; then echo $ac_n "checking if IP-Filter header files are installed""... $ac_c" 1>&6 -echo "configure:4591: checking if IP-Filter header files are installed" >&5 +echo "configure:4601: checking if IP-Filter header files are installed" >&5 if test "$ac_cv_header_ip_compat_h" = "yes" && test "$ac_cv_header_ip_fil_h" = "yes" && test "$ac_cv_header_ip_nat_h" = "yes" ; then @@ -4630,13 +4640,13 @@ if test -z "$USE_GNUREGEX" ; then esac fi echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6 -echo "configure:4634: checking if GNUregex needs to be compiled" >&5 +echo "configure:4644: checking if GNUregex needs to be compiled" >&5 if test -z "$USE_GNUREGEX"; then if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then USE_GNUREGEX="yes" else cat > conftest.$ac_ext < #include @@ -4644,7 +4654,7 @@ int main() { regex_t t; regcomp(&t,"",0); ; return 0; } EOF -if { (eval echo configure:4648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* USE_GNUREGEX="no" else @@ -4675,12 +4685,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4679: checking for $ac_func" >&5 +echo "configure:4689: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4731,12 +4741,12 @@ done echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:4735: checking Default FD_SETSIZE value" >&5 +echo "configure:4745: checking Default FD_SETSIZE value" >&5 if test "$cross_compiling" = yes; then DEFAULT_FD_SETSIZE=256 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:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -4780,7 +4790,7 @@ EOF echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 -echo "configure:4784: checking Maximum number of filedescriptors we can open" >&5 +echo "configure:4794: checking Maximum number of filedescriptors we can open" >&5 TLDFLAGS="$LDFLAGS" case $host in i386-unknown-freebsd*) @@ -4792,7 +4802,7 @@ if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -4849,7 +4859,7 @@ main() { } EOF -if { (eval echo configure:4853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -4876,12 +4886,12 @@ fi LDFLAGS="$TLDFLAGS" echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6 -echo "configure:4880: checking Default UDP send buffer size" >&5 +echo "configure:4890: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4902,7 +4912,7 @@ main () } EOF -if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -4921,12 +4931,12 @@ EOF echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:4925: checking Default UDP receive buffer size" >&5 +echo "configure:4935: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4947,7 +4957,7 @@ main () } EOF -if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -4966,12 +4976,12 @@ EOF echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:4970: checking Default TCP send buffer size" >&5 +echo "configure:4980: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4992,7 +5002,7 @@ main () } EOF -if { (eval echo configure:4996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -5011,12 +5021,12 @@ EOF echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:5015: checking Default TCP receive buffer size" >&5 +echo "configure:5025: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -5037,7 +5047,7 @@ main () } EOF -if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -5056,19 +5066,19 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 -echo "configure:5060: checking if sys_errlist is already defined" >&5 +echo "configure:5070: checking if sys_errlist is already defined" >&5 if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *s = sys_errlist; ; return 0; } EOF -if { (eval echo configure:5072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_needs_sys_errlist="no" else @@ -5090,16 +5100,16 @@ EOF fi echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:5094: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:5104: checking for libresolv _dns_ttl_ hack" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -5115,12 +5125,12 @@ fi rm -f conftest* echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6 -echo "configure:5119: checking if inet_ntoa() actually works" >&5 +echo "configure:5129: checking if inet_ntoa() actually works" >&5 if test "$cross_compiling" = yes; then INET_NTOA_RESULT="broken" else cat > conftest.$ac_ext < @@ -5139,7 +5149,7 @@ main () } EOF -if { (eval echo configure:5143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then INET_NTOA_RESULT=`cat conftestval` else @@ -5165,9 +5175,9 @@ fi if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6 -echo "configure:5169: checking for working statvfs() interface" >&5 +echo "configure:5179: checking for working statvfs() interface" >&5 cat > conftest.$ac_ext < @@ -5184,7 +5194,7 @@ statvfs("/tmp", &sfs); ; return 0; } EOF -if { (eval echo configure:5188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_statvfs=yes else @@ -5204,12 +5214,12 @@ fi fi echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6 -echo "configure:5208: checking for _res.nsaddr_list" >&5 +echo "configure:5218: checking for _res.nsaddr_list" >&5 if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+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:5246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_nsaddr_list="yes" else @@ -5254,12 +5264,12 @@ fi if test $ac_cv_have_res_nsaddr_list = "no" ; then echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6 -echo "configure:5258: checking for _res.ns_list" >&5 +echo "configure:5268: checking for _res.ns_list" >&5 if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+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:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_ns_list="yes" else @@ -5498,6 +5508,7 @@ s%@LIB_MALLOC@%$LIB_MALLOC%g s%@SQUID_PTHREAD_LIB@%$SQUID_PTHREAD_LIB%g s%@STORE_MODULES@%$STORE_MODULES%g s%@STORE_OBJS@%$STORE_OBJS%g +s%@OPT_PINGER_EXE@%$OPT_PINGER_EXE%g s%@DELAY_OBJS@%$DELAY_OBJS%g s%@SNMPLIB@%$SNMPLIB%g s%@SNMP_OBJS@%$SNMP_OBJS%g @@ -5505,6 +5516,8 @@ s%@makesnmplib@%$makesnmplib%g s%@HTCP_OBJS@%$HTCP_OBJS%g s%@ERR_LANGUAGE@%$ERR_LANGUAGE%g s%@LEAKFINDER_OBJS@%$LEAKFINDER_OBJS%g +s%@OPT_DNSSERVER_EXE@%$OPT_DNSSERVER_EXE%g +s%@DNS_OBJS@%$DNS_OBJS%g s%@AUTH_MODULES@%$AUTH_MODULES%g s%@OPT_UNLINKD_EXE@%$OPT_UNLINKD_EXE%g s%@UNLINKD_OBJS@%$UNLINKD_OBJS%g diff --git a/configure.in b/configure.in index 84658a7eef..7f2aaa91fb 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.191 2000/05/31 01:04:44 hno Exp $ +dnl $Id: configure.in,v 1.192 2000/05/31 08:57:08 hno Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.191 $)dnl +AC_REVISION($Revision: 1.192 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -322,13 +322,16 @@ AC_SUBST(STORE_MODULES) STORE_OBJS="fs/`echo $STORE_MODULES|sed -e's% %.a fs/%g'`.a" AC_SUBST(STORE_OBJS) +OPT_PINGER_EXE='' AC_ARG_ENABLE(icmp, [ --enable-icmp Enable ICMP pinging], [ if test "$enableval" = "yes" ; then echo "ICMP enabled" AC_DEFINE(USE_ICMP) + OPT_PINGER_EXE='$(OPT_PINGER_EXE)' fi ]) +AC_SUBST(OPT_PINGER_EXE) AC_ARG_ENABLE(delay_pools, [ --enable-delay-pools Enable delay pools to limit bandwith usage], @@ -558,17 +561,27 @@ AC_ARG_ENABLE(ident-lookups, fi ]) +use_dnsserver= AC_ARG_ENABLE(internal-dns, [ --disable-internal-dns This prevents Squid from directly sending and receiving DNS messages, and instead enables the old external 'dnsserver' processes.], [ if test "$enableval" = "no" ; then echo "Disabling Internal DNS queries" - AC_DEFINE(USE_DNSSERVERS, 1) - else - AC_DEFINE(USE_DNSSERVERS, 0) + use_dnsserver="yes" fi ]) +if test "$use_dnsserver" = "yes"; then + AC_DEFINE(USE_DNSSERVER) + OPT_DNSSERVER_EXE='$(OPT_DNSSERVER_EXE)' + DNS_OBJS='dns.o' +else + OPT_DNSSERVER_EXE='' + DNS_OBJS='dns_internal.o' +fi +AC_SUBST(OPT_DNSSERVER_EXE) +AC_SUBST(DNS_OBJS) + AC_ARG_ENABLE(truncate, [ --enable-truncate This uses truncate() instead of unlink() when @@ -635,20 +648,20 @@ if test -n "$AUTH_MODULES"; then fi AC_SUBST(AUTH_MODULES) -dnl Disable "unlinkd" cde +dnl Disable "unlinkd" code AC_ARG_ENABLE(unlinkd, [ --disable-unlinkd Do not use unlinkd], [ if test "$enableval" = "no" ; then - USE_UNLINKD=0 + use_unlinkd=no else - USE_UNLINKD=1 + use_unlinkd=yes fi ],[ # Here we should probably use some magic depending on the selected # storage models - USE_UNLINKD=1 + use_unlinkd=yes ]) -if test $USE_UNLINKD; then +if test "$use_unlinkd" = "yes"; then echo "unlinkd enabled" AC_DEFINE(USE_UNLINKD) OPT_UNLINKD_EXE='$(OPT_UNLINKD_EXE)' diff --git a/src/Makefile.in b/src/Makefile.in index e472c9d681..2d209d5cef 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.187 2000/05/31 01:34:10 hno Exp $ +# $Id: Makefile.in,v 1.188 2000/05/31 08:57:08 hno Exp $ # # Uncomment and customize the following to suit your needs: # @@ -24,10 +24,12 @@ SUBDIRS = fs # SQUID_EXE = squid$(exec_suffix) CLIENT_EXE = client$(exec_suffix) -DNSSERVER_EXE = dnsserver$(exec_suffix) +OPT_DNSSERVER_EXE = dnsserver$(exec_suffix) +DNSSERVER_EXE = @OPT_DNSSERVER_EXE@ OPT_UNLINKD_EXE = unlinkd$(exec_suffix) UNLINKD_EXE = @OPT_UNLINKD_EXE@ -PINGER_EXE = pinger$(exec_suffix) +OPT_PINGER_EXE = pinger$(exec_suffix) +PINGER_EXE = @OPT_PINGER_EXE@ CACHEMGR_EXE = cachemgr$(cgi_suffix) DEFAULT_PREFIX = $(prefix) @@ -75,12 +77,11 @@ SQUID_LIBS = -L../lib $(CRYPTLIB) $(REGEXLIB) @SQUID_PTHREAD_LIB@ \ $(SNMPLIB) $(MALLOCLIB) -lmiscutil $(XTRA_LIBS) CLIENT_LIBS = -L../lib -lmiscutil $(XTRA_LIBS) DNSSERVER_LIBS = -L../lib -lmiscutil $(XTRA_LIBS) -DISKD_LIBS = -L../lib -lmiscutil $(XTRA_LIBS) PINGER_LIBS = -L../lib -lmiscutil $(XTRA_LIBS) STD_APP_LIBS = -L../lib -lmiscutil $(XTRA_LIBS) PROGS = $(SQUID_EXE) $(CLIENT_EXE) -UTILS = $(DNSSERVER_EXE) $(UNLINKD_EXE) $(DISKD_EXE) +UTILS = $(DNSSERVER_EXE) $(UNLINKD_EXE) SUID_UTILS = $(PINGER_EXE) CGIPROGS = $(CACHEMGR_EXE) OBJS = \ @@ -100,8 +101,7 @@ OBJS = \ debug.o \ @DELAY_OBJS@ \ disk.o \ - dns.o \ - dns_internal.o \ + @DNS_OBJS@ \ errorpage.o \ ETag.o \ event.o \ @@ -326,7 +326,8 @@ install: all install-mkdirs $(RM) -f $(bindir)/-$$f; \ fi; \ done - @for f in $(UTILS); do \ + @if test -n "$(UTILS)"; then \ + for f in $(UTILS); do \ if test -f $(libexecdir)/$$f; then \ echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \ $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \ @@ -337,7 +338,8 @@ install: all install-mkdirs echo $(RM) -f $(libexecdir)/-$$f; \ $(RM) -f $(libexecdir)/-$$f; \ fi; \ - done + done; \ + fi @for f in $(CGIPROGS); do \ if test -f $(libexecdir)/$$f; then \ echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \ diff --git a/src/cf_gen_defines b/src/cf_gen_defines index 9e66b95f94..c14b7832ac 100755 --- a/src/cf_gen_defines +++ b/src/cf_gen_defines @@ -16,6 +16,7 @@ BEGIN { define["USE_IDENT"]="--enable-ident-lookups" define["USE_USERAGENT_LOG"]="--enable-useragent-log" define["USE_WCCP"]="--enable-wccp" + define["USE_UNLINKD"]="--enable-unlinkd" } /^IFDEF:/ { print "{\"" $2 "\", \"" (define[$2] != "" ? define[$2] : ("-D" $2)) "\", " diff --git a/src/dns.cc b/src/dns.cc index c9b304ee9d..57bb4b630f 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -1,6 +1,6 @@ /* - * $Id: dns.cc,v 1.82 2000/05/16 07:06:04 wessels Exp $ + * $Id: dns.cc,v 1.83 2000/05/31 08:57:08 hno Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -37,7 +37,6 @@ static helper *dnsservers = NULL; -#if USE_DNSSERVERS static void dnsStats(StoreEntry * sentry) { @@ -45,12 +44,9 @@ dnsStats(StoreEntry * sentry) helperStats(sentry, dnsservers); } -#endif - void dnsInit(void) { -#if USE_DNSSERVERS static int init = 0; wordlist *w; if (!Config.Program.dnsserver) @@ -74,7 +70,6 @@ dnsInit(void) dnsStats, 0, 1); init = 1; } -#endif } void @@ -109,7 +104,6 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP) debug(49, 5) ("snmp_netDnsFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]); snmpDebugOid(5, Var->name, Var->name_length); *ErrP = SNMP_ERR_NOERROR; -#if USE_DNSSERVERS switch (Var->name[LEN_SQ_NET + 1]) { case DNS_REQ: Answer = snmp_var_new_integer(Var->name, Var->name_length, @@ -130,11 +124,6 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP) *ErrP = SNMP_ERR_NOSUCHNAME; break; } -#else - Answer = snmp_var_new_integer(Var->name, Var->name_length, - 0, - SMI_COUNTER32); -#endif return Answer; } #endif /*SQUID_SNMP */ diff --git a/src/dns_internal.cc b/src/dns_internal.cc index d22de827c8..db4e637ceb 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.26 2000/05/16 07:06:04 wessels Exp $ + * $Id: dns_internal.cc,v 1.27 2000/05/31 08:57:08 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -35,8 +35,6 @@ #include "squid.h" -#if !USE_DNSSERVERS - #ifndef _PATH_RESOLV_CONF #define _PATH_RESOLV_CONF "/etc/resolv.conf" #endif @@ -458,4 +456,42 @@ idnsPTRLookup(const struct in_addr addr, IDNSCB * callback, void *data) idnsSendQuery(q); } -#endif /* !USE_DNSSERVERS */ +#ifdef SQUID_SNMP +/* + * The function to return the DNS via SNMP + */ +variable_list * +snmp_netIdnsFn(variable_list * Var, snint * ErrP) +{ + int i, n = 0; + variable_list *Answer = NULL; + debug(49, 5) ("snmp_netDnsFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]); + snmpDebugOid(5, Var->name, Var->name_length); + *ErrP = SNMP_ERR_NOERROR; + switch (Var->name[LEN_SQ_NET + 1]) { + case DNS_REQ: + for (i = 0; i < nss; i++) + n += nameservers[i].nqueries; + Answer = snmp_var_new_integer(Var->name, Var->name_length, + n, + SMI_COUNTER32); + break; + case DNS_REP: + for (i = 0; i < nss; i++) + n += nameservers[i].nreplies; + Answer = snmp_var_new_integer(Var->name, Var->name_length, + n, + SMI_COUNTER32); + break; + case DNS_SERVERS: + Answer = snmp_var_new_integer(Var->name, Var->name_length, + 0, + SMI_COUNTER32); + break; + default: + *ErrP = SNMP_ERR_NOSUCHNAME; + break; + } + return Answer; +} +#endif /*SQUID_SNMP */ diff --git a/src/main.cc b/src/main.cc index d5604654f7..bc4e2ff897 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.313 2000/05/31 07:01:42 hno Exp $ + * $Id: main.cc,v 1.314 2000/05/31 08:57:08 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -337,8 +337,9 @@ mainReconfigure(void) #if USE_WCCP wccpConnectionClose(); #endif +#if USE_DNSSERVERS dnsShutdown(); -#if !USE_DNSSERVERS +#else idnsShutdown(); #endif redirectShutdown(); @@ -351,8 +352,9 @@ mainReconfigure(void) ipcache_restart(); /* clear stuck entries */ fqdncache_restart(); /* sigh, fqdncache too */ errorInitialize(); /* reload error pages */ +#if USE_DNSSERVERS dnsInit(); -#if !USE_DNSSERVERS +#else idnsInit(); #endif redirectInit(); @@ -378,7 +380,9 @@ static void mainRotate(void) { icmpClose(); +#if USE_DNSSERVERS dnsShutdown(); +#endif redirectShutdown(); authenticateShutdown(); _db_rotate_log(); /* cache.log */ @@ -387,7 +391,9 @@ mainRotate(void) accessLogRotate(); /* access.log */ useragentRotateLog(); /* useragent.log */ icmpOpen(); +#if USE_DNSSERVERS dnsInit(); +#endif redirectInit(); authenticateInit(); } @@ -472,8 +478,9 @@ mainInitialize(void) disk_init(); /* disk_init must go before ipcache_init() */ ipcache_init(); fqdncache_init(); +#if USE_DNSSERVERS dnsInit(); -#if !USE_DNSSERVERS +#else idnsInit(); #endif redirectInit(); @@ -692,8 +699,9 @@ main(int argc, char **argv) do_shutdown = 0; shutting_down = 1; serverConnectionsClose(); +#if USE_DNSSERVERS dnsShutdown(); -#if !USE_DNSSERVERS +#else idnsShutdown(); #endif redirectShutdown(); diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 678ea2ca90..4c0fae8781 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -1,6 +1,6 @@ /* - * $Id: snmp_core.cc,v 1.42 2000/05/16 07:06:06 wessels Exp $ + * $Id: snmp_core.cc,v 1.43 2000/05/31 08:57:09 hno Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -263,12 +263,21 @@ snmpInit(void) LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0)), snmpAddNode(snmpCreateOid(LEN_SQ_NET + 1, SQ_NET, NET_DNS_CACHE), LEN_SQ_NET + 1, NULL, NULL, 3, +#if USE_DNSSERVERS snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_REQ), LEN_SQ_NET + 2, snmp_netDnsFn, static_Inst, 0), snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_REP), LEN_SQ_NET + 2, snmp_netDnsFn, static_Inst, 0), snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_SERVERS), LEN_SQ_NET + 2, snmp_netDnsFn, static_Inst, 0))), +#else + snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_REQ), + LEN_SQ_NET + 2, snmp_netIdnsFn, static_Inst, 0), + snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_REP), + LEN_SQ_NET + 2, snmp_netIdnsFn, static_Inst, 0), + snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_SERVERS), + LEN_SQ_NET + 2, snmp_netIdnsFn, static_Inst, 0))), +#endif snmpAddNode(snmpCreateOid(LEN_SQ_MESH, SQ_MESH), LEN_SQ_MESH, NULL, NULL, 2, snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 1, SQ_MESH, 1),