cvs: php-src(PHP_4_3) / acinclude.m4 configure.in scan_makefile_in.awk /build scan_makefile_in.awk /ext/openssl config.m4 config0.m4 /ext/snmp
config.m4 /ext/standard config.m4 /scripts Makefile.frag phpize.in phpize.m4
| From: | Jani Taskinen | Date: | Wed, 27 Aug 2003 17:57:33 +0000 |
| Subject: | cvs: php-src(PHP_4_3) / acinclude.m4 configure.in scan_makefile_in.awk /build scan_makefile_in.awk /ext/openssl config.m4 config0.m4 /ext/snmp config.m4 /ext/standard config.m4 /scripts Makefile.frag phpize.in phpize.m4 |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-23408@lists.php.net to get a copy of this message | ||
sniper Wed Aug 27 13:57:33 2003 EDT
Added files: (Branch: PHP_4_3)
/php-src/build scan_makefile_in.awk
/php-src/ext/openssl config0.m4
Removed files:
/php-src scan_makefile_in.awk
/php-src/ext/openssl config.m4
Modified files:
/php-src acinclude.m4 configure.in
/php-src/ext/snmp config.m4
/php-src/ext/standard config.m4
/php-src/scripts Makefile.frag phpize.in phpize.m4
Log:
- Backported several improvements/cleanups for the build/configure stuff.
. PEAR dependancies checked during configure
. OpenSSL config moved from configure.in to ext/openssl/config0.m4
(and also improved the PHP_OPENSSL_SETUP macro a bit)
+ Some other minor issues
Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.218.2.24 php-src/acinclude.m4:1.218.2.25 --- php-src/acinclude.m4:1.218.2.24 Wed Aug 13 20:24:25 2003 +++ php-src/acinclude.m4 Wed Aug 27 13:57:28 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.24 2003/08/14 00:24:25 bfrance Exp $ +dnl $Id: acinclude.m4,v 1.218.2.25 2003/08/27 17:57:28 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -184,66 +184,6 @@ $1=[$]ac_new_flags ]) -AC_DEFUN([PHP_SETUP_OPENSSL],[ - if test "$PHP_OPENSSL" = "yes"; 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_INCDIR=$i/include - fi - if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then - OPENSSL_LIBDIR=$i/lib - fi - done - - if test -z "$OPENSSL_INCDIR"; then - AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>]) - fi - - if test -z "$OPENSSL_LIBDIR"; then - AC_MSG_ERROR([Cannot find OpenSSL's libraries]) - fi - - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - AC_MSG_CHECKING([for OpenSSL version]) - AC_EGREP_CPP(yes,[ -#include <openssl/opensslv.h> -#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 - - PHP_ADD_INCLUDE($OPENSSL_INCDIR) - PHP_ADD_LIBPATH($OPENSSL_LIBDIR) - - PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ - PHP_ADD_LIBRARY(crypto) - ],[ - 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) -]) - dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD) dnl dnl Use this macro, if you need to add libraries and or library search @@ -1209,7 +1149,7 @@ fi ]) -dnl PHP_SHARED_MODULE(module-name, object-var, build-dir) +dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx) dnl dnl Basically sets up the link-stage for building module-name dnl from object_var in build-dir. @@ -1222,7 +1162,7 @@ \$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir) $3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES) - \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) + \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) EOF ]) @@ -1249,7 +1189,7 @@ dnl deprecated AC_DEFUN([PHP_EXTENSION],[ - sources=`$AWK -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in` + sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in` PHP_NEW_EXTENSION($1, $sources, $2, $3) @@ -1267,7 +1207,7 @@ ]) dnl -dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]]) +dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx]]]]) dnl dnl Includes an extension in the build. dnl @@ -1297,7 +1237,7 @@ if test "$3" = "shared" || test "$3" = "yes"; then dnl ---------------------------------------------- Shared module PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes) - PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir) + PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6) AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module) fi fi @@ -1596,7 +1536,7 @@ dnl -dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-ldflags]]]) +dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]]) dnl dnl Wrapper for AC_CHECK_LIB dnl @@ -1637,6 +1577,81 @@ LDFLAGS=$save_old_LDFLAGS $4 ]) +]) + +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 + + for i in $PHP_OPENSSL; do + if test -r $i/include/openssl/evp.h; then + OPENSSL_INCDIR=$i/include + fi + if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then + OPENSSL_LIBDIR=$i/lib + fi + done + + if test -z "$OPENSSL_INCDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>]) + fi + + if test -z "$OPENSSL_LIBDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's libraries]) + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + AC_MSG_CHECKING([for OpenSSL version]) + AC_EGREP_CPP(yes,[ +#include <openssl/opensslv.h> +#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 + + PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ + PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ + found_openssl=yes + ], [ + AC_MSG_ERROR([libssl not found!]) + ],[ + -L$OPENSSL_LIBDIR -lcrypto + ]) + ], [ + AC_MSG_ERROR([libcrypto 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 Index: php-src/configure.in diff -u php-src/configure.in:1.396.2.71 php-src/configure.in:1.396.2.72 --- php-src/configure.in:1.396.2.71 Sun Aug 24 16:46:36 2003 +++ php-src/configure.in Wed Aug 27 13:57:28 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.71 2003/08/24 20:46:36 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.72 2003/08/27 17:57:28 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -618,27 +618,6 @@ PHP_CONFIG_FILE_SCAN_DIR="" fi -# compatibility -if test -z "$with_pear" && test "$enable_pear" = "no"; then - with_pear=no -fi - -PHP_ARG_WITH(pear, [whether to install PEAR, and where], -[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php) - --without-pear Do not install PEAR], DEFAULT, yes) - -if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then - install_pear="install-pear" - PEAR_INSTALLDIR=$PHP_PEAR -fi - -if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then - case $PHP_LAYOUT in - GNU) PEAR_INSTALLDIR=$datadir/pear;; - *) PEAR_INSTALLDIR=$libdir/php;; - esac -fi - test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS" PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default, @@ -736,17 +715,19 @@ 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 +AC_MSG_CHECKING([whether to enable versioning]) +AC_ARG_ENABLE(versioning, +[ --enable-versioning Export only required symbols. + See INSTALL for more information], [ + if test "x$APXS" != "x"; then + PHP_VERSIONING=$enableval + else + PHP_VERSIONING=no + fi +],[ + PHP_VERSIONING=no +]) +AC_MSG_RESULT([$PHP_VERSIONING]) divert(5) @@ -783,26 +764,9 @@ # reading config stubs esyscmd(./build/config-stubs ext) - -dnl Other settings. +dnl Extensions post-config dnl ------------------------------------------------------------------------- -PHP_HELP_SEPARATOR([Other settings:]) - -AC_MSG_CHECKING([whether to enable versioning]) -AC_ARG_ENABLE(versioning, -[ --enable-versioning Export only required symbols. - See INSTALL for more information], [ - if test "x$APXS" != "x"; then - PHP_VERSIONING=$enableval - else - PHP_VERSIONING=no - fi -],[ - PHP_VERSIONING=no -]) -AC_MSG_RESULT([$PHP_VERSIONING]) - if test "$PHP_VERSIONING" = "yes"; then test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym" if test -f "$PHP_SYM_FILE"; then @@ -828,8 +792,6 @@ ;; esac -PHP_REGEX - EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" dnl this has to be here to prevent the openssl crypt() from @@ -839,6 +801,64 @@ fi unset LIBS LDFLAGS + +dnl PEAR +dnl ------------------------------------------------------------------------- + +PHP_HELP_SEPARATOR([PEAR:]) +PHP_CONFIGURE_PART(Configuring PEAR) + +# compatibility +if test -z "$with_pear" && test "$enable_pear" = "no"; then + with_pear=no +fi + +PHP_ARG_WITH(pear, [whether to install PEAR], +[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php) + --without-pear Do not install PEAR], DEFAULT, yes) + +if test "$PHP_PEAR" != "no"; then + + dnl + dnl PEAR dependancies + dnl + if test "$PHP_SAPI_CLI" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires CLI to be enabled. Add --enable-cli to the configure line." + fi + if test "$PHP_PCRE_REGEX" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line." + fi + if test "$PHP_XML" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires XML to be enabled. Add --enable-xml to the configure line." + fi + +dnl +dnl ext/xmlrpc is not really there yet to be a requirement.. +dnl +dnl if test "$PHP_XMLRPC" = "no"; then +dnl pear_error_msg="$pear_error_msg +dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line." +dnl fi +dnl + + if test "$pear_error_msg"; then + AC_MSG_ERROR([$pear_error_msg]) + fi + + install_pear="install-pear" + PEAR_INSTALLDIR=$PHP_PEAR + + if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then + case $PHP_LAYOUT in + GNU) PEAR_INSTALLDIR=$datadir/pear;; + *) PEAR_INSTALLDIR=$libdir/php;; + esac + fi +fi + dnl Configuring Zend and TSRM. dnl ------------------------------------------------------------------------- Index: php-src/ext/snmp/config.m4 diff -u php-src/ext/snmp/config.m4:1.28.2.1 php-src/ext/snmp/config.m4:1.28.2.2 --- php-src/ext/snmp/config.m4:1.28.2.1 Mon Feb 17 17:44:47 2003 +++ php-src/ext/snmp/config.m4 Wed Aug 27 13:57:31 2003 @@ -1,10 +1,13 @@ dnl -dnl $Id: config.m4,v 1.28.2.1 2003/02/17 22:44:47 sniper Exp $ +dnl $Id: config.m4,v 1.28.2.2 2003/08/27 17:57:31 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/ext/standard/config.m4 diff -u php-src/ext/standard/config.m4:1.47.2.4 php-src/ext/standard/config.m4:1.47.2.5 --- php-src/ext/standard/config.m4:1.47.2.4 Sat Aug 9 12:13:47 2003 +++ php-src/ext/standard/config.m4 Wed Aug 27 13:57:31 2003 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.47.2.4 2003/08/09 16:13:47 iliaa Exp $ -*- sh -*- +dnl $Id: config.m4,v 1.47.2.5 2003/08/27 17:57:31 sniper Exp $ -*- sh -*- divert(3)dnl @@ -6,7 +6,7 @@ dnl Check if flush should be called explicitly after buffered io dnl AC_DEFUN(AC_FLUSH_IO,[ - AC_CACHE_CHECK([whether flush should be called explicitly after a bufferered io], ac_cv_flush_io,[ + AC_CACHE_CHECK([whether flush should be called explicitly after a buffered io], ac_cv_flush_io,[ AC_TRY_RUN( [ #include <stdio.h> #include <stdlib.h> @@ -225,6 +225,8 @@ ],[ REGEX_TYPE=php ]) + +PHP_REGEX dnl dnl round fuzz Index: php-src/scripts/Makefile.frag diff -u php-src/scripts/Makefile.frag:1.1.2.3 php-src/scripts/Makefile.frag:1.1.2.4 --- php-src/scripts/Makefile.frag:1.1.2.3 Wed Aug 27 09:55:24 2003 +++ php-src/scripts/Makefile.frag Wed Aug 27 13:57:32 2003 @@ -10,8 +10,8 @@ scripts/phpize.m4 \ build/mkdep.awk \ build/shtool \ + build/scan_makefile_in.awk \ Makefile.global \ - scan_makefile_in.awk \ acinclude.m4 bin_SCRIPTS = phpize php-config Index: php-src/scripts/phpize.in diff -u php-src/scripts/phpize.in:1.1.2.6 php-src/scripts/phpize.in:1.1.2.7 --- php-src/scripts/phpize.in:1.1.2.6 Wed Aug 20 04:16:18 2003 +++ php-src/scripts/phpize.in Wed Aug 27 13:57:32 2003 @@ -5,8 +5,8 @@ includedir="$prefix/include/php" builddir="`pwd`" -FILES_BUILD="mkdep.awk shtool" -FILES="acinclude.m4 Makefile.global scan_makefile_in.awk" +FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool" +FILES="acinclude.m4 Makefile.global" CLEAN_FILES="$FILES *.lo *.la *.o .deps .libs/ build/ include/ modules/ install-sh \ mkinstalldirs missing config.nice config.sub config.guess configure configure.in \ aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache \ @@ -57,7 +57,7 @@ aclocal || exit 1 autoconf || exit 1 autoheader || exit 1 -libtoolize=`$phpdir/shtool path glibtoolize libtoolize` +libtoolize=`$builddir/build/shtool path glibtoolize libtoolize` $libtoolize -f -c || exit 1 # dumping API NOs: Index: php-src/scripts/phpize.m4 diff -u php-src/scripts/phpize.m4:1.1.2.3 php-src/scripts/phpize.m4:1.1.2.4 --- php-src/scripts/phpize.m4:1.1.2.3 Tue Aug 5 07:19:35 2003 +++ php-src/scripts/phpize.m4 Wed Aug 27 13:57:32 2003 @@ -54,18 +54,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/build/scan_makefile_in.awk +++ php-src/build/scan_makefile_in.awk BEGIN { mode=0 sources="" } mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { if (match($0, "[^=]*$")) { sources=substr($0, RSTART, RLENGTH-1) } mode=1 next } mode == 0 && /^LTLIBRARY_SOURCES.*/ { if (match($0, "[^=]*$")) { sources=substr($0, RSTART, RLENGTH) } } mode == 1 && /.*\\$/ { sources=sources substr($0, 0, length - 1) next } mode == 1 { sources=sources $0 mode=0 } END { print sources } Index: php-src/ext/openssl/config0.m4 +++ php-src/ext/openssl/config0.m4
Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.218.2.24 php-src/acinclude.m4:1.218.2.25 --- php-src/acinclude.m4:1.218.2.24 Wed Aug 13 20:24:25 2003 +++ php-src/acinclude.m4 Wed Aug 27 13:57:28 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.24 2003/08/14 00:24:25 bfrance Exp $ +dnl $Id: acinclude.m4,v 1.218.2.25 2003/08/27 17:57:28 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -184,66 +184,6 @@ $1=[$]ac_new_flags ]) -AC_DEFUN([PHP_SETUP_OPENSSL],[ - if test "$PHP_OPENSSL" = "yes"; 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_INCDIR=$i/include - fi - if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then - OPENSSL_LIBDIR=$i/lib - fi - done - - if test -z "$OPENSSL_INCDIR"; then - AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>]) - fi - - if test -z "$OPENSSL_LIBDIR"; then - AC_MSG_ERROR([Cannot find OpenSSL's libraries]) - fi - - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - AC_MSG_CHECKING([for OpenSSL version]) - AC_EGREP_CPP(yes,[ -#include <openssl/opensslv.h> -#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 - - PHP_ADD_INCLUDE($OPENSSL_INCDIR) - PHP_ADD_LIBPATH($OPENSSL_LIBDIR) - - PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ - PHP_ADD_LIBRARY(crypto) - ],[ - 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) -]) - dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD) dnl dnl Use this macro, if you need to add libraries and or library search @@ -1209,7 +1149,7 @@ fi ]) -dnl PHP_SHARED_MODULE(module-name, object-var, build-dir) +dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx) dnl dnl Basically sets up the link-stage for building module-name dnl from object_var in build-dir. @@ -1222,7 +1162,7 @@ \$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir) $3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES) - \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) + \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) EOF ]) @@ -1249,7 +1189,7 @@ dnl deprecated AC_DEFUN([PHP_EXTENSION],[ - sources=`$AWK -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in` + sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in` PHP_NEW_EXTENSION($1, $sources, $2, $3) @@ -1267,7 +1207,7 @@ ]) dnl -dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]]) +dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx]]]]) dnl dnl Includes an extension in the build. dnl @@ -1297,7 +1237,7 @@ if test "$3" = "shared" || test "$3" = "yes"; then dnl ---------------------------------------------- Shared module PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes) - PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir) + PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6) AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module) fi fi @@ -1596,7 +1536,7 @@ dnl -dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-ldflags]]]) +dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]]) dnl dnl Wrapper for AC_CHECK_LIB dnl @@ -1637,6 +1577,81 @@ LDFLAGS=$save_old_LDFLAGS $4 ]) +]) + +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 + + for i in $PHP_OPENSSL; do + if test -r $i/include/openssl/evp.h; then + OPENSSL_INCDIR=$i/include + fi + if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then + OPENSSL_LIBDIR=$i/lib + fi + done + + if test -z "$OPENSSL_INCDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>]) + fi + + if test -z "$OPENSSL_LIBDIR"; then + AC_MSG_ERROR([Cannot find OpenSSL's libraries]) + fi + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + AC_MSG_CHECKING([for OpenSSL version]) + AC_EGREP_CPP(yes,[ +#include <openssl/opensslv.h> +#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 + + PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ + PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ + found_openssl=yes + ], [ + AC_MSG_ERROR([libssl not found!]) + ],[ + -L$OPENSSL_LIBDIR -lcrypto + ]) + ], [ + AC_MSG_ERROR([libcrypto 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 Index: php-src/configure.in diff -u php-src/configure.in:1.396.2.71 php-src/configure.in:1.396.2.72 --- php-src/configure.in:1.396.2.71 Sun Aug 24 16:46:36 2003 +++ php-src/configure.in Wed Aug 27 13:57:28 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.71 2003/08/24 20:46:36 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.72 2003/08/27 17:57:28 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -618,27 +618,6 @@ PHP_CONFIG_FILE_SCAN_DIR="" fi -# compatibility -if test -z "$with_pear" && test "$enable_pear" = "no"; then - with_pear=no -fi - -PHP_ARG_WITH(pear, [whether to install PEAR, and where], -[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php) - --without-pear Do not install PEAR], DEFAULT, yes) - -if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then - install_pear="install-pear" - PEAR_INSTALLDIR=$PHP_PEAR -fi - -if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then - case $PHP_LAYOUT in - GNU) PEAR_INSTALLDIR=$datadir/pear;; - *) PEAR_INSTALLDIR=$libdir/php;; - esac -fi - test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS" PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default, @@ -736,17 +715,19 @@ 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 +AC_MSG_CHECKING([whether to enable versioning]) +AC_ARG_ENABLE(versioning, +[ --enable-versioning Export only required symbols. + See INSTALL for more information], [ + if test "x$APXS" != "x"; then + PHP_VERSIONING=$enableval + else + PHP_VERSIONING=no + fi +],[ + PHP_VERSIONING=no +]) +AC_MSG_RESULT([$PHP_VERSIONING]) divert(5) @@ -783,26 +764,9 @@ # reading config stubs esyscmd(./build/config-stubs ext) - -dnl Other settings. +dnl Extensions post-config dnl ------------------------------------------------------------------------- -PHP_HELP_SEPARATOR([Other settings:]) - -AC_MSG_CHECKING([whether to enable versioning]) -AC_ARG_ENABLE(versioning, -[ --enable-versioning Export only required symbols. - See INSTALL for more information], [ - if test "x$APXS" != "x"; then - PHP_VERSIONING=$enableval - else - PHP_VERSIONING=no - fi -],[ - PHP_VERSIONING=no -]) -AC_MSG_RESULT([$PHP_VERSIONING]) - if test "$PHP_VERSIONING" = "yes"; then test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym" if test -f "$PHP_SYM_FILE"; then @@ -828,8 +792,6 @@ ;; esac -PHP_REGEX - EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" dnl this has to be here to prevent the openssl crypt() from @@ -839,6 +801,64 @@ fi unset LIBS LDFLAGS + +dnl PEAR +dnl ------------------------------------------------------------------------- + +PHP_HELP_SEPARATOR([PEAR:]) +PHP_CONFIGURE_PART(Configuring PEAR) + +# compatibility +if test -z "$with_pear" && test "$enable_pear" = "no"; then + with_pear=no +fi + +PHP_ARG_WITH(pear, [whether to install PEAR], +[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php) + --without-pear Do not install PEAR], DEFAULT, yes) + +if test "$PHP_PEAR" != "no"; then + + dnl + dnl PEAR dependancies + dnl + if test "$PHP_SAPI_CLI" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires CLI to be enabled. Add --enable-cli to the configure line." + fi + if test "$PHP_PCRE_REGEX" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line." + fi + if test "$PHP_XML" = "no"; then + pear_error_msg="$pear_error_msg + PEAR requires XML to be enabled. Add --enable-xml to the configure line." + fi + +dnl +dnl ext/xmlrpc is not really there yet to be a requirement.. +dnl +dnl if test "$PHP_XMLRPC" = "no"; then +dnl pear_error_msg="$pear_error_msg +dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line." +dnl fi +dnl + + if test "$pear_error_msg"; then + AC_MSG_ERROR([$pear_error_msg]) + fi + + install_pear="install-pear" + PEAR_INSTALLDIR=$PHP_PEAR + + if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then + case $PHP_LAYOUT in + GNU) PEAR_INSTALLDIR=$datadir/pear;; + *) PEAR_INSTALLDIR=$libdir/php;; + esac + fi +fi + dnl Configuring Zend and TSRM. dnl ------------------------------------------------------------------------- Index: php-src/ext/snmp/config.m4 diff -u php-src/ext/snmp/config.m4:1.28.2.1 php-src/ext/snmp/config.m4:1.28.2.2 --- php-src/ext/snmp/config.m4:1.28.2.1 Mon Feb 17 17:44:47 2003 +++ php-src/ext/snmp/config.m4 Wed Aug 27 13:57:31 2003 @@ -1,10 +1,13 @@ dnl -dnl $Id: config.m4,v 1.28.2.1 2003/02/17 22:44:47 sniper Exp $ +dnl $Id: config.m4,v 1.28.2.2 2003/08/27 17:57:31 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/ext/standard/config.m4 diff -u php-src/ext/standard/config.m4:1.47.2.4 php-src/ext/standard/config.m4:1.47.2.5 --- php-src/ext/standard/config.m4:1.47.2.4 Sat Aug 9 12:13:47 2003 +++ php-src/ext/standard/config.m4 Wed Aug 27 13:57:31 2003 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.47.2.4 2003/08/09 16:13:47 iliaa Exp $ -*- sh -*- +dnl $Id: config.m4,v 1.47.2.5 2003/08/27 17:57:31 sniper Exp $ -*- sh -*- divert(3)dnl @@ -6,7 +6,7 @@ dnl Check if flush should be called explicitly after buffered io dnl AC_DEFUN(AC_FLUSH_IO,[ - AC_CACHE_CHECK([whether flush should be called explicitly after a bufferered io], ac_cv_flush_io,[ + AC_CACHE_CHECK([whether flush should be called explicitly after a buffered io], ac_cv_flush_io,[ AC_TRY_RUN( [ #include <stdio.h> #include <stdlib.h> @@ -225,6 +225,8 @@ ],[ REGEX_TYPE=php ]) + +PHP_REGEX dnl dnl round fuzz Index: php-src/scripts/Makefile.frag diff -u php-src/scripts/Makefile.frag:1.1.2.3 php-src/scripts/Makefile.frag:1.1.2.4 --- php-src/scripts/Makefile.frag:1.1.2.3 Wed Aug 27 09:55:24 2003 +++ php-src/scripts/Makefile.frag Wed Aug 27 13:57:32 2003 @@ -10,8 +10,8 @@ scripts/phpize.m4 \ build/mkdep.awk \ build/shtool \ + build/scan_makefile_in.awk \ Makefile.global \ - scan_makefile_in.awk \ acinclude.m4 bin_SCRIPTS = phpize php-config Index: php-src/scripts/phpize.in diff -u php-src/scripts/phpize.in:1.1.2.6 php-src/scripts/phpize.in:1.1.2.7 --- php-src/scripts/phpize.in:1.1.2.6 Wed Aug 20 04:16:18 2003 +++ php-src/scripts/phpize.in Wed Aug 27 13:57:32 2003 @@ -5,8 +5,8 @@ includedir="$prefix/include/php" builddir="`pwd`" -FILES_BUILD="mkdep.awk shtool" -FILES="acinclude.m4 Makefile.global scan_makefile_in.awk" +FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool" +FILES="acinclude.m4 Makefile.global" CLEAN_FILES="$FILES *.lo *.la *.o .deps .libs/ build/ include/ modules/ install-sh \ mkinstalldirs missing config.nice config.sub config.guess configure configure.in \ aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache \ @@ -57,7 +57,7 @@ aclocal || exit 1 autoconf || exit 1 autoheader || exit 1 -libtoolize=`$phpdir/shtool path glibtoolize libtoolize` +libtoolize=`$builddir/build/shtool path glibtoolize libtoolize` $libtoolize -f -c || exit 1 # dumping API NOs: Index: php-src/scripts/phpize.m4 diff -u php-src/scripts/phpize.m4:1.1.2.3 php-src/scripts/phpize.m4:1.1.2.4 --- php-src/scripts/phpize.m4:1.1.2.3 Tue Aug 5 07:19:35 2003 +++ php-src/scripts/phpize.m4 Wed Aug 27 13:57:32 2003 @@ -54,18 +54,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/build/scan_makefile_in.awk +++ php-src/build/scan_makefile_in.awk BEGIN { mode=0 sources="" } mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { if (match($0, "[^=]*$")) { sources=substr($0, RSTART, RLENGTH-1) } mode=1 next } mode == 0 && /^LTLIBRARY_SOURCES.*/ { if (match($0, "[^=]*$")) { sources=substr($0, RSTART, RLENGTH) } } mode == 1 && /.*\\$/ { sources=sources substr($0, 0, length - 1) next } mode == 1 { sources=sources $0 mode=0 } END { print sources } Index: php-src/ext/openssl/config0.m4 +++ php-src/ext/openssl/config0.m4