From 2ea99fe17a2c36297ac74c748682d4c35a1b204a Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Wed, 13 Mar 2002 12:30:49 +0000 Subject: [PATCH] a bit of refactoring and making always_shared a nop in every day life --- acinclude.m4 | 36 ++++++++++-------------------------- configure.in | 6 +++--- pear/pear.m4 | 7 +++++-- 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 9d5435266c..b51f922f73 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -459,16 +459,14 @@ AC_DEFUN(PHP_LIBGCC_LIBPATH,[ changequote([,]) ]) -AC_DEFUN(PHP_ARG_ANALYZE,[ +AC_DEFUN(PHP_ARG_ANALYZE_EX,[ +ext_output="yes, shared" +ext_shared=yes case [$]$1 in shared,*) - ext_output="yes, shared" - ext_shared=yes $1=`echo "[$]$1"|sed 's/^shared,//'` ;; shared) - ext_output="yes, shared" - ext_shared=yes $1=yes ;; no) @@ -481,12 +479,11 @@ no) ;; esac -if test "$php_always_shared" = "yes"; then - ext_output="yes, shared" - ext_shared=yes - test "[$]$1" = "no" && $1=yes -fi +PHP_ALWAYS_SHARED([$1]) +]) +AC_DEFUN(PHP_ARG_ANALYZE,[ +PHP_ARG_ANALYZE_EX([$1]) ifelse([$2],,,[AC_MSG_RESULT([$ext_output])]) ]) @@ -1181,22 +1178,9 @@ dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff dnl from $withval. dnl AC_DEFUN(PHP_WITH_SHARED,[ - case $withval in - shared) - shared=yes - withval=yes - ;; - shared,*) - shared=yes - withval=`echo $withval | sed -e 's/^shared,//'` - ;; - *) - shared=no - ;; - esac - if test -n "$php_always_shared"; then - shared=yes - fi + PHP_ARG_ANALYZE_EX(withval) + shared=$ext_shared + unset ext_shared ext_output ]) dnl The problem is that the default compilation flags in Solaris 2.6 won't diff --git a/configure.in b/configure.in index 1d04092906..9001db916f 100644 --- a/configure.in +++ b/configure.in @@ -40,9 +40,9 @@ AC_CONFIG_HEADER(main/php_config.h) VERSION=4.3.0-dev dnl Define where extension directories are located in the configure context -AC_DEFUN(PHP_EXT_BUILDDIR,[ext/$1]) -AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir/ext/$1]) - +AC_DEFUN(PHP_EXT_BUILDDIR,[ext/$1])dnl +AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir/ext/$1])dnl +AC_DEFUN(PHP_ALWAYS_SHARED,[])dnl dnl Setting up the PHP version based on the information above. dnl ------------------------------------------------------------------------- diff --git a/pear/pear.m4 b/pear/pear.m4 index 44e1f3ab65..baf18f0534 100644 --- a/pear/pear.m4 +++ b/pear/pear.m4 @@ -29,12 +29,15 @@ AC_DEFUN(PHP_WITH_PHP_CONFIG,[ dnl AC_DEFUN(PHP_EXT_BUILDDIR,[.])dnl AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir])dnl +AC_DEFUN(PHP_ALWAYS_SHARED,[ + ext_output="yes, shared" + ext_shared=yes + test "[$]$1" = "no" && $1=yes +])dnl dnl abs_srcdir=`(cd $srcdir && pwd)` abs_builddir=`pwd` -php_always_shared=yes - PHP_CONFIG_NICE(config.nice) AC_PROG_CC -- 2.50.1