Making --with-openssl to check the version..
| From: | Jani Taskinen | Date: | Wed, 06 Dec 2000 23:48:58 +0000 |
| Subject: | Making --with-openssl to check the version.. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40271@lists.php.net to get a copy of this message | ||
The patch below should do the trick..but I first want to know
if this is the right way (tm) to do this before I commit it.
This check is needed as the new openssl extension does not work
with < 0.9.6 versions of openssl.
--Jani
Index: configure.in
===================================================================
RCS file: /repository/php4/configure.in,v
retrieving revision 1.197
diff -u -r1.197 configure.in
--- configure.in 2000/12/02 13:26:03 1.197
+++ configure.in 2000/12/06 23:42:29
@@ -523,6 +523,25 @@
AC_MSG_ERROR(Cannot find OpenSSL's <evp.h>)
fi
+ old_CFLAGS=$CFLAGS
+ CFLAGS="-I$OPENSSL_INC"
+ AC_MSG_CHECKING(for OpenSSL version)
+ AC_TRY_RUN([
+ #include <openssl/opensslv.h>
+ main() {
+ if(OPENSSL_VERSION_NUMBER >= 0x0090600fL) {
+ exit(0);
+ } else {
+ exit(1);
+ }
+ }
+ ],[
+ AC_MSG_RESULT(>= 0.9.6)
+ ],[
+ AC_MSG_ERROR(OpenSSL version 0.9.6 or greater required.)
+ ])
+ CFLAGS=$old_CFLAGS
+
AC_ADD_LIBPATH($OPENSSL_DIR/lib)
AC_ADD_LIBRARY(ssl)
AC_ADD_LIBRARY(crypto)