]> granicus.if.org Git - php/commitdiff
a bit of refactoring and making always_shared a nop in every day life
authorSascha Schumann <sas@php.net>
Wed, 13 Mar 2002 12:30:49 +0000 (12:30 +0000)
committerSascha Schumann <sas@php.net>
Wed, 13 Mar 2002 12:30:49 +0000 (12:30 +0000)
acinclude.m4
configure.in
pear/pear.m4

index 9d5435266cdd0cacd20c6449ef331699b3092174..b51f922f73fa61c94b3fba67cd2db4a141e86a88 100644 (file)
@@ -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
index 1d04092906199630f0f6dbc78b4f8ff5d2f1ca67..9001db916f7031daf0d993676c5aa4234241146e 100644 (file)
@@ -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 -------------------------------------------------------------------------
index 44e1f3ab659855d8de4f020597db07148dc276b4..baf18f0534a8d9cc0b18c7a29b524b36999dd1d1 100644 (file)
@@ -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