]> granicus.if.org Git - php/commitdiff
MFH:- Fixed bug #41576 (misbehaviour when using --without-apxs)
authorfoobar <sniper@php.net>
Sun, 3 Jun 2007 20:27:16 +0000 (20:27 +0000)
committerfoobar <sniper@php.net>
Sun, 3 Jun 2007 20:27:16 +0000 (20:27 +0000)
14 files changed:
sapi/apache/config.m4
sapi/apache2filter/config.m4
sapi/apache2handler/config.m4
sapi/apache_hooks/config.m4
sapi/caudium/config.m4
sapi/embed/config.m4
sapi/isapi/config.m4
sapi/milter/config.m4
sapi/phttpd/config.m4
sapi/pi3web/config.m4
sapi/roxen/config.m4
sapi/thttpd/config.m4
sapi/tux/config.m4
sapi/webjames/config.m4

index 46286c36866dcf765d423133ca46ff56446d3313..0ac7ccfb87aaece930c5ae7eea1b84a48a16afc4 100644 (file)
@@ -22,14 +22,20 @@ AC_MSG_CHECKING(for Apache 1.x module support via DSO through APXS)
 AC_ARG_WITH(apxs,
 [  --with-apxs[=FILE]      Build shared Apache 1.x module. FILE is the optional
                           pathname to the Apache apxs tool [apxs]],[
-  if test "$withval" = "yes"; then
+  PHP_APXS=$withval
+],[
+  PHP_APXS=no
+])
+
+if test "$PHP_APXS" != "no"; then
+  if test "$PHP_APXS" = "yes"; then
     APXS=apxs
     $APXS -q CFLAGS >/dev/null 2>&1
     if test "$?" != "0" && test -x /usr/sbin/apxs; then #SUSE 6.x 
       APXS=/usr/sbin/apxs
     fi
   else
-    PHP_EXPAND_PATH($withval, APXS)
+    PHP_EXPAND_PATH($PHP_APXS, APXS)
   fi
 
   $APXS -q CFLAGS >/dev/null 2>&1
@@ -113,47 +119,52 @@ AC_ARG_WITH(apxs,
   AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
   AC_DEFINE(HAVE_APACHE,1,[ ])
   AC_MSG_RESULT(yes)
-],[
+else
   AC_MSG_RESULT(no)
-])
+fi
 
-if test "$PHP_SAPI" != "apache"; then
 AC_MSG_CHECKING(for Apache 1.x module support)
 AC_ARG_WITH(apache,
 [  --with-apache[=DIR]     Build Apache 1.x module. DIR is the top-level Apache
                           build directory [/usr/local/apache]],[
-
-  APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php5.* sapi/apache/libphp5.module"
-
   if test "$withval" = "yes"; then
     # Apache's default directory
-    withval=/usr/local/apache
+    PHP_APACHE=/usr/local/apache
+  else
+    PHP_APACHE=$withval
   fi
-  if test "$withval" != "no"; then
+], [
+  PHP_APACHE=no
+])
+
+if test "$PHP_SAPI" != "apache" && test "$PHP_APACHE" != "no"; then
+  APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php5.* sapi/apache/libphp5.module"
+
+  if test "$PHP_APACHE" != "no"; then
     AC_DEFINE(HAVE_APACHE,1,[ ])
     APACHE_MODULE=yes
-    PHP_EXPAND_PATH($withval, withval)
+    PHP_EXPAND_PATH($PHP_APACHE, PHP_APACHE)
     # For Apache 1.2.x
-    if test -f $withval/src/httpd.h; then 
-      APACHE_INCLUDE=-I$withval/src
-      APACHE_TARGET=$withval/src
+    if test -f $PHP_APACHE/src/httpd.h; then 
+      APACHE_INCLUDE=-I$PHP_APACHE/src
+      APACHE_TARGET=$PHP_APACHE/src
       PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_INSTALL_FILES $APACHE_TARGET"
       PHP_LIBS="-L. -lphp3"
       AC_MSG_RESULT(yes - Apache 1.2.x)
       STRONGHOLD=
-      if test -f $withval/src/ap_config.h; then
+      if test -f $PHP_APACHE/src/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
     # For Apache 2.0.x
-    elif test -f $withval/include/httpd.h &&
-         test -f $withval/srclib/apr/include/apr_general.h ; then
+    elif test -f $PHP_APACHE/include/httpd.h &&
+         test -f $PHP_APACHE/srclib/apr/include/apr_general.h ; then
       AC_MSG_ERROR([Use --with-apxs2 with Apache 2.x!])
     # For Apache 1.3.x
-    elif test -f $withval/src/main/httpd.h; then
+    elif test -f $PHP_APACHE/src/main/httpd.h; then
       APACHE_HAS_REGEX=1
-      APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap"
-      APACHE_TARGET=$withval/src/modules/php5
+      APACHE_INCLUDE="-I$PHP_APACHE/src/main -I$PHP_APACHE/src/os/unix -I$PHP_APACHE/src/ap"
+      APACHE_TARGET=$PHP_APACHE/src/modules/php5
       if test ! -d $APACHE_TARGET; then
         mkdir $APACHE_TARGET
       fi
@@ -162,24 +173,24 @@ AC_ARG_WITH(apache,
       PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
       AC_MSG_RESULT(yes - Apache 1.3.x)
       STRONGHOLD=
-      if test -f $withval/src/include/ap_config.h; then
+      if test -f $PHP_APACHE/src/include/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
-      if test -f $withval/src/include/ap_compat.h; then
+      if test -f $PHP_APACHE/src/include/ap_compat.h; then
         AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
-        if test ! -f $withval/src/include/ap_config_auto.h; then
+        if test ! -f $PHP_APACHE/src/include/ap_config_auto.h; then
           AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
         fi
       else
-        if test -f $withval/src/include/compat.h; then
+        if test -f $PHP_APACHE/src/include/compat.h; then
           AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
         fi
       fi
     # Also for Apache 1.3.x
-    elif test -f $withval/src/include/httpd.h; then
+    elif test -f $PHP_APACHE/src/include/httpd.h; then
       APACHE_HAS_REGEX=1
-      APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
-      APACHE_TARGET=$withval/src/modules/php5
+      APACHE_INCLUDE="-I$PHP_APACHE/src/include -I$PHP_APACHE/src/os/unix"
+      APACHE_TARGET=$PHP_APACHE/src/modules/php5
       if test ! -d $APACHE_TARGET; then
         mkdir $APACHE_TARGET
       fi
@@ -188,52 +199,48 @@ AC_ARG_WITH(apache,
       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
       AC_MSG_RESULT(yes - Apache 1.3.x)
       STRONGHOLD=
-      if test -f $withval/src/include/ap_config.h; then
+      if test -f $PHP_APACHE/src/include/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
-      if test -f $withval/src/include/ap_compat.h; then
+      if test -f $PHP_APACHE/src/include/ap_compat.h; then
         AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
-        if test ! -f $withval/src/include/ap_config_auto.h; then
+        if test ! -f $PHP_APACHE/src/include/ap_config_auto.h; then
           AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
         fi
       else
-        if test -f $withval/src/include/compat.h; then
+        if test -f $PHP_APACHE/src/include/compat.h; then
           AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
         fi
       fi
     # For StrongHold 2.2
-    elif test -f $withval/apache/httpd.h; then
-      APACHE_INCLUDE="-I$withval/apache -I$withval/ssl/include"
-      APACHE_TARGET=$withval/apache
+    elif test -f $PHP_APACHE/apache/httpd.h; then
+      APACHE_INCLUDE="-I$PHP_APACHE/apache -I$PHP_APACHE/ssl/include"
+      APACHE_TARGET=$PHP_APACHE/apache
       PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
       PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET"
       STRONGHOLD=-DSTRONGHOLD=1
       AC_MSG_RESULT(yes - StrongHold)
-      if test -f $withval/apache/ap_config.h; then
+      if test -f $PHP_APACHE/apache/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
-      if test -f $withval/src/ap_compat.h; then
+      if test -f $PHP_APACHE/src/ap_compat.h; then
         AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
-        if test ! -f $withval/src/include/ap_config_auto.h; then
+        if test ! -f $PHP_APACHE/src/include/ap_config_auto.h; then
           AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
         fi
       else
-        if test -f $withval/src/compat.h; then
+        if test -f $PHP_APACHE/src/compat.h; then
           AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
         fi
       fi
     else
       AC_MSG_RESULT(no)
-      AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $withval)
+      AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $PHP_APACHE)
     fi
   else
     AC_MSG_RESULT(no)
   fi
-],[
-  AC_MSG_RESULT(no)
-])
-
 fi
 
 AC_MSG_CHECKING(for mod_charset compatibility option)
index 47b397cf6d7b2bfa150f27755c4f59125dde3dc9..8c8490250cf650e2457451a78f8618f72a7f2213 100644 (file)
@@ -7,14 +7,20 @@ AC_ARG_WITH(apxs2filter,
 [  --with-apxs2filter[=FILE]   
                           EXPERIMENTAL: Build shared Apache 2.0 Filter module. FILE is the optional
                           pathname to the Apache apxs tool [apxs]],[
-  if test "$withval" = "yes"; then
+  PHP_APXS2FILTER=$withval
+],[
+  PHP_APXS2FILTER=no
+])
+
+if test "$PHP_APXS2FILTER" != "no"; then
+  if test "$PHP_APXS2FILTER" = "yes"; then
     APXS=apxs
     $APXS -q CFLAGS >/dev/null 2>&1
     if test "$?" != "0" && test -x /usr/sbin/apxs; then
       APXS=/usr/sbin/apxs
     fi
   else
-    PHP_EXPAND_PATH($withval, APXS)
+    PHP_EXPAND_PATH($PHP_APXS2FILTER, APXS)
   fi
 
   $APXS -q CFLAGS >/dev/null 2>&1
@@ -119,11 +125,10 @@ AC_ARG_WITH(apxs2filter,
     PHP_BUILD_THREAD_SAFE
   fi
   AC_MSG_RESULT(yes)
-  
   PHP_SUBST(APXS)
-],[
+else
   AC_MSG_RESULT(no)
-])
+fi
 
 dnl ## Local Variables:
 dnl ## tab-width: 4
index 05659e5c1e4dea77b4709f2d6dad9b246b8e9739..69db4e78e9a1e0d2eaeee71ebc84df76d2a29a79 100644 (file)
@@ -6,14 +6,20 @@ AC_MSG_CHECKING(for Apache 2.0 handler-module support via DSO through APXS)
 AC_ARG_WITH(apxs2,
 [  --with-apxs2[=FILE]     Build shared Apache 2.0 Handler module. FILE is the optional
                           pathname to the Apache apxs tool [apxs]],[
-  if test "$withval" = "yes"; then
+  PHP_APXS2=$withval
+], [
+  PHP_APXS2=no
+])
+
+if test "$PHP_APXS2" != "no"; then
+  if test "$PHP_APXS2" = "yes"; then
     APXS=apxs
     $APXS -q CFLAGS >/dev/null 2>&1
     if test "$?" != "0" && test -x /usr/sbin/apxs; then
       APXS=/usr/sbin/apxs
     fi
   else
-    PHP_EXPAND_PATH($withval, APXS)
+    PHP_EXPAND_PATH($PHP_APXS2, APXS)
   fi
 
   $APXS -q CFLAGS >/dev/null 2>&1
@@ -118,11 +124,10 @@ AC_ARG_WITH(apxs2,
     PHP_BUILD_THREAD_SAFE
   fi
   AC_MSG_RESULT(yes)
-
   PHP_SUBST(APXS)
-],[
+else
   AC_MSG_RESULT(no)
-])
+fi
 
 dnl ## Local Variables:
 dnl ## tab-width: 4
index c0ea405b0305edc0fff4032a3782c41226cb2334..a6ce6828e309a81fe324c349e747de1573714df5 100644 (file)
@@ -22,15 +22,21 @@ AC_MSG_CHECKING(for Apache 1.x (hooks) module support via DSO through APXS)
 AC_ARG_WITH(apache-hooks,
 [  --with-apache-hooks[=FILE]      
                           EXPERIMENTAL: Build shared Apache 1.x module. FILE is the optional
-                          pathname to the Apache apxs tool [apxs]],[
-  if test "$withval" = "yes"; then
+                          pathname to the Apache apxs tool [apxs]], [
+  PHP_APACHE_HOOKS=$withval
+],[
+  PHP_APACHE_HOOKS=no
+])
+
+if test "$PHP_APACHE_HOOKS" != "no"; then
+  if test "$PHP_APACHE_HOOKS" = "yes"; then
     APXS=apxs
     $APXS -q CFLAGS >/dev/null 2>&1
     if test "$?" != "0" && test -x /usr/sbin/apxs; then #SUSE 6.x 
       APXS=/usr/sbin/apxs
     fi
   else
-    PHP_EXPAND_PATH($withval, APXS)
+    PHP_EXPAND_PATH($PHP_APACHE_HOOKS, APXS)
   fi
 
   $APXS -q CFLAGS >/dev/null 2>&1
@@ -114,128 +120,129 @@ AC_ARG_WITH(apache-hooks,
   AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
   AC_DEFINE(HAVE_APACHE_HOOKS,1,[ ])
   AC_MSG_RESULT(yes)
-],[
+else
   AC_MSG_RESULT(no)
-])
+fi
 
-if test "$PHP_SAPI" != "apache_hooks"; then
 AC_MSG_CHECKING(for Apache 1.x (hooks) module support)
 AC_ARG_WITH(apache-hooks-static,
-[  --with-apache-hooks-static[=DIR]     
+[  --with-apache-hooks-static[=DIR]
                           EXPERIMENTAL: Build Apache 1.x module. DIR is the top-level Apache
-                          build directory [/usr/local/apache]],[
-
-  APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache_hooks/mod_php5.* sapi/apache_hooks/libphp5.module"
-
+                          build directory [/usr/local/apache]], [
   if test "$withval" = "yes"; then
     # Apache's default directory
-    withval=/usr/local/apache
+    PHP_APACHE_HOOKS=/usr/local/apache
+  else
+    PHP_APACHE_HOOKS=$withval
   fi
-  if test "$withval" != "no"; then
-    AC_DEFINE(HAVE_APACHE_HOOKS,1,[ ])
+], [
+  PHP_APACHE_HOOKS=no
+])
+
+if test "$PHP_SAPI" != "apache" && test "$PHP_SAPI" != "apache_hooks" && test "$PHP_APACHE_HOOKS" != "no"; then
+  APACHE_HOOKS_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php5.* sapi/apache/libphp5.module"
+
+  if test "$PHP_APACHE_HOOKS" != "no"; then
+    AC_DEFINE(HAVE_APACHE,1,[ ])
     APACHE_HOOKS_MODULE=yes
-    PHP_EXPAND_PATH($withval, withval)
+    PHP_EXPAND_PATH($PHP_APACHE_HOOKS, PHP_APACHE_HOOKS)
     # For Apache 1.2.x
-    if test -f $withval/src/httpd.h; then 
-      APACHE_INCLUDE=-I$withval/src
-      APACHE_TARGET=$withval/src
+    if test -f $PHP_APACHE_HOOKS/src/httpd.h; then 
+      APACHE_INCLUDE=-I$PHP_APACHE_HOOKS/src
+      APACHE_TARGET=$PHP_APACHE_HOOKS/src
       PHP_SELECT_SAPI(apache_hooks, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
-      APACHE_HOOKS_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_INSTALL_FILES $APACHE_TARGET"
+      APACHE_HOOKS_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_HOOKS_INSTALL_FILES $APACHE_TARGET"
       PHP_LIBS="-L. -lphp3"
       AC_MSG_RESULT(yes - Apache 1.2.x)
       STRONGHOLD=
-      if test -f $withval/src/ap_config.h; then
+      if test -f $PHP_APACHE_HOOKS/src/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
     # For Apache 2.0.x
-    elif test -f $withval/include/httpd.h &&
-         test -f $withval/srclib/apr/include/apr_general.h ; then
+    elif test -f $PHP_APACHE_HOOKS/include/httpd.h &&
+         test -f $PHP_APACHE_HOOKS/srclib/apr/include/apr_general.h ; then
       AC_MSG_ERROR([Use --with-apxs2 with Apache 2.x!])
     # For Apache 1.3.x
-    elif test -f $withval/src/main/httpd.h; then
+    elif test -f $PHP_APACHE_HOOKS/src/main/httpd.h; then
       APACHE_HAS_REGEX=1
-      APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap"
-      APACHE_TARGET=$withval/src/modules/php5
+      APACHE_INCLUDE="-I$PHP_APACHE_HOOKS/src/main -I$PHP_APACHE_HOOKS/src/os/unix -I$PHP_APACHE_HOOKS/src/ap"
+      APACHE_TARGET=$PHP_APACHE_HOOKS/src/modules/php5
       if test ! -d $APACHE_TARGET; then
         mkdir $APACHE_TARGET
       fi
       PHP_SELECT_SAPI(apache_hooks, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
-      APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache_hooks/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache_hooks/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
+      APACHE_HOOKS_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_HOOKS_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
       PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
       AC_MSG_RESULT(yes - Apache 1.3.x)
       STRONGHOLD=
-      if test -f $withval/src/include/ap_config.h; then
+      if test -f $PHP_APACHE_HOOKS/src/include/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
-      if test -f $withval/src/include/ap_compat.h; then
+      if test -f $PHP_APACHE_HOOKS/src/include/ap_compat.h; then
         AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
-        if test ! -f $withval/src/include/ap_config_auto.h; then
+        if test ! -f $PHP_APACHE_HOOKS/src/include/ap_config_auto.h; then
           AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
         fi
       else
-        if test -f $withval/src/include/compat.h; then
+        if test -f $PHP_APACHE_HOOKS/src/include/compat.h; then
           AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
         fi
       fi
     # Also for Apache 1.3.x
-    elif test -f $withval/src/include/httpd.h; then
+    elif test -f $PHP_APACHE_HOOKS/src/include/httpd.h; then
       APACHE_HAS_REGEX=1
-      APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
-      APACHE_TARGET=$withval/src/modules/php5
+      APACHE_INCLUDE="-I$PHP_APACHE_HOOKS/src/include -I$PHP_APACHE_HOOKS/src/os/unix"
+      APACHE_TARGET=$PHP_APACHE_HOOKS/src/modules/php5
       if test ! -d $APACHE_TARGET; then
         mkdir $APACHE_TARGET
       fi
       PHP_SELECT_SAPI(apache_hooks, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
       PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
-      APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache_hooks/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache_hooks/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
+      APACHE_HOOKS_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_HOOKS_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
       AC_MSG_RESULT(yes - Apache 1.3.x)
       STRONGHOLD=
-      if test -f $withval/src/include/ap_config.h; then
+      if test -f $PHP_APACHE_HOOKS/src/include/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
-      if test -f $withval/src/include/ap_compat.h; then
+      if test -f $PHP_APACHE_HOOKS/src/include/ap_compat.h; then
         AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
-        if test ! -f $withval/src/include/ap_config_auto.h; then
+        if test ! -f $PHP_APACHE_HOOKS/src/include/ap_config_auto.h; then
           AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
         fi
       else
-        if test -f $withval/src/include/compat.h; then
+        if test -f $PHP_APACHE_HOOKS/src/include/compat.h; then
           AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
         fi
       fi
     # For StrongHold 2.2
-    elif test -f $withval/apache/httpd.h; then
-      APACHE_INCLUDE="-I$withval/apache -I$withval/ssl/include"
-      APACHE_TARGET=$withval/apache
+    elif test -f $PHP_APACHE_HOOKS/apache/httpd.h; then
+      APACHE_INCLUDE="-I$PHP_APACHE_HOOKS/apache -I$PHP_APACHE_HOOKS/ssl/include"
+      APACHE_TARGET=$PHP_APACHE_HOOKS/apache
       PHP_SELECT_SAPI(apache_hooks, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
       PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
-      APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET"
+      APACHE_HOOKS_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_HOOKS_INSTALL_FILES $APACHE_TARGET"
       STRONGHOLD=-DSTRONGHOLD=1
       AC_MSG_RESULT(yes - StrongHold)
-      if test -f $withval/apache/ap_config.h; then
+      if test -f $PHP_APACHE_HOOKS/apache/ap_config.h; then
         AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
       fi
-      if test -f $withval/src/ap_compat.h; then
+      if test -f $PHP_APACHE_HOOKS/src/ap_compat.h; then
         AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
-        if test ! -f $withval/src/include/ap_config_auto.h; then
+        if test ! -f $PHP_APACHE_HOOKS/src/include/ap_config_auto.h; then
           AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
         fi
       else
-        if test -f $withval/src/compat.h; then
+        if test -f $PHP_APACHE_HOOKS/src/compat.h; then
           AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
         fi
       fi
     else
       AC_MSG_RESULT(no)
-      AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $withval)
+      AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $PHP_APACHE_HOOKS)
     fi
   else
     AC_MSG_RESULT(no)
   fi
-],[
-  AC_MSG_RESULT(no)
-])
-
 fi
 
 AC_MSG_CHECKING(for mod_charset compatibility option)
@@ -262,7 +269,7 @@ if test -n "$APACHE_HOOKS_INSTALL"; then
   fi
 
   PHP_APACHE_FD_CHECK
-  INSTALL_IT=$APACHE_INSTALL
+  INSTALL_IT=$APACHE_HOOKS_INSTALL
 
   PHP_SUBST(APXS_EXP)
   PHP_SUBST(APACHE_INCLUDE)
index 88cdcd32c63dec0f148c9f50b0caa261434c8686..ba9dc3fa60594cefa51a5a86f8a6faa7a4845ffb 100644 (file)
@@ -6,22 +6,27 @@ RESULT=no
 AC_MSG_CHECKING(for Caudium support)
 AC_ARG_WITH(caudium, 
 [  --with-caudium[=DIR]    Build PHP as a Pike module for use with Caudium.
-                          DIR is the Caudium server dir [/usr/local/caudium/server]],
-[
+                          DIR is the Caudium server dir [/usr/local/caudium/server]],[
+  PHP_CAUDIUM=$withval
+], [
+  PHP_CAUDIUM=no
+])
+
+if test "$PHP_CAUDIUM" != "no"; then
     if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi
-       if test ! -d $withval ; then
+       if test ! -d $PHP_CAUDIUM ; then
       if test "$prefix" = "NONE"; then
-            withval=/usr/local/caudium/server/
+            PHP_CAUDIUM=/usr/local/caudium/server/
          else
-            withval=$prefix/caudium/server/
+            PHP_CAUDIUM=$prefix/caudium/server/
       fi
        fi
-       if test -f $withval/bin/caudium; then
-               PIKE=$withval/bin/caudium
-       elif test -f $withval/bin/pike; then
-               PIKE=$withval/bin/pike
+       if test -f $PHP_CAUDIUM/bin/caudium; then
+               PIKE=$PHP_CAUDIUM/bin/caudium
+       elif test -f $PHP_CAUDIUM/bin/pike; then
+               PIKE=$PHP_CAUDIUM/bin/pike
        else
-               AC_MSG_ERROR(Couldn't find a pike in $withval/bin/)
+               AC_MSG_ERROR(Couldn't find a pike in $PHP_CAUDIUM/bin/)
        fi
     if $PIKE -e 'float v; int rel;sscanf(version(), "Pike v%f release %d", v, rel);v += rel/10000.0; if(v < 7.0268) exit(1); exit(0);'; then
                PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'`
@@ -82,14 +87,13 @@ AC_ARG_WITH(caudium,
     PIKE_VERSION=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'`   
        AC_DEFINE(HAVE_CAUDIUM,1,[Whether to compile with Caudium support])
     PHP_SELECT_SAPI(caudium, shared, caudium.c)
-       INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $withval/lib/$PIKE_VERSION/PHP5.so"
+       INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_CAUDIUM/lib/$PIKE_VERSION/PHP5.so"
        RESULT="        *** Pike binary used:         $PIKE
        *** Pike include dir(s) used: $PIKE_INCLUDE_DIR
        *** Pike version:             $PIKE_VERSION"
     dnl Always use threads since thread-free support really blows.
     PHP_BUILD_THREAD_SAFE
-
-])
+fi
 AC_MSG_RESULT($RESULT)
 
 dnl ## Local Variables:
index 4461bc338389a02c5fbee73e8e0dc25cc0aeb485..fccae0198f0e503a479928a235cbb74e878a13d4 100644 (file)
@@ -6,9 +6,14 @@ AC_MSG_CHECKING(for embedded SAPI library support)
 
 AC_ARG_ENABLE(embed,
 [  --enable-embed[=TYPE]   EXPERIMENTAL: Enable building of embedded SAPI library
-                          TYPE is either 'shared' or 'static'. [TYPE=shared]],
-[ 
-  case $enableval in
+                          TYPE is either 'shared' or 'static'. [TYPE=shared]], [
+  PHP_EMBED=$enableval
+], [
+  PHP_EMBED=no
+])
+
+if test "$PHP_EMBED" != "no"; then
+  case "$PHP_EMBED" in
     yes|shared)
       PHP_EMBED_TYPE=shared
       INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib"
@@ -21,13 +26,12 @@ AC_ARG_ENABLE(embed,
       PHP_EMBED_TYPE=no
       ;;
   esac
-],[
-  PHP_EMBED_TYPE=no
-])
-
-AC_MSG_RESULT($PHP_EMBED_TYPE)
-
-if test "$PHP_EMBED_TYPE" != "no"; then
-  PHP_SELECT_SAPI(embed, $PHP_EMBED_TYPE, php_embed.c)
-  PHP_INSTALL_HEADERS([sapi/embed/php_embed.h])
+  if test "$PHP_EMBED_TYPE" != "no"; then
+    PHP_SELECT_SAPI(embed, $PHP_EMBED_TYPE, php_embed.c)
+    PHP_INSTALL_HEADERS([sapi/embed/php_embed.h])
+  fi
+  AC_MSG_RESULT($PHP_EMBED_TYPE)
+else
+  AC_MSG_RESULT(no)
 fi
+
index b5410ace000e296f8e3a0881502fc3e2e1363b0d..60870ef9477ce2855696570c7417323dc7b0cb80 100644 (file)
@@ -5,20 +5,25 @@ dnl
 RESULT=no
 AC_MSG_CHECKING(for Zeus ISAPI support)
 AC_ARG_WITH(isapi,
-[  --with-isapi[=DIR]      Build PHP as an ISAPI module for use with Zeus],
-[
-       if test "$withval" = "yes"; then
-               ZEUSPATH=/usr/local/zeus # the default
-       else
-               ZEUSPATH=$withval
-       fi
-       test -f "$ZEUSPATH/web/include/httpext.h" || AC_MSG_ERROR(Unable to find httpext.h in $ZEUSPATH/web/include)
-       PHP_BUILD_THREAD_SAFE
-       AC_DEFINE(WITH_ZEUS,1,[ ])
-       PHP_ADD_INCLUDE($ZEUSPATH/web/include)
-    PHP_SELECT_SAPI(isapi, shared, php5isapi.c)
-       INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$ZEUSPATH/web/bin/"
-       RESULT=yes
+[  --with-isapi[=DIR]      Build PHP as an ISAPI module for use with Zeus], [
+  PHP_ISAPI=$withval
+], [
+  PHP_ISAPI=no
+])
+
+if test "$PHP_ISAPI" != "no"; then
+  if test "$PHP_ISAPI" = "yes"; then
+    ZEUSPATH=/usr/local/zeus # the default
+  else
+    ZEUSPATH=$PHP_ISAPI
+  fi
+  test -f "$ZEUSPATH/web/include/httpext.h" || AC_MSG_ERROR(Unable to find httpext.h in $ZEUSPATH/web/include)
+  PHP_BUILD_THREAD_SAFE
+  AC_DEFINE(WITH_ZEUS,1,[ ])
+  PHP_ADD_INCLUDE($ZEUSPATH/web/include)
+  PHP_SELECT_SAPI(isapi, shared, php5isapi.c)
+  INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$ZEUSPATH/web/bin/"
+  RESULT=yes
 ])
 AC_MSG_RESULT($RESULT)
 
index 37269d0b58fac5948787b37683820efb8702c273..36c212b4c5eb0e8003f24bbf96e7396d8b42d9aa 100644 (file)
@@ -5,7 +5,14 @@ dnl
 AC_MSG_CHECKING(for Milter support)
 AC_ARG_WITH(milter,
 [  --with-milter[=DIR]     Build PHP as Milter application],[
-  if test "$withval" = "yes"; then
+  PHP_MILTER=$withval
+], [
+  PHP_MILTER=no
+])
+
+RESULT=no
+if test "$PHP_MILTER" != "no"; then
+  if test "$PHP_MILTER" = "yes"; then
     if test -f /usr/lib/libmilter.a ; then
       MILTERPATH=/usr/lib
     else
@@ -16,24 +23,18 @@ AC_ARG_WITH(milter,
       fi
     fi
   else
-    MILTERPATH=$withval
+    MILTERPATH=$PHP_MILTER
   fi
   
   SAPI_MILTER_PATH=sapi/milter/php-milter
-  PHP_SUBST(SAPI_MILTER_PATH)
   PHP_BUILD_THREAD_SAFE
   PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/milter/Makefile.frag)
-  
   PHP_SELECT_SAPI(milter, program, php_milter.c getopt.c,,'$(SAPI_MILTER_PATH)') 
   PHP_ADD_LIBRARY_WITH_PATH(milter, $MILTERPATH,)
-  
   BUILD_MILTER="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_MILTER_PATH)"
-
   INSTALL_IT="\$(INSTALL) -m 0755 \$(SAPI_MILTER_PATH) \$(bindir)/php-milter"
   RESULT=yes
-
+  PHP_SUBST(SAPI_MILTER_PATH)
   PHP_SUBST(BUILD_MILTER)
-],[
-  RESULT=no
-])
+fi
 AC_MSG_RESULT($RESULT)
index 75c6d66891471d39e73ee83ef74f5d0e0e676f68..92da441f5644b249d9a89e825720f7b0e8392c73 100644 (file)
@@ -5,18 +5,22 @@ dnl
 RESULT=no
 AC_MSG_CHECKING(for PHTTPD support)
 AC_ARG_WITH(phttpd,
-[  --with-phttpd=DIR       Build PHP as phttpd module],
-[
-       if test ! -d $withval ; then
-               AC_MSG_ERROR(You did not specify a directory)
-       fi
-       PHP_BUILD_THREAD_SAFE
-       PHTTPD_DIR=$withval
-       PHP_ADD_INCLUDE($PHTTPD_DIR/include)
-       AC_DEFINE(HAVE_PHTTPD,1,[Whether you have phttpd])
-       PHP_SELECT_SAPI(phttpd, shared, phttpd.c)
-       INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHTTPD_DIR/modules/"
-       RESULT=yes
+[  --with-phttpd=DIR       Build PHP as phttpd module],[
+  PHP_PHTTPD=$withval
+], [
+  PHP_PHTTPD=no
+])
+
+if test "$PHP_PHTTPD" != "no"; then
+  if test ! -d $PHP_PHTTPD ; then
+    AC_MSG_ERROR(You did not specify a directory)
+  fi
+  PHP_BUILD_THREAD_SAFE
+  PHP_ADD_INCLUDE($PHP_PHTTPD/include)
+  AC_DEFINE(HAVE_PHTTPD,1,[Whether you have phttpd])
+  PHP_SELECT_SAPI(phttpd, shared, phttpd.c)
+  INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_PHTTPD/modules/"
+  RESULT=yes
 ])
 AC_MSG_RESULT($RESULT)
 
index ba6a166c169242a5d64df6f918b2a95952d4fd58..83c212af4693b288a942a683f727ed684d726707 100644 (file)
@@ -4,15 +4,18 @@ dnl
 
 RESULT=no
 AC_MSG_CHECKING(for Pi3Web support)
-
 AC_ARG_WITH(pi3web,
-[  --with-pi3web[=DIR]     Build PHP as Pi3Web module],
-[
-if test "$withval" != "no"; then
-       if test "$withval" = "yes"; then
+[  --with-pi3web[=DIR]     Build PHP as Pi3Web module],[
+  PHP_PI3WEB=$withval
+], [
+  PHP_PI3WEB=no
+])
+
+if test "$PHP_PI3WEB" != "no"; then
+       if test "$PHP_PI3WEB" = "yes"; then
                PI3PATH=../.. # the default
        else
-               PI3PATH=$withval
+               PI3PATH=$PHP_PI3WEB
        fi
        test -f "$PI3PATH/PiAPI/PiAPI.h" || AC_MSG_ERROR(Unable to find PiAPI.h in $PI3PATH/PiAPI)
        PHP_BUILD_THREAD_SAFE
@@ -27,7 +30,6 @@ if test "$withval" != "no"; then
 else
        RESULT=no
 fi
-])
 AC_MSG_RESULT($RESULT)
 
 dnl ## Local Variables:
index 7f74707af25454c987c860e8c5c7b0e5b4e6e9b6..e050682d70405b08ad62f1acdcd09e6ff270c9db 100644 (file)
@@ -2,59 +2,65 @@ dnl
 dnl $Id$
 dnl
 
-RESULT=no
-AC_MSG_CHECKING(for Roxen/Pike support)
 AC_ARG_WITH(roxen, 
 [  --with-roxen=DIR        Build PHP as a Pike module. DIR is the base Roxen
-                          directory, normally /usr/local/roxen/server],
-[
-       if test ! -d $withval ; then
-               AC_MSG_ERROR(You did not specify a directory)
-       fi
-       if test -f $withval/bin/roxen; then
-               PIKE=$withval/bin/roxen
-       elif test -f $withval/bin/pike; then
-               PIKE=$withval/bin/pike
-       else
-               AC_MSG_ERROR(Couldn't find a pike in $withval/bin/)
-       fi
-    if $PIKE -e 'float v; catch(v = __VERSION__ + (__BUILD__/10000.0)); if(v < 0.7079) exit(1); exit(0);'; then
-               PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'`
-           PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,'`
-               if test -z "$PIKE_INCLUDE_DIR" || test -z "$PIKE_MODULE_DIR"; then
-                       AC_MSG_ERROR(Failed to figure out Pike module and include directories)
-               fi
-       else
-               AC_MSG_ERROR(Roxen/PHP requires Pike 0.7.79 or newer)
-       fi
-   
-       PHP_ADD_INCLUDE($PIKE_INCLUDE_DIR)
-       AC_DEFINE(HAVE_ROXEN,1,[Whether you use Roxen])
-       PHP_SELECT_SAPI(roxen, shared, roxen.c)
-       INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PIKE_MODULE_DIR/PHP5.so"
-       RESULT="yes
-       Pike binary used:      $PIKE
-       Pike include dir:      $PIKE_INCLUDE_DIR
-       Pike module directory: $PIKE_MODULE_DIR"
-       PIKE_INCLUDE_DIR=" -I$PIKE_INCLUDE_DIR "
+                          directory, normally /usr/local/roxen/server], [
+  PHP_ROXEN=$withval
+], [
+  PHP_ROXEN=no
 ])
-AC_MSG_RESULT($RESULT)
 
-if test "$RESULT" != "no" ; then 
- RESULT=no
- AC_MSG_CHECKING(if Roxen should use ZTS)
- AC_ARG_ENABLE(roxen-zts, 
- [  --enable-roxen-zts      Build the Roxen module using Zend Thread Safety],
- [
-       PHP_BUILD_THREAD_SAFE
-       AC_DEFINE(ROXEN_USE_ZTS,1,[Whether to use Roxen in ZTS mode])
-       RESULT=yes
+AC_ARG_ENABLE(roxen-zts, 
+[  --enable-roxen-zts      Build the Roxen module using Zend Thread Safety], [
+  PHP_ROXEN_ZTS=$enableval
+], [
+  PHP_ROXEN_ZTS=no
+])
 
- ])
- AC_MSG_RESULT($RESULT)
+AC_MSG_CHECKING(for Roxen/Pike support)
+if test "$PHP_ROXEN" != "no"; then
+  if test ! -d $PHP_ROXEN ; then
+    AC_MSG_ERROR(You did not specify a directory)
+  fi
+  if test -f $PHP_ROXEN/bin/roxen; then
+    PIKE=$PHP_ROXEN/bin/roxen
+  elif test -f $PHP_ROXEN/bin/pike; then
+    PIKE=$PHP_ROXEN/bin/pike
+  else
+    AC_MSG_ERROR(Couldn't find a pike in $PHP_ROXEN/bin/)
+  fi
+
+  if $PIKE -e 'float v; catch(v = __VERSION__ + (__BUILD__/10000.0)); if(v < 0.7079) exit(1); exit(0);'; then
+    PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'`
+      PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,'`
+    if test -z "$PIKE_INCLUDE_DIR" || test -z "$PIKE_MODULE_DIR"; then
+      AC_MSG_ERROR(Failed to figure out Pike module and include directories)
+    fi
+  else
+    AC_MSG_ERROR(Roxen/PHP requires Pike 0.7.79 or newer)
+  fi
+   
+  PHP_ADD_INCLUDE($PIKE_INCLUDE_DIR)
+  AC_DEFINE(HAVE_ROXEN,1,[Whether you use Roxen])
+  PHP_SELECT_SAPI(roxen, shared, roxen.c)
+  INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PIKE_MODULE_DIR/PHP5.so"
+  RESULT="yes
+  Pike binary used:      $PIKE
+  Pike include dir:      $PIKE_INCLUDE_DIR
+  Pike module directory: $PIKE_MODULE_DIR"
+  PIKE_INCLUDE_DIR=" -I$PIKE_INCLUDE_DIR "
+
+  AC_MSG_CHECKING(if Roxen should use ZTS)
+  if test "$PHP_ROXEN_ZTS" != "no"; then
+    PHP_BUILD_THREAD_SAFE
+    AC_DEFINE(ROXEN_USE_ZTS,1,[Whether to use Roxen in ZTS mode])
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
 fi
+AC_MSG_RESULT($RESULT)
 
 dnl ## Local Variables:
 dnl ## tab-width: 4
 dnl ## End:
-       
index ac5a2bfca28b153f5ecff3510686f2ef6f02d8f6..f872aa4d2aa49001cc70ae31139d5ce999bb7c85 100644 (file)
@@ -3,18 +3,25 @@ dnl $Id$
 dnl
 
 AC_ARG_WITH(thttpd,
-[  --with-thttpd=SRCDIR    Build PHP as thttpd module],[
-  if test ! -d $withval; then
-    AC_MSG_RESULT(thttpd directory does not exist ($withval))
+[  --with-thttpd=SRCDIR    Build PHP as thttpd module], [
+  PHP_THTTPD=$withval
+],[
+  PHP_THTTPD=no
+])
+
+AC_MSG_CHECKING(for thttpd)
+if test "$PHP_THTTPD" != "no"; then
+  if test ! -d $PHP_THTTPD; then
+    AC_MSG_RESULT(thttpd directory does not exist ($PHP_THTTPD))
   fi
 
-  PHP_EXPAND_PATH($withval, THTTPD)
+  PHP_EXPAND_PATH($PHP_THTTPD, THTTPD)
   
-  if grep thttpd.2.21b $withval/version.h >/dev/null; then
+  if grep thttpd.2.21b $PHP_THTTPD/version.h >/dev/null; then
     patch="test -f $THTTPD/php_patched || \
     (cd $THTTPD && patch -p1 < $abs_srcdir/sapi/thttpd/thttpd_patch && touch php_patched)"
 
-  elif grep Premium $withval/version.h >/dev/null; then
+  elif grep Premium $PHP_THTTPD/version.h >/dev/null; then
     patch=
   else
     AC_MSG_ERROR([This version only supports thttpd-2.21b and Premium thttpd])
@@ -31,9 +38,5 @@ AC_ARG_WITH(thttpd,
   PHP_THTTPD="yes, using $THTTPD"
   PHP_ADD_INCLUDE($THTTPD)
   PHP_SELECT_SAPI(thttpd, static)
-],[
-  PHP_THTTPD=no
-])
-
-AC_MSG_CHECKING(for thttpd)
+fi
 AC_MSG_RESULT($PHP_THTTPD)
index cc79bea1b90298274f2409d2d5c44c4823f19808..d0a8196b688687d9d5cfe36579eed8a55bb4fdba 100644 (file)
@@ -2,17 +2,19 @@ dnl
 dnl $Id$
 dnl
 
-PHP_TUX=no
-
 AC_ARG_WITH(tux,
-[  --with-tux=MODULEDIR    Build PHP as a TUX module (Linux only)],[
-  INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $withval/php5.tux.so"
-  AC_CHECK_HEADERS(tuxmodule.h,[:],[AC_MSG_ERROR([Cannot find tuxmodule.h])])
-  PHP_SELECT_SAPI(tux, shared, php_tux.c)
-  PHP_TUX=yes
+[  --with-tux=MODULEDIR    Build PHP as a TUX module (Linux only)], [
+  PHP_TUX=$withval
+], [
+  PHP_TUX=no
 ])
 
 AC_MSG_CHECKING(for TUX)
-AC_MSG_RESULT($PHP_TUX)
-
-unset PHP_TUX
+if test "$PHP_TUX" != "no"; then
+  INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_TUX/php5.tux.so"
+  AC_CHECK_HEADERS(tuxmodule.h,[:],[AC_MSG_ERROR([Cannot find tuxmodule.h])])
+  PHP_SELECT_SAPI(tux, shared, php_tux.c)
+  AC_MSG_RESULT($PHP_TUX)
+else
+  AC_MSG_RESULT(no)
+fi
index 10e0001680b9a2b14cd25765a56966a9d7272d61..9e406fc057ecfcf4f1d8cdfc14fa0517c0834a70 100644 (file)
@@ -4,17 +4,21 @@ dnl
 
 AC_ARG_WITH(webjames,
 [  --with-webjames=SRCDIR  Build PHP as a WebJames module (RISC OS only)],[
-  PHP_EXPAND_PATH($withval, WEBJAMES)
-  INSTALL_IT="\
-    echo 'PHP_LIBS = -l$abs_srcdir/$SAPI_STATIC \$(PHP_LIBS) \$(EXTRA_LIBS)' > $WEBJAMES/build/php; \
-    echo 'PHP_LDFLAGS = \$(NATIVE_RPATHS) \$(PHP_LDFLAGS)' >> $WEBJAMES/build/php; \
-    echo 'PHP_CFLAGS = -DPHP \$(COMMON_FLAGS) \$(EXTRA_CFLAGS) -I$abs_srcdir/sapi/webjames' >> $WEBJAMES/build/php;"
-  PHP_WEBJAMES="yes, using $WEBJAMES"
-  PHP_ADD_INCLUDE($WEBJAMES)
-  PHP_SELECT_SAPI(webjames, static, webjames.c)
+  PHP_WEBJAMES=$withval
 ],[
-  PHP_WEBJAMES="no"
+  PHP_WEBJAMES=no
 ])
 
 AC_MSG_CHECKING(for webjames)
-AC_MSG_RESULT($PHP_WEBJAMES)
+if test "$PHP_WEBJAMES" != "no"; then
+  PHP_EXPAND_PATH($PHP_WEBJAMES, PHP_WEBJAMES)
+  INSTALL_IT="\
+    echo 'PHP_LIBS = -l$abs_srcdir/$SAPI_STATIC \$(PHP_LIBS) \$(EXTRA_LIBS)' > $PHP_WEBJAMES/build/php; \
+    echo 'PHP_LDFLAGS = \$(NATIVE_RPATHS) \$(PHP_LDFLAGS)' >> $PHP_WEBJAMES/build/php; \
+    echo 'PHP_CFLAGS = -DPHP \$(COMMON_FLAGS) \$(EXTRA_CFLAGS) -I$abs_srcdir/sapi/webjames' >> $PHP_WEBJAMES/build/php;"
+  PHP_ADD_INCLUDE($PHP_WEBJAMES)
+  PHP_SELECT_SAPI(webjames, static, webjames.c)
+  AC_MSG_RESULT([yes, using $PHP_WEBJAMES])
+else
+  AC_MSG_RESULT(no)
+fi