sniper          Fri Oct  3 00:29:14 2003 EDT

  Modified files:              
    /php-src    acinclude.m4 
  Log:
  Really fixed bug #25719.
  (basically reverted to the original style of openssl checks found in 4.3.3)
  
  
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.263 php-src/acinclude.m4:1.264
--- php-src/acinclude.m4:1.263  Wed Oct  1 20:35:09 2003
+++ php-src/acinclude.m4        Fri Oct  3 00:29:13 2003
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.263 2003/10/02 00:35:09 sniper Exp $
+dnl $Id: acinclude.m4,v 1.264 2003/10/03 04:29:13 sniper Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -1603,6 +1603,11 @@
       AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
     fi
 
+    if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
+      PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
+      PHP_EVAL_INCLINE($OPENSSL_INCS)
+    fi
+
   else 
 
     dnl If pkg-config fails for some reason, revert to the old method
@@ -1643,21 +1648,25 @@
     ])
     CPPFLAGS=$old_CPPFLAGS
 
+    PHP_ADD_INCLUDE($OPENSSL_INCDIR)
+    PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
+  
     PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
-      PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
-        found_openssl=yes
-        OPENSSL_LIBS="-L$OPENSSL_LIBDIR -lssl -lcrypto"
-        OPENSSL_INCS=-I$OPENSSL_INCDIR
-      ], [
-        AC_MSG_ERROR([libssl not found!])
-      ],[
-        -L$OPENSSL_LIBDIR -lssl -lcrypto
-      ])
-    ], [
+      PHP_ADD_LIBRARY(crypto,,$1)
+    ],[
       AC_MSG_ERROR([libcrypto not found!])
     ],[
       -L$OPENSSL_LIBDIR
     ])
+  
+    PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
+      PHP_ADD_LIBRARY(ssl,,$1)
+      found_openssl=yes
+    ],[
+      AC_MSG_ERROR([libssl not found!])
+    ],[
+      -L$OPENSSL_LIBDIR
+    ])
   fi
 
   dnl For apache 1.3.x static build
@@ -1665,11 +1674,7 @@
   AC_SUBST(OPENSSL_INCDIR_OPT)
 
   if test "$found_openssl" = "yes"; then
-    if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
-      PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
-      PHP_EVAL_INCLINE($OPENSSL_INCS)
-    fi
-    $2
+ifelse([$2],[],:,[$2])
 ifelse([$3],[],,[else $3])
   fi
 ])

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

Reply via email to