]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do the dbopen compile test proper to see if -ldb is needed
authorhno <>
Tue, 23 May 2006 06:28:14 +0000 (06:28 +0000)
committerhno <>
Tue, 23 May 2006 06:28:14 +0000 (06:28 +0000)
configure
configure.in

index 35f85fef79c66f42c6ae526c9fdb81b04863b293..5752bc4d94fd32ca0f748d2d1528235d825d12b2 100755 (executable)
--- a/configure
+++ b/configure
@@ -39009,6 +39009,7 @@ if test "${ac_cv_dbopen_libdb+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
+SAVED_LIBS="$LIBS"; LIBS="$LIBS -ldb"
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -39035,9 +39036,9 @@ dbopen((void *)0L, 0, 0, DB_HASH, (void *)0L)
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -39051,25 +39052,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
+        { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  LIB_DB="-ldb"
-    ac_cv_dbopen_libdb="yes"
+  ac_cv_dbopen_libdb="yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_dbopen_libdb="no"
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS="$SAVED_LIBS"
 
 fi
 echo "$as_me:$LINENO: result: $ac_cv_dbopen_libdb" >&5
 echo "${ECHO_T}$ac_cv_dbopen_libdb" >&6
+if test ac_cv_dbopen_libdb = yes; then
+    LIB_DB="-ldb"
+fi
 
 
 case "$host" in
index a0fca20cb5bcb4121ca489b7ff13112557ed03aa..0cb06fb26deb487b5fec60564a0506876243ef3c 100644 (file)
@@ -3,7 +3,7 @@ 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.412 2006/05/22 21:22:06 hno Exp $
+dnl  $Id: configure.in,v 1.413 2006/05/23 00:28:15 hno Exp $
 dnl
 dnl
 dnl
@@ -13,7 +13,7 @@ AC_CONFIG_SRCDIR([src/main.cc])
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE([tar-ustar])
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.412 $)dnl
+AC_REVISION($Revision: 1.413 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -2290,7 +2290,8 @@ dnl Check for libdb
 DBLIB=
 dnl 1.85
 AC_CACHE_CHECK(if dbopen needs -ldb,ac_cv_dbopen_libdb, [
-  AC_TRY_COMPILE([
+SAVED_LIBS="$LIBS"; LIBS="$LIBS -ldb"
+  AC_TRY_LINK([
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -2303,10 +2304,13 @@ AC_CACHE_CHECK(if dbopen needs -ldb,ac_cv_dbopen_libdb, [
 #include <db.h>
 #endif],
     [dbopen((void *)0L, 0, 0, DB_HASH, (void *)0L)],
-    LIB_DB="-ldb"
     ac_cv_dbopen_libdb="yes",
     ac_cv_dbopen_libdb="no")
+LIBS="$SAVED_LIBS"
 ])
+if test ac_cv_dbopen_libdb = yes; then
+    LIB_DB="-ldb"
+fi
 AC_SUBST(LIB_DB)
 
 dnl System-specific library modifications