summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-10-03 04:29:13 +0000
committerfoobar <sniper@php.net>2003-10-03 04:29:13 +0000
commit09b8fdc2bb19ffe8a0d15fae0ab93196fbc10ca6 (patch)
treea54735b9394513c02857ef22814c1996e87801f5
parent5fee3a3ce128bc6773b03b0ca2681f54b8e745f3 (diff)
downloadphp-git-09b8fdc2bb19ffe8a0d15fae0ab93196fbc10ca6.tar.gz
Really fixed bug #25719.
(basically reverted to the original style of openssl checks found in 4.3.3)
-rw-r--r--acinclude.m435
1 files changed, 20 insertions, 15 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 6c0bdf8b54..340f79f191 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1603,6 +1603,11 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
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 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
])
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_DEFUN([PHP_SETUP_OPENSSL],[
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
])