cvs: php4 / configure.in

From: Date: Sun, 06 May 2001 23:11:59 +0000
Subject: cvs: php4 / configure.in
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5578@lists.php.net to get a copy of this message
ssb Sun May 6 16:11:59 2001 EDT Modified files: /php4 configure.in Log: @Added --with-layout configure option (Stig) Changed the default php.ini path back to /usr/local/lib. Use "--with-layout=GNU" for now to get the new behaviour. Index: php4/configure.in diff -u php4/configure.in:1.238 php4/configure.in:1.239 --- php4/configure.in:1.238 Mon Apr 23 00:32:35 2001 +++ php4/configure.in Sun May 6 16:11:58 2001 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.238 2001/04/23 07:32:35 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.239 2001/05/06 23:11:58 ssb Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -457,11 +457,6 @@ divert(4) -PHP_ARG_WITH(config-file-path,[path to configuration file], -[ --with-config-file-path=PATH - Sets the path in which to look for php.ini. - defaults to --sysconfdir, "none" to disable], $sysconfdir) - PHP_ARG_ENABLE(debug, whether to include debugging symbols, [ --enable-debug Compile with debugging symbols.], no) @@ -473,6 +468,41 @@ ZEND_DEBUG=no fi +PHP_ARG_WITH(layout,[layout of installed files], +[ --with-layout=TYPE Sets how installed files will be laid out. Type is + one of "PHP" (default) or "GNU"], PHP) + +PHP_ARG_WITH(config-file-path,[path to configuration file], +[ --with-config-file-path=PATH + Sets the path in which to look for php.ini, + defaults to PREFIX/lib], DEFAULT) + +if test "x$PHP_CONFIG_FILE_PATH" = "xDEFAULT"; then + case $PHP_LAYOUT in + GNU) PHP_CONFIG_FILE_PATH="$sysconfdir";; + *) PHP_CONFIG_FILE_PATH="$libdir";; + esac +fi + +# compatibility +if test "x$with_pear" = "x" -a "x$enable_pear" = "xno"; 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) + +if test "x$PHP_PEAR" != "xno"; then + PEAR_DIR=pear +fi + +if test "x$PHP_PEAR" = "xDEFAULT"; then + case $PHP_LAYOUT in + GNU) PEAR_INSTALLDIR="$datadir/pear";; + *) PEAR_INSTALLDIR="$libdir/php";; + esac +fi test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS" @@ -507,20 +537,6 @@ AC_MSG_RESULT(/usr/local/php/bin) ]) -# compatibility -if test "x$with_pear" = "x" -a "x$enable_pear" = "xno"; then - with_pear="no" -fi - -PHP_ARG_WITH(pear, [whether to install PEAR, and where], -[ --with-pear=DIR Install PEAR in DIR (default \$datadir/php/pear) - --without-pear Do not install PEAR], $datadir/php/pear) - -if test "$PHP_PEAR" != "no"; then - PEAR_DIR=pear - PEAR_INSTALLDIR="$PHP_PEAR" -fi - PHP_ARG_WITH(openssl,for OpenSSL support, [ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ]) if test "$PHP_OPENSSL" = "yes"; then @@ -692,43 +708,27 @@ LDFLAGS="" LIBS="" - -phplibdir="pwd/modules" -$php_shtool mkdir -p $phplibdir -phptempdir="pwd/libs" - test "$prefix" = "NONE" && prefix="/usr/local" test "$exec_prefix" = "NONE" && exec_prefix='${prefix}' case $libdir in - '${exec_prefix}/lib') libdir="$libdir/php";; - *) ;; + '${exec_prefix}/lib') + libdir="$libdir/php" + oldstyleextdir=yes + ;; + *) + oldstyleextdir=no + ;; esac case $datadir in - '${prefix}/share') datadir="$datadir/php";; + '${prefix}/share') + datadir="$datadir/php" + ;; *) ;; esac - -dnl Build extension directory path - -ZEND_MODULE_API_NO=egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //' - -extbasedir="$ZEND_MODULE_API_NO" - -if test "$enable_experimental_zts" = "yes"; then - extbasedir="${extbasedir}-zts" -fi - -if test "$PHP_DEBUG" = "1"; then - extbasedir="${extbasedir}-debug" -fi - -if test "x$PEAR_INSTALLDIR" = "x"; then - PEAR_INSTALLDIR="$datadir/pear" -fi -if test "x$EXTENSION_DIR" = "x"; then - EXTENSION_DIR="$libdir/$extbasedir" -fi +phplibdir="pwd/modules" +$php_shtool mkdir -p $phplibdir +phptempdir="pwd/libs" old_exec_prefix="$exec_prefix" old_libdir="$libdir" @@ -736,6 +736,39 @@ exec_prefix=eval echo $exec_prefix libdir=eval echo $libdir datadir=eval echo $datadir + +dnl Build extension directory path + +ZEND_MODULE_API_NO=egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //' + +if test "x$EXTENSION_DIR" = "x"; then + extbasedir="$ZEND_MODULE_API_NO" + if test "$oldstyleextdir" = "yes"; then + if test "$PHP_DEBUG" = "1"; then + part1="debug" + else + part1="no-debug" + fi + if test "$enable_experimental_zts" = "yes"; then + part2="zts" + else + part2="non-zts" + fi + extbasedir="$part1-$part2-$extbasedir" + EXTENSION_DIR="$libdir/extensions/$extbasedir" + else + if test "$enable_experimental_zts" = "yes"; then + extbasedir="${extbasedir}-zts" + fi + + if test "$PHP_DEBUG" = "1"; then + extbasedir="${extbasedir}-debug" + fi + EXTENSION_DIR="$libdir/$extbasedir" + fi +fi + +dnl Expand all directory names for use in macros/constants EXPANDED_PEAR_INSTALLDIR=eval echo $PEAR_INSTALLDIR EXPANDED_EXTENSION_DIR=eval echo $EXTENSION_DIR EXPANDED_LOCALSTATEDIR=eval echo $localstatedir

« previous php.cvs (#5578) next »