From: Sascha Schumann Date: Thu, 14 Dec 2000 17:29:38 +0000 (+0000) Subject: New m4 macros should go into acinclude.m4. X-Git-Tag: php-4.0.5RC1~895 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80e1124c218923a31b872a3d820e812e6d6c4660;p=php New m4 macros should go into acinclude.m4. --- diff --git a/acinclude.m4 b/acinclude.m4 index 36a4102a40..cf0d6a87d7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -4,6 +4,43 @@ dnl This file contains local autoconf functions. sinclude(dynlib.m4) +AC_DEFUN(PHP_SETUP_OPENSSL,[ + if test "$PHP_OPENSSL" = "no"; then + PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" + fi + + for i in $PHP_OPENSSL; do + if test -r $i/include/openssl/evp.h; then + OPENSSL_DIR=$i + OPENSSL_INC=$i/include + fi + done + + if test -z "$OPENSSL_DIR"; then + AC_MSG_ERROR(Cannot find OpenSSL's ) + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-I$OPENSSL_INC" + AC_MSG_CHECKING(for OpenSSL version) + AC_EGREP_CPP(yes,[ + #include + #if OPENSSL_VERSION_NUMBER >= 0x0090600fL + yes + #endif + ],[ + AC_MSG_RESULT(>= 0.9.6) + ],[ + AC_MSG_ERROR(OpenSSL version 0.9.6 or greater required.) + ]) + CPPFLAGS=$old_CPPFLAGS + + AC_ADD_LIBPATH($OPENSSL_DIR/lib) + AC_ADD_LIBRARY(ssl) + AC_ADD_LIBRARY(crypto) + AC_ADD_INCLUDE($OPENSSL_INC) +]) + dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD) dnl dnl Use this macro, if you need to add libraries and or library search diff --git a/configure.in b/configure.in index 2ccfc50d1c..ab578bc3b2 100644 --- a/configure.in +++ b/configure.in @@ -511,43 +511,6 @@ if test "$PHP_OPENSSL" = "yes"; then PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" fi -AC_DEFUN(PHP_SETUP_OPENSSL,[ - if test "$PHP_OPENSSL" = "no"; then - PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl" - fi - - for i in $PHP_OPENSSL; do - if test -r $i/include/openssl/evp.h; then - OPENSSL_DIR=$i - OPENSSL_INC=$i/include - fi - done - - if test -z "$OPENSSL_DIR"; then - AC_MSG_ERROR(Cannot find OpenSSL's ) - fi - - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS="-I$OPENSSL_INC" - AC_MSG_CHECKING(for OpenSSL version) - AC_EGREP_CPP(yes,[ - #include - #if OPENSSL_VERSION_NUMBER >= 0x0090600fL - yes - #endif - ],[ - AC_MSG_RESULT(>= 0.9.6) - ],[ - AC_MSG_ERROR(OpenSSL version 0.9.6 or greater required.) - ]) - CPPFLAGS=$old_CPPFLAGS - - AC_ADD_LIBPATH($OPENSSL_DIR/lib) - AC_ADD_LIBRARY(ssl) - AC_ADD_LIBRARY(crypto) - AC_ADD_INCLUDE($OPENSSL_INC) -]) - if test "$PHP_OPENSSL" != "no"; then PHP_SETUP_OPENSSL fi