sniper          Fri Oct  3 00:29:24 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    acinclude.m4 
  Log:
  MFH
  
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.218.2.30 php-src/acinclude.m4:1.218.2.31
--- php-src/acinclude.m4:1.218.2.30     Wed Oct  1 20:35:31 2003
+++ php-src/acinclude.m4        Fri Oct  3 00:29:24 2003
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.218.2.30 2003/10/02 00:35:31 sniper Exp $
+dnl $Id: acinclude.m4,v 1.218.2.31 2003/10/03 04:29:24 sniper Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -1609,6 +1609,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
@@ -1649,21 +1654,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
@@ -1671,11 +1680,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