From: wessels <> Date: Tue, 3 Dec 1996 02:12:08 +0000 (+0000) Subject: lib cleanup X-Git-Tag: SQUID_3_0_PRE1~5355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6509a1a01d5180db4c00c9e06eaed56cece6437b;p=thirdparty%2Fsquid.git lib cleanup --- diff --git a/configure b/configure index ad6f415c66..0e54e6d71f 100755 --- a/configure +++ b/configure @@ -514,7 +514,7 @@ fi -# From configure.in Revision: 1.54 +# From configure.in Revision: 1.55 ac_aux_dir= for ac_dir in aux $srcdir/aux; do if test -f $ac_dir/install-sh; then @@ -2183,7 +2183,7 @@ else echo "$ac_t""no" 1>&6 fi -if test $ac_cv_lib_gnumalloc = no; then +if test "$ac_cv_lib_gnumalloc_main" = "no"; then case "$host" in *-sun-solaris*) echo "skipping libmalloc check for $host" @@ -2235,13 +2235,13 @@ fi ;; esac fi -echo $ac_n "checking for -lresolv""... $ac_c" 1>&6 -ac_lib_var=`echo resolv'_'main | tr './+\055' '__p_'` +echo $ac_n "checking for -lbsd""... $ac_c" 1>&6 +ac_lib_var=`echo bsd'_'main | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lresolv $LIBS" +LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&6 - ac_tr_lib=HAVE_LIB`echo resolv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_lib=HAVE_LIB`echo bsd | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi -echo $ac_n "checking for -lbsd""... $ac_c" 1>&6 -ac_lib_var=`echo bsd'_'main | tr './+\055' '__p_'` +echo $ac_n "checking for -lregex""... $ac_c" 1>&6 +ac_lib_var=`echo regex'_'main | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lbsd $LIBS" +LIBS="-lregex $LIBS" cat > conftest.$ac_ext <&6 - ac_tr_lib=HAVE_LIB`echo bsd | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi -echo $ac_n "checking for -lregex""... $ac_c" 1>&6 -ac_lib_var=`echo regex'_'main | tr './+\055' '__p_'` +echo $ac_n "checking for -lresolv""... $ac_c" 1>&6 +ac_lib_var=`echo resolv'_'inet_aton | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lregex $LIBS" +LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2344,13 +2342,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - REGEXLIB="-lregex" -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking for -l44bsd""... $ac_c" 1>&6 + echo $ac_n "checking for -l44bsd""... $ac_c" 1>&6 ac_lib_var=`echo 44bsd'_'inet_aton | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2358,7 +2350,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2394,60 +2386,27 @@ else echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for -lresolv""... $ac_c" 1>&6 -ac_lib_var=`echo resolv'_'inet_aton | tr './+\055' '__p_'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$ac_t""no" 1>&6 fi -rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for -l44bsd""... $ac_c" 1>&6 -ac_lib_var=`echo 44bsd'_'inet_aton | tr './+\055' '__p_'` +echo $ac_n "checking for -lresolv""... $ac_c" 1>&6 +ac_lib_var=`echo resolv'_'main | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-l44bsd $LIBS" +LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2460,16 +2419,12 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo 44bsd | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_lib=HAVE_LIB`echo resolv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 -fi + LIBS="-lresolv $LIBS" else echo "$ac_t""no" 1>&6 @@ -2484,7 +2439,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2524,7 +2479,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshadow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2566,7 +2521,7 @@ else ac_save_LIBS="$LIBS" LIBS="-labi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2600,7 +2555,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2711,7 +2666,7 @@ 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; }; then +if { (eval echo configure:2694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2786,7 +2741,7 @@ 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; }; then +if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2836,7 +2791,7 @@ if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -2887,7 +2842,7 @@ main() { } EOF -{ (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_MAXFD=`cat conftestval` else @@ -2906,7 +2861,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2923,7 +2878,7 @@ main () } EOF -{ (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -2942,7 +2897,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -2959,7 +2914,7 @@ main () } EOF -{ (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -2978,7 +2933,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2995,7 +2950,7 @@ main () } EOF -{ (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -3014,7 +2969,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -3031,7 +2986,7 @@ main () } EOF -{ (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -3047,7 +3002,7 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } @@ -3055,7 +3010,7 @@ int t() { char *s = sys_errlist[0]; ; return 0; } EOF -if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3071,7 +3026,7 @@ rm -f conftest* echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3094,7 +3049,7 @@ rm -f conftest* XTRA_OBJS='' -if test $ac_cv_lib_malloc = yes ; then +if test "$ac_cv_lib_malloc_main" = "yes" ; then if test -r /usr/lib/debug/malloc.o ; then XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o" fi diff --git a/configure.in b/configure.in index cf07a41c4e..9a65f90a21 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.55 1996/12/02 18:37:41 wessels Exp $ +dnl $Id: configure.in,v 1.56 1996/12/02 19:12:08 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.55 $)dnl +AC_REVISION($Revision: 1.56 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -217,7 +217,7 @@ 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 = no; then +if test "$ac_cv_lib_gnumalloc_main" = "no"; then case "$host" in *-sun-solaris*) echo "skipping libmalloc check for $host" @@ -230,15 +230,10 @@ if test $ac_cv_lib_gnumalloc = no; then ;; esac fi -AC_CHECK_LIB(resolv, main) AC_CHECK_LIB(bsd, main) AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"]) - -dnl We found a version of libresolv on SunOS 4.x which requires -l44bsd -dnl We have to first check to see if -l44bsd is present and has the -dnl function inet_aton -AC_CHECK_LIB(44bsd, inet_aton) AC_CHECK_LIB(resolv, inet_aton, AC_CHECK_LIB(44bsd, inet_aton)) +AC_CHECK_LIB(resolv, main) dnl Check for libcrypt dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD) @@ -509,7 +504,7 @@ AC_MSG_RESULT(no)) dnl Need the debugging version of malloc if available XTRA_OBJS='' -if test $ac_cv_lib_malloc = yes ; then +if test "$ac_cv_lib_malloc_main" = "yes" ; then if test -r /usr/lib/debug/malloc.o ; then XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o" fi