sniper Mon Jun 23 23:41:37 2003 EDT
Added files: (Branch: PHP_5)
/php-src/ext/openssl config0.m4
Removed files:
/php-src/ext/openssl config.m4
Modified files:
/php-src acinclude.m4 configure.in
/php-src/ext/snmp config.m4
/php-src/scripts phpize.m4
Log:
Synced PHP_SETUP_OPENSSL with PHP_SETUP_ICONV and PHP_SETUP_LIBXML macros.
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.246 php-src/acinclude.m4:1.246.2.1
--- php-src/acinclude.m4:1.246 Sun Jun 8 20:17:03 2003
+++ php-src/acinclude.m4 Mon Jun 23 23:41:36 2003
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.246 2003/06/09 00:17:03 sniper Exp $
+dnl $Id: acinclude.m4,v 1.246.2.1 2003/06/24 03:41:36 sniper Exp $
dnl
dnl This file contains local autoconf functions.
@@ -177,7 +177,16 @@
$1=[$]ac_new_flags
])
+dnl
+dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
+dnl
+dnl Common setup macro for openssl
+dnl
AC_DEFUN([PHP_SETUP_OPENSSL],[
+ found_openssl=no
+ unset OPENSSL_INCDIR
+ unset OPENSSL_LIBDIR
+
if test "$PHP_OPENSSL" = "yes"; then
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
@@ -214,27 +223,33 @@
])
CPPFLAGS=$old_CPPFLAGS
- PHP_ADD_INCLUDE($OPENSSL_INCDIR)
- PHP_ADD_LIBPATH($OPENSSL_LIBDIR)
-
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
- PHP_ADD_LIBRARY(crypto)
- ],[
+ PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
+ found_openssl=yes
+ ], [
+ AC_MSG_ERROR([libssl not found!])
+ ],[
+ -L$OPENSSL_LIBDIR
+ ])
+ ], [
AC_MSG_ERROR([libcrypto not found!])
],[
-L$OPENSSL_LIBDIR
])
- PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
- PHP_ADD_LIBRARY(ssl)
- ],[
- AC_MSG_ERROR([libssl not found!])
- ],[
- -L$OPENSSL_LIBDIR
- ])
-
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
AC_SUBST(OPENSSL_INCDIR_OPT)
+
+ if test "$found_openssl" = "yes"; then
+ if test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR"; then
+ PHP_ADD_INCLUDE($OPENSSL_INCDIR)
+ PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
+ PHP_ADD_LIBRARY(crypto,,$1)
+ PHP_ADD_LIBRARY(ssl,, $1)
+ fi
+ $2
+ifelse([$3],[],,[else $3])
+ fi
])
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
Index: php-src/configure.in
diff -u php-src/configure.in:1.448 php-src/configure.in:1.448.2.1
--- php-src/configure.in:1.448 Mon Jun 23 12:06:37 2003
+++ php-src/configure.in Mon Jun 23 23:41:36 2003
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.448 2003/06/23 16:06:37 wez Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.448.2.1 2003/06/24 03:41:36 sniper Exp $ -*- sh -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -731,18 +731,6 @@
if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
-fi
-
-
-dnl
-dnl OpenSSL configure
-dnl
-PHP_ARG_WITH(openssl,for OpenSSL support,
-[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6) ])
-
-if test "$PHP_OPENSSL" != "no"; then
- ext_openssl_shared=$ext_shared
- PHP_SETUP_OPENSSL
fi
divert(5)
Index: php-src/ext/snmp/config.m4
diff -u php-src/ext/snmp/config.m4:1.29 php-src/ext/snmp/config.m4:1.29.2.1
--- php-src/ext/snmp/config.m4:1.29 Mon Feb 17 17:45:50 2003
+++ php-src/ext/snmp/config.m4 Mon Jun 23 23:41:36 2003
@@ -1,10 +1,13 @@
dnl
-dnl $Id: config.m4,v 1.29 2003/02/17 22:45:50 sniper Exp $
+dnl $Id: config.m4,v 1.29.2.1 2003/06/24 03:41:36 sniper Exp $
dnl
PHP_ARG_WITH(snmp,for SNMP support,
[ --with-snmp[=DIR] Include SNMP support.])
+PHP_ARG_WITH(openssl-dir,OpenSSL dir for SNMP,
+[ --with-openssl-dir[=DIR] SNMP: openssl install prefix.], no, no)
+
if test "$PHP_SNMP" != "no"; then
dnl
@@ -77,13 +80,18 @@
AC_MSG_RESULT($SNMP_SSL)
if test "$SNMP_SSL" = "yes"; then
- if test "$PHP_OPENSSL" != "no"; then
- PHP_ADD_LIBRARY(ssl, 1, SNMP_SHARED_LIBADD)
- PHP_ADD_LIBRARY(crypto,1, SNMP_SHARED_LIBADD)
- else
- AC_MSG_ERROR(The UCD-SNMP in this system is built with SSL support.
+ if test "$PHP_OPENSSL_DIR" != "no"; then
+ PHP_OPENSSL=$PHP_OPENSSL_DIR
+ fi
+
+ if test "$PHP_OPENSSL" = "no"; then
+ AC_MSG_ERROR([The UCD-SNMP in this system is built with SSL support.
- Add --with-openssl<=DIR> to your configure line.)
+ Add --with-openssl-dir=DIR to your configure line.])
+ else
+ PHP_SETUP_OPENSSL(SNMP_SHARED_LIBADD, [], [
+ AC_MSG_ERROR([SNMP: OpenSSL check failed. Please check config.log for more
information.])
+ ])
fi
fi
Index: php-src/scripts/phpize.m4
diff -u php-src/scripts/phpize.m4:1.2 php-src/scripts/phpize.m4:1.2.2.1
--- php-src/scripts/phpize.m4:1.2 Sun May 18 21:44:40 2003
+++ php-src/scripts/phpize.m4 Mon Jun 23 23:41:36 2003
@@ -52,18 +52,6 @@
AC_PREFIX_DEFAULT()
-AC_ARG_WITH(openssl,
-[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ],
-[
- if test "$withval" != "no"; then
- PHP_WITH_SHARED
- PHP_OPENSSL=$withval
- ext_openssl_shared=yes
- ext_shared=yes
- PHP_SETUP_OPENSSL
- fi
-])
-
AC_PROG_AWK
sinclude(config.m4)
Index: php-src/ext/openssl/config0.m4
+++ php-src/ext/openssl/config0.m4
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php