From 5c51415d95e9f2b63947d07d269032905fa6016d Mon Sep 17 00:00:00 2001 From: wessels <> Date: Thu, 1 Jan 1998 03:38:24 +0000 Subject: [PATCH] From: Henrik Nordstrom * Enable caching for extended tests (where appropriate) * --enable-store-key=sha|md5 * --enable-xmalloc-statistics * --enable-xmalloc-debug * The autoconf patches I sent earlier (setresuid, gnumalloc) * A fix to the setresuid patch (HAVE_SETRESUID was not updated) --- configure | 556 ++++++++++++++++++++++++++---------------- configure.in | 153 ++++++++---- include/autoconf.h.in | 15 ++ 3 files changed, 464 insertions(+), 260 deletions(-) diff --git a/configure b/configure index d3d8db3e90..d00b01834a 100755 --- a/configure +++ b/configure @@ -12,6 +12,16 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_default_prefix=/usr/local/squid +ac_help="$ac_help + --enable-gnuregex Compile GNUregex" +ac_help="$ac_help + --enable-hashkey[=sha|md5] + Use hash function as store index, instead of URL" +ac_help="$ac_help + --enable-xmalloc-debug Do sime simple malloc debugging" +ac_help="$ac_help + --enable-xmalloc-statistics + Show malloc statistics in status page" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -548,7 +558,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:552: checking host system type" >&5 +echo "configure:562: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -603,7 +613,7 @@ PRESET_CFLAGS="$CFLAGS" # 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:607: checking for $ac_word" >&5 +echo "configure:617: 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 @@ -632,7 +642,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:636: checking for $ac_word" >&5 +echo "configure:646: 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 @@ -680,7 +690,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:694: 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. @@ -690,11 +700,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -714,12 +724,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:718: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:728: 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:723: checking whether we are using GNU C" >&5 +echo "configure:733: 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 @@ -728,7 +738,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:732: \"$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:742: \"$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 @@ -743,7 +753,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:747: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:757: 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 @@ -803,7 +813,7 @@ if test -z "$PRESET_LDFLAGS"; then fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:807: checking how to run the C preprocessor" >&5 +echo "configure:817: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -818,13 +828,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:828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -835,13 +845,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:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -874,7 +884,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:878: checking for a BSD compatible install" >&5 +echo "configure:888: 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 @@ -926,7 +936,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:930: checking for $ac_word" >&5 +echo "configure:940: 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 @@ -953,7 +963,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:957: checking whether ln -s works" >&5 +echo "configure:967: 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 @@ -976,7 +986,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:980: checking for $ac_word" >&5 +echo "configure:990: 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 @@ -1008,7 +1018,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:1012: checking for $ac_word" >&5 +echo "configure:1022: 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 @@ -1040,7 +1050,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:1044: checking for $ac_word" >&5 +echo "configure:1054: 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 @@ -1072,7 +1082,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:1076: checking for $ac_word" >&5 +echo "configure:1086: 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 @@ -1104,7 +1114,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:1108: checking for $ac_word" >&5 +echo "configure:1118: 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 @@ -1136,7 +1146,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:1140: checking for $ac_word" >&5 +echo "configure:1150: 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 @@ -1168,7 +1178,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:1172: checking for $ac_word" >&5 +echo "configure:1182: 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 @@ -1200,7 +1210,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:1204: checking for $ac_word" >&5 +echo "configure:1214: 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 @@ -1232,7 +1242,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:1236: checking for $ac_word" >&5 +echo "configure:1246: 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 @@ -1264,7 +1274,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:1268: checking for $ac_word" >&5 +echo "configure:1278: 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 @@ -1314,12 +1324,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:1318: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1328: 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> @@ -1327,7 +1337,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1352,7 +1362,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:1356: checking for opendir in -ldir" >&5 +echo "configure:1366: 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 @@ -1360,7 +1370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1393,7 +1403,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1397: checking for opendir in -lx" >&5 +echo "configure:1407: 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 @@ -1401,7 +1411,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1435,12 +1445,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1439: checking for ANSI C header files" >&5 +echo "configure:1449: 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 @@ -1448,7 +1458,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1465,7 +1475,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 @@ -1483,7 +1493,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 @@ -1504,7 +1514,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1515,7 +1525,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1592,17 +1602,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:1596: checking for $ac_hdr" >&5 +echo "configure:1606: 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:1606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1630,12 +1640,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1634: checking for working const" >&5 +echo "configure:1644: 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:1698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1705,14 +1715,14 @@ EOF fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1709: checking whether byte ordering is bigendian" >&5 +echo "configure:1719: 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 @@ -1723,11 +1733,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1737: \"$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 @@ -1738,7 +1748,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1758,7 +1768,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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1796,88 +1806,122 @@ fi echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6 -echo "configure:1800: checking if ANSI prototypes work" >&5 -cat > conftest.$ac_ext <&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:1823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_ANSI_PROTOTYPES 1 -EOF - -echo "$ac_t""yes" 1>&6 + ac_cv_have_ansi_prototypes="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""no" 1>&6 + ac_cv_have_ansi_prototypes="no" fi rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_ansi_prototypes" 1>&6 +if test $ac_cv_have_ansi_prototypes = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_ANSI_PROTOTYPES 1 +EOF + +fi + echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 -echo "configure:1825: checking for tm->tm_gmtoff" >&5 -cat > conftest.$ac_ext <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 int main() { struct tm foo; -foo.tm_gmtoff = 0; + foo.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:1836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_TM_GMTOFF 1 -EOF - -echo "$ac_t""yes" 1>&6 + ac_cv_have_tm_gmoff="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""no" 1>&6 + ac_cv_have_tm_gmoff="no" fi rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_tm_gmoff" 1>&6 +if test $ac_cv_have_tm_gmoff = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_TM_GMTOFF 1 +EOF + +fi + echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 -echo "configure:1852: checking for extended mallinfo" >&5 -cat > conftest.$ac_ext <&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 int main() { struct mallinfo foo; -foo.mxfast = 0; + foo.mxfast = 0; ; return 0; } EOF -if { (eval echo configure:1863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_EXT_MALLINFO 1 -EOF - -echo "$ac_t""yes" 1>&6 + ac_cv_have_ext_mallinfo="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""no" 1>&6 + ac_cv_have_ext_mallinfo="no" fi rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_ext_mallinfo" 1>&6 +if test $ac_cv_have_ext_mallinfo = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_EXT_MALLINFO 1 +EOF + +fi + echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6 -echo "configure:1879: checking for ip->ip_hl" >&5 -cat > conftest.$ac_ext <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 @@ -1891,26 +1935,32 @@ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_IP_HL 1 -EOF - -echo "$ac_t""yes" 1>&6 + ac_cv_have_ip_hl="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""no" 1>&6 + ac_cv_have_ip_hl="no" fi rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_ip_hl" 1>&6 +if test $ac_cv_have_ip_hl = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_IP_HL 1 +EOF + +fi + echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1914: checking size of int" >&5 +echo "configure:1964: 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 @@ -1918,7 +1968,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1929,7 +1979,7 @@ main() exit(0); } EOF -if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1949,7 +1999,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1953: checking size of long" >&5 +echo "configure:2003: 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 @@ -1957,7 +2007,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1968,7 +2018,7 @@ main() exit(0); } EOF -if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1991,19 +2041,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:1995: checking for working alloca.h" >&5 +echo "configure:2045: 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:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2024,12 +2074,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2028: checking for alloca" >&5 +echo "configure:2078: 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; then +if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2084,12 +2134,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2088: checking whether alloca needs Cray hooks" >&5 +echo "configure:2138: 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:2118: checking for $ac_func" >&5 +echo "configure:2168: 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; then +if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2169,7 +2219,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2173: checking stack direction for C alloca" >&5 +echo "configure:2223: 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 @@ -2177,7 +2227,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2219,12 +2269,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2223: checking for pid_t" >&5 +echo "configure:2273: 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 @@ -2252,12 +2302,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2256: checking for size_t" >&5 +echo "configure:2306: 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 @@ -2285,12 +2335,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:2289: checking for ssize_t" >&5 +echo "configure:2339: 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 @@ -2318,12 +2368,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2322: checking for off_t" >&5 +echo "configure:2372: 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 @@ -2351,12 +2401,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2355: checking for mode_t" >&5 +echo "configure:2405: 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 @@ -2385,7 +2435,7 @@ fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:2389: checking for main in -lnsl" >&5 +echo "configure:2439: 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 @@ -2393,14 +2443,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2428,7 +2478,7 @@ else fi echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:2432: checking for main in -lsocket" >&5 +echo "configure:2482: 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 @@ -2436,14 +2486,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2471,7 +2521,7 @@ else fi echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6 -echo "configure:2475: checking for main in -lgnumalloc" >&5 +echo "configure:2525: 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 @@ -2479,14 +2529,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnumalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2513,7 +2563,12 @@ else echo "$ac_t""no" 1>&6 fi -if test "$ac_cv_lib_gnumalloc_main" = "no"; then +if test "$ac_cv_lib_gnumalloc_main" = "yes"; then + echo "Disabling extended malloc functions when using gnumalloc" + ac_cv_func_mallinfo=no + ac_cv_func_mallocblksize=no + ac_cv_func_mallopt=no +else case "$host" in *-sun-solaris*) echo "skipping libmalloc check for $host" @@ -2523,7 +2578,7 @@ if test "$ac_cv_lib_gnumalloc_main" = "no"; then ;; *) echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 -echo "configure:2527: checking for main in -lmalloc" >&5 +echo "configure:2582: 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 @@ -2531,14 +2586,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2569,7 +2624,7 @@ fi esac fi echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6 -echo "configure:2573: checking for main in -lbsd" >&5 +echo "configure:2628: 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 @@ -2577,14 +2632,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2612,7 +2667,7 @@ else fi echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6 -echo "configure:2616: checking for main in -lregex" >&5 +echo "configure:2671: 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 @@ -2620,14 +2675,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lregex $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2648,7 +2703,7 @@ else fi echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:2652: checking for inet_aton in -lresolv" >&5 +echo "configure:2707: 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 @@ -2656,7 +2711,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2683,7 +2738,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:2687: checking for inet_aton in -l44bsd" >&5 +echo "configure:2742: 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 @@ -2691,7 +2746,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2734,7 +2789,7 @@ else fi echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6 -echo "configure:2738: checking for main in -lresolv" >&5 +echo "configure:2793: 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 @@ -2742,14 +2797,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2777,7 +2832,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:2781: checking for main in -lm" >&5 +echo "configure:2836: 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 @@ -2785,14 +2840,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2821,7 +2876,7 @@ fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2825: checking for crypt in -lcrypt" >&5 +echo "configure:2880: 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 @@ -2829,7 +2884,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2863,7 +2918,7 @@ fi echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:2867: checking for main in -lpthread" >&5 +echo "configure:2922: 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 @@ -2871,14 +2926,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2981,12 +3036,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2985: checking for $ac_func" >&5 +echo "configure:3040: 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; then +if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3043,7 +3098,7 @@ case "$host" in esac echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6 -echo "configure:3047: checking if setresuid is implemented" >&5 +echo "configure:3102: 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 @@ -3051,22 +3106,20 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < -int -main() -{ - if (setresuid(-1, -1, -1)) { - perror("setresuid:"); - exit(1); + int main() { + if(setresuid(-1,-1,-1)) { + perror("setresuid:"); + exit(1); } exit(0); -} - + } + EOF -if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_setresuid="yes" else @@ -3082,9 +3135,73 @@ fi fi echo "$ac_t""$ac_cv_func_setresuid" 1>&6 +if test "$ac_cv_func_setresuid" = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_SETRESUID 1 +EOF + +fi + +# Check whether --enable-gnuregex or --disable-gnuregex was given. +if test "${enable_gnuregex+set}" = set; then + enableval="$enable_gnuregex" + USE_GNUREGEX=$enableval +fi + + +# Check whether --enable-hashkey or --disable-hashkey was given. +if test "${enable_hashkey+set}" = set; then + enableval="$enable_hashkey" + case "$enableval" in + yes|sha) + echo "Store key set to SHA" + cat >> confdefs.h <<\EOF +#define STORE_KEY_SHA 1 +EOF + + ;; + md5) + echo "Store key set to MD5" + cat >> confdefs.h <<\EOF +#define STORE_KEY_MD5 1 +EOF + + ;; + esac + +fi + + +# Check whether --enable-xmalloc_debug or --disable-xmalloc_debug was given. +if test "${enable_xmalloc_debug+set}" = set; then + enableval="$enable_xmalloc_debug" + if test "$enableval" = "yes" ; then + echo "Malloc debugging enabled" + cat >> confdefs.h <<\EOF +#define XMALLOC_DEBUG 1 +EOF + + fi + +fi + + +# Check whether --enable-xmalloc_statistics or --disable-xmalloc_statistics was given. +if test "${enable_xmalloc_statistics+set}" = set; then + enableval="$enable_xmalloc_statistics" + if test "$enableval" = "yes" ; then + echo "Malloc statistics enabled" + cat >> confdefs.h <<\EOF +#define XMALLOC_STATISTICS 1 +EOF + + fi + +fi + echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6 -echo "configure:3088: checking if GNUregex needs to be compiled" >&5 +echo "configure:3205: checking if GNUregex needs to be compiled" >&5 if test "$ac_cv_func_regcomp" = "no" ; then USE_GNUREGEX="yes" else @@ -3116,12 +3233,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3120: checking for $ac_func" >&5 +echo "configure:3237: 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; then +if { (eval echo configure:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3172,12 +3289,12 @@ done echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:3176: checking Default FD_SETSIZE value" >&5 +echo "configure:3293: 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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -3220,12 +3337,12 @@ EOF echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 -echo "configure:3224: checking Maximum number of filedescriptors we can open" >&5 +echo "configure:3341: checking Maximum number of filedescriptors we can open" >&5 if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -3277,7 +3394,7 @@ main() { } EOF -if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -3296,12 +3413,12 @@ EOF echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6 -echo "configure:3300: checking Default UDP send buffer size" >&5 +echo "configure:3417: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -3320,7 +3437,7 @@ main () } EOF -if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -3339,12 +3456,12 @@ EOF echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:3343: checking Default UDP receive buffer size" >&5 +echo "configure:3460: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -3363,7 +3480,7 @@ main () } EOF -if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -3382,12 +3499,12 @@ EOF echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:3386: checking Default TCP send buffer size" >&5 +echo "configure:3503: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -3406,7 +3523,7 @@ main () } EOF -if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -3425,12 +3542,12 @@ EOF echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:3429: checking Default TCP receive buffer size" >&5 +echo "configure:3546: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -3449,7 +3566,7 @@ main () } EOF -if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -3468,41 +3585,50 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 -echo "configure:3472: checking if sys_errlist is already defined" >&5 -cat > conftest.$ac_ext <&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[0]; +char *s = sys_errlist0; ; return 0; } EOF -if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - echo "$ac_t""yes" 1>&6 + ac_cv_needs_sys_errlist="no" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF + ac_cv_needs_sys_errlist="yes" +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_needs_sys_errlist" 1>&6 +if test "$ac_cv_needs_sys_errlist" = "yes" ; then + cat >> confdefs.h <<\EOF #define NEED_SYS_ERRLIST 1 EOF fi -rm -f conftest* echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:3497: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:3623: checking for libresolv _dns_ttl_ hack" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF diff --git a/configure.in b/configure.in index f60bd02e03..e3045ca71e 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.86 1997/12/31 05:06:22 wessels Exp $ +dnl $Id: configure.in,v 1.87 1997/12/31 20:38:24 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.86 $)dnl +AC_REVISION($Revision: 1.87 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -185,33 +185,42 @@ AC_CHECK_HEADERS( \ AC_C_CONST AC_C_BIGENDIAN -AC_MSG_CHECKING(if ANSI prototypes work) -AC_TRY_COMPILE([int foo(char *); int foo (char *bar) {return 1;}], -[foo("bar")], -[AC_DEFINE(HAVE_ANSI_PROTOTYPES) -AC_MSG_RESULT(yes)], -AC_MSG_RESULT(no)) +AC_CACHE_CHECK(if ANSI prototypes work,ac_cv_have_ansi_prototypes, [ + AC_TRY_COMPILE([int foo(char *); int foo (char *bar) {return 1;}], + [foo("bar")], + ac_cv_have_ansi_prototypes="yes", + ac_cv_have_ansi_prototypes="no") +]) +if test $ac_cv_have_ansi_prototypes = "yes" ; then + AC_DEFINE(HAVE_ANSI_PROTOTYPES) +fi -AC_MSG_CHECKING(for tm->tm_gmtoff) -AC_TRY_COMPILE([#include +AC_CACHE_CHECK(for tm->tm_gmtoff,ac_cv_have_tm_gmoff, [ + AC_TRY_COMPILE([#include #include ], -[struct tm foo; -foo.tm_gmtoff = 0;], -[AC_DEFINE(HAVE_TM_GMTOFF) -AC_MSG_RESULT(yes)], -AC_MSG_RESULT(no)) + [struct tm foo; + foo.tm_gmtoff = 0;], + ac_cv_have_tm_gmoff="yes", + ac_cv_have_tm_gmoff="no") +]) +if test $ac_cv_have_tm_gmoff = "yes" ; then + AC_DEFINE(HAVE_TM_GMTOFF) +fi -AC_MSG_CHECKING(for extended mallinfo) -AC_TRY_COMPILE([#include +AC_CACHE_CHECK(for extended mallinfo,ac_cv_have_ext_mallinfo, [ + AC_TRY_COMPILE([#include #include ], -[struct mallinfo foo; -foo.mxfast = 0;], -[AC_DEFINE(HAVE_EXT_MALLINFO) -AC_MSG_RESULT(yes)], -AC_MSG_RESULT(no)) + [struct mallinfo foo; + foo.mxfast = 0;], + ac_cv_have_ext_mallinfo="yes", + ac_cv_have_ext_mallinfo="no") +]) +if test $ac_cv_have_ext_mallinfo = "yes" ; then + AC_DEFINE(HAVE_EXT_MALLINFO) +fi -AC_MSG_CHECKING(for ip->ip_hl) -AC_TRY_COMPILE([#include +AC_CACHE_CHECK(for ip->ip_hl, ac_cv_have_ip_hl, [ + AC_TRY_COMPILE([#include #include #include #include @@ -221,11 +230,14 @@ AC_TRY_COMPILE([#include #ifndef __linux__ #define iphdr ip #endif], -[struct iphdr ip; -ip.ip_hl= 0;], -[AC_DEFINE(HAVE_IP_HL) -AC_MSG_RESULT(yes)], -AC_MSG_RESULT(no)) + [struct iphdr ip; + ip.ip_hl= 0;], + ac_cv_have_ip_hl="yes", + ac_cv_have_ip_hl="no") +]) +if test $ac_cv_have_ip_hl = "yes" ; then + AC_DEFINE(HAVE_IP_HL) +fi dnl Check for typedefs AC_CHECK_SIZEOF(int) @@ -244,7 +256,12 @@ dnl Check for needed libraries AC_CHECK_LIB(nsl, main) AC_CHECK_LIB(socket, main) AC_CHECK_LIB(gnumalloc, main) -if test "$ac_cv_lib_gnumalloc_main" = "no"; then +if test "$ac_cv_lib_gnumalloc_main" = "yes"; then + echo "Disabling extended malloc functions when using gnumalloc" + ac_cv_func_mallinfo=no + ac_cv_func_mallocblksize=no + ac_cv_func_mallopt=no +else case "$host" in *-sun-solaris*) echo "skipping libmalloc check for $host" @@ -366,20 +383,57 @@ dnl to know that setresuid() exists, because RedHat 5.0 declares dnl setresuid() but doesn't implement it. dnl AC_CACHE_CHECK(if setresuid is implemented, ac_cv_func_setresuid, -AC_TRY_RUN([ + AC_TRY_RUN([ #include -int -main() -{ - if (setresuid(-1, -1, -1)) { - perror("setresuid:"); - exit(1); + int main() { + if(setresuid(-1,-1,-1)) { + perror("setresuid:"); + exit(1); } exit(0); -} -],ac_cv_func_setresuid="yes",ac_cv_func_setresuid="no") + } + ],ac_cv_func_setresuid="yes",ac_cv_func_setresuid="no") ) +if test "$ac_cv_func_setresuid" = "yes" ; then + AC_DEFINE(HAVE_SETRESUID) +fi +AC_ARG_ENABLE(gnuregex, +[ --enable-gnuregex Compile GNUregex], +[USE_GNUREGEX=$enableval]) + +AC_ARG_ENABLE(hashkey, +[ --enable-hashkey[=sha|md5] + Use hash function as store index, instead of URL], +[ case "$enableval" in + yes|sha) + echo "Store key set to SHA" + AC_DEFINE(STORE_KEY_SHA) + ;; + md5) + echo "Store key set to MD5" + AC_DEFINE(STORE_KEY_MD5) + ;; + esac +]) + +AC_ARG_ENABLE(xmalloc_debug, +[ --enable-xmalloc-debug Do sime simple malloc debugging], +[ if test "$enableval" = "yes" ; then + echo "Malloc debugging enabled" + AC_DEFINE(XMALLOC_DEBUG) + fi +]) + +AC_ARG_ENABLE(xmalloc_statistics, +[ --enable-xmalloc-statistics + Show malloc statistics in status page], +[ if test "$enableval" = "yes" ; then + echo "Malloc statistics enabled" + AC_DEFINE(XMALLOC_STATISTICS) + fi +]) + AC_MSG_CHECKING(if GNUregex needs to be compiled) if test "$ac_cv_func_regcomp" = "no" ; then USE_GNUREGEX="yes" @@ -408,6 +462,7 @@ AC_REPLACE_FUNCS(\ strerror \ ) +dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default FD_SETSIZE value) AC_TRY_RUN([ #if HAVE_STDIO_H @@ -436,6 +491,7 @@ DEFAULT_FD_SETSIZE=256) AC_MSG_RESULT($DEFAULT_FD_SETSIZE) AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE) +dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Maximum number of filedescriptors we can open) AC_TRY_RUN([ #include @@ -492,6 +548,7 @@ SQUID_MAXFD=256) AC_MSG_RESULT($SQUID_MAXFD) AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD) +dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default UDP send buffer size) AC_TRY_RUN([ #include @@ -515,6 +572,7 @@ SQUID_UDP_SO_SNDBUF=16384) AC_MSG_RESULT($SQUID_UDP_SO_SNDBUF) AC_DEFINE_UNQUOTED(SQUID_UDP_SO_SNDBUF, $SQUID_UDP_SO_SNDBUF) +dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default UDP receive buffer size) AC_TRY_RUN([ #include @@ -538,6 +596,7 @@ SQUID_UDP_SO_RCVBUF=16384) AC_MSG_RESULT($SQUID_UDP_SO_RCVBUF) AC_DEFINE_UNQUOTED(SQUID_UDP_SO_RCVBUF, $SQUID_UDP_SO_RCVBUF) +dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default TCP send buffer size) AC_TRY_RUN([ #include @@ -561,6 +620,7 @@ SQUID_TCP_SO_SNDBUF=16384) AC_MSG_RESULT($SQUID_TCP_SO_SNDBUF) AC_DEFINE_UNQUOTED(SQUID_TCP_SO_SNDBUF, $SQUID_TCP_SO_SNDBUF) +dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default TCP receive buffer size) AC_TRY_RUN([ #include @@ -584,13 +644,16 @@ SQUID_TCP_SO_RCVBUF=16384) AC_MSG_RESULT($SQUID_TCP_SO_RCVBUF) AC_DEFINE_UNQUOTED(SQUID_TCP_SO_RCVBUF, $SQUID_TCP_SO_RCVBUF) -AC_MSG_CHECKING(if sys_errlist[] is already defined) -AC_TRY_COMPILE([#include ], -[char *s = sys_errlist[0];], -AC_MSG_RESULT(yes), -[AC_MSG_RESULT(no) -AC_DEFINE(NEED_SYS_ERRLIST)]) +AC_CACHE_CHECK(if sys_errlist is already defined, ac_cv_needs_sys_errlist, + AC_TRY_COMPILE([#include ],[char *s = sys_errlist[0];], + ac_cv_needs_sys_errlist="no", + ac_cv_needs_sys_errlist="yes") +) +if test "$ac_cv_needs_sys_errlist" = "yes" ; then + AC_DEFINE(NEED_SYS_ERRLIST) +fi +dnl Not cached since people are likely to change this AC_MSG_CHECKING(for libresolv _dns_ttl_ hack) AC_TRY_LINK(extern int _dns_ttl_;,return _dns_ttl_;, [AC_MSG_RESULT(yes) diff --git a/include/autoconf.h.in b/include/autoconf.h.in index 64e5164d56..1ed136dbee 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -92,6 +92,21 @@ /* signed size_t, grr */ #undef ssize_t +/* Define if you have the setresuid function. */ +#undef HAVE_SETRESUID + +/* Define if you want to use SHA as store index key. */ +#undef STORE_KEY_SHA + +/* Define if you want to use MD5 as store index key. */ +#undef STORE_KEY_MD5 + +/* Define to do simple malloc debugging */ +#undef XMALLOC_DEBUG + +/* Define to have malloc statistics */ +#undef XMALLOC_STATISTICS + /* The number of bytes in a int. */ #undef SIZEOF_INT -- 2.47.3