helly           Thu Jan 30 13:31:36 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/dba       config.m4 
  Log:
  MFH: Allow to link against chosen modules correctly
  
Index: php4/ext/dba/config.m4
diff -u php4/ext/dba/config.m4:1.29.2.7 php4/ext/dba/config.m4:1.29.2.8
--- php4/ext/dba/config.m4:1.29.2.7     Tue Jan 28 10:00:15 2003
+++ php4/ext/dba/config.m4      Thu Jan 30 13:31:36 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.29.2.7 2003/01/28 15:00:15 sniper Exp $
+dnl $Id: config.m4,v 1.29.2.8 2003/01/30 18:31:36 helly Exp $
 dnl
 
 dnl Suppose we need FlatFile if no support or only CDB is used.
@@ -10,7 +10,8 @@
 
 AC_DEFUN(PHP_TEMP_LDFLAGS,[
   old_LDFLAGS=$LDFLAGS
-  LDFLAGS="$1 $LDFLAGS"
+dnl  LDFLAGS="$1 $LDFLAGS"
+  LDFLAGS="$1"
   $2
   LDFLAGS=$old_LDFLAGS
 ])
@@ -139,18 +140,20 @@
 dnl parameters(version, library list, function)
 AC_DEFUN(PHP_DBA_DB_CHECK,[
   for LIB in $2; do
-    PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
-      AC_CHECK_LIB($LIB, $3, [
-        AC_EGREP_CPP(yes,[
+    if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f 
+$THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
+      PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
+        AC_CHECK_LIB($LIB, $3, [
+          AC_EGREP_CPP(yes,[
 #include "$THIS_INCLUDE"
             yes
 #endif
-        ],[
-          THIS_LIBS=$LIB
-          break
+          ],[
+            THIS_LIBS=$LIB
+            break
+          ])
         ])
       ])
-    ])
+    fi
   done
   if test "$1" = "4"; then
     AC_MSG_CHECKING(for db4 minor version and patch level)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to