summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2007-07-11 23:20:37 +0000
committerJani Taskinen <jani@php.net>2007-07-11 23:20:37 +0000
commiteb923bf6fc9cf71aaf45641784aeb3d23254bf45 (patch)
tree8348f41d3874c54c18f8d5baf2007c76bcca45a1 /sapi
parent4ef905ae59202730d1d8a37d4babec76f98b6664 (diff)
downloadphp-git-eb923bf6fc9cf71aaf45641784aeb3d23254bf45.tar.gz
MFH: - Changed AC_ARG_* options to PHP_ARG_* options.
MFH: - Some cleanups here and there MFH: - Enabled PHP_CHECK_CONFIGURE_OPTIONS (checks for unknown configure MFH: options) # Note to Marcus: ext/dba/config.m4 needs to be "converted" to use # the PHP_ARG_* options. I did't touch it needs quite a lot of work to keep # it's current behaviour regarding "enabled-by-default" parts of it. # # Hint: By using the PHP_ARG_* options you have the "default" option.. ;)
Diffstat (limited to 'sapi')
-rw-r--r--sapi/aolserver/config.m414
-rw-r--r--sapi/apache/config.m4232
-rw-r--r--sapi/apache2filter/config.m411
-rw-r--r--sapi/apache2handler/config.m411
-rw-r--r--sapi/apache_hooks/config.m4236
-rw-r--r--sapi/caudium/config.m4168
-rw-r--r--sapi/cgi/config9.m499
-rw-r--r--sapi/cli/config.m417
-rw-r--r--sapi/continuity/config.m424
-rw-r--r--sapi/embed/config.m414
-rw-r--r--sapi/isapi/config.m414
-rw-r--r--sapi/milter/config.m414
-rw-r--r--sapi/nsapi/config.m422
-rw-r--r--sapi/phttpd/config.m416
-rw-r--r--sapi/pi3web/config.m442
-rw-r--r--sapi/roxen/config.m439
-rw-r--r--sapi/thttpd/config.m411
-rw-r--r--sapi/tux/config.m412
-rw-r--r--sapi/webjames/config.m411
19 files changed, 439 insertions, 568 deletions
diff --git a/sapi/aolserver/config.m4 b/sapi/aolserver/config.m4
index 2c905af2cc..a193bfd058 100644
--- a/sapi/aolserver/config.m4
+++ b/sapi/aolserver/config.m4
@@ -2,14 +2,10 @@ dnl
dnl $Id$
dnl
-AC_MSG_CHECKING(for AOLserver support)
-AC_ARG_WITH(aolserver,
-[ --with-aolserver=DIR Specify path to the installed AOLserver],[
- PHP_AOLSERVER=$withval
-],[
- PHP_AOLSERVER=no
-])
-AC_MSG_RESULT($PHP_AOLSERVER)
+PHP_ARG_WITH(aolserver,,
+[ --with-aolserver=DIR Specify path to the installed AOLserver], no, no)
+
+AC_MSG_CHECKING([for AOLserver support])
if test "$PHP_AOLSERVER" != "no"; then
if test -d "$PHP_AOLSERVER/include"; then
@@ -28,6 +24,8 @@ if test "$PHP_AOLSERVER" != "no"; then
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_AOLSERVER/bin/"
fi
+AC_MSG_RESULT([$PHP_AOLSERVER])
+
dnl ## Local Variables:
dnl ## tab-width: 4
dnl ## End:
diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4
index 0ac7ccfb87..af83e9bcfa 100644
--- a/sapi/apache/config.m4
+++ b/sapi/apache/config.m4
@@ -18,14 +18,12 @@ if test "$ac_cv_php_fd_in_buff" = "yes"; then
fi
])
-AC_MSG_CHECKING(for Apache 1.x module support via DSO through APXS)
-AC_ARG_WITH(apxs,
+dnl Apache 1.x shared module
+PHP_ARG_WITH(apxs,,
[ --with-apxs[=FILE] Build shared Apache 1.x module. FILE is the optional
- pathname to the Apache apxs tool [apxs]],[
- PHP_APXS=$withval
-],[
- PHP_APXS=no
-])
+ pathname to the Apache apxs tool [apxs]], no, no)
+
+AC_MSG_CHECKING([for Apache 1.x module support via DSO through APXS])
if test "$PHP_APXS" != "no"; then
if test "$PHP_APXS" = "yes"; then
@@ -123,138 +121,130 @@ else
AC_MSG_RESULT(no)
fi
-AC_MSG_CHECKING(for Apache 1.x module support)
-AC_ARG_WITH(apache,
+dnl Apache 1.x static module
+PHP_ARG_WITH(apache,,
[ --with-apache[=DIR] Build Apache 1.x module. DIR is the top-level Apache
- build directory [/usr/local/apache]],[
- if test "$withval" = "yes"; then
+ build directory [/usr/local/apache]], no, no)
+
+AC_MSG_CHECKING([for Apache 1.x module support])
+
+if test "$PHP_SAPI" != "apache" && test "$PHP_APACHE" != "no"; then
+
+ if test "$PHP_APACHE" = "yes"; then
# Apache's default directory
PHP_APACHE=/usr/local/apache
- else
- PHP_APACHE=$withval
fi
-], [
- 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($PHP_APACHE, PHP_APACHE)
- # For Apache 1.2.x
- 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 $PHP_APACHE/src/ap_config.h; then
- AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
- fi
- # For Apache 2.0.x
- 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 $PHP_APACHE/src/main/httpd.h; then
- APACHE_HAS_REGEX=1
- 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
- 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_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"
- PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
- AC_MSG_RESULT(yes - Apache 1.3.x)
- STRONGHOLD=
- if test -f $PHP_APACHE/src/include/ap_config.h; then
- AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
- fi
- if test -f $PHP_APACHE/src/include/ap_compat.h; then
- AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
- 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 $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 $PHP_APACHE/src/include/httpd.h; then
- APACHE_HAS_REGEX=1
- 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
- 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; 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 $PHP_APACHE/src/include/ap_config.h; then
- AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
- fi
- if test -f $PHP_APACHE/src/include/ap_compat.h; then
- AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
- 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 $PHP_APACHE/src/include/compat.h; then
- AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
- fi
+ AC_DEFINE(HAVE_APACHE,1,[ ])
+ APACHE_MODULE=yes
+ PHP_EXPAND_PATH($PHP_APACHE, PHP_APACHE)
+ # For Apache 1.2.x
+ 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 $PHP_APACHE/src/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
+ fi
+ # For Apache 2.0.x
+ 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 $PHP_APACHE/src/main/httpd.h; then
+ APACHE_HAS_REGEX=1
+ 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
+ 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_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"
+ PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
+ AC_MSG_RESULT([yes - Apache 1.3.x])
+ STRONGHOLD=
+ if test -f $PHP_APACHE/src/include/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H, 1, [ ])
+ fi
+ if test -f $PHP_APACHE/src/include/ap_compat.h; then
+ AC_DEFINE(HAVE_AP_COMPAT_H, 1, [ ])
+ 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
- # For StrongHold 2.2
- 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 $PHP_APACHE/apache/ap_config.h; then
- AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
+ elif test -f $PHP_APACHE/src/include/compat.h; then
+ AC_DEFINE(HAVE_OLD_COMPAT_H, 1, [ ])
+ fi
+ # Also for Apache 1.3.x
+ elif test -f $PHP_APACHE/src/include/httpd.h; then
+ APACHE_HAS_REGEX=1
+ 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
+ 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; 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 $PHP_APACHE/src/include/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H, 1, [ ])
+ fi
+ if test -f $PHP_APACHE/src/include/ap_compat.h; then
+ AC_DEFINE(HAVE_AP_COMPAT_H, 1, [ ])
+ 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
- if test -f $PHP_APACHE/src/ap_compat.h; then
- AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
- 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 $PHP_APACHE/src/compat.h; then
- AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
- fi
+ elif test -f $PHP_APACHE/src/include/compat.h; then
+ AC_DEFINE(HAVE_OLD_COMPAT_H, 1, [ ])
+ fi
+ # For StrongHold 2.2
+ 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 $PHP_APACHE/apache/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H, 1, [ ])
+ fi
+ if test -f $PHP_APACHE/src/ap_compat.h; then
+ AC_DEFINE(HAVE_AP_COMPAT_H, 1, [ ])
+ 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
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $PHP_APACHE)
+ elif test -f $PHP_APACHE/src/compat.h; then
+ AC_DEFINE(HAVE_OLD_COMPAT_H, 1, [ ])
fi
else
AC_MSG_RESULT(no)
+ AC_MSG_ERROR([Invalid Apache directory - unable to find httpd.h under $PHP_APACHE])
fi
+else
+ AC_MSG_RESULT(no)
fi
-AC_MSG_CHECKING(for mod_charset compatibility option)
-AC_ARG_WITH(mod_charset,
-[ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache)],
-[
- AC_MSG_RESULT(yes)
- AC_DEFINE(USE_TRANSFER_TABLES,1,[ ])
-],[
- AC_MSG_RESULT(no)
-])
+# compatibility
+if test -z "$enable_mod_charset" && test "$with_mod_charset"; then
+ enable_mod_charset=$with_mod_charset
+fi
+
+PHP_ARG_ENABLE(mod-charset, whether to enable Apache charset compatibility option,
+[ --enable-mod-charset APACHE: Enable transfer tables for mod_charset (Rus Apache)], no, no)
+
+if test "$PHP_MOD_CHARSET" = "yes"; then
+ AC_DEFINE(USE_TRANSFER_TABLES, 1, [ ])
+fi
dnl Build as static module
-if test -n "$APACHE_MODULE"; then
+if test "$APACHE_MODULE" = "yes"; then
PHP_TARGET_RDYNAMIC
$php_shtool mkdir -p sapi/apache
PHP_OUTPUT(sapi/apache/libphp5.module)
diff --git a/sapi/apache2filter/config.m4 b/sapi/apache2filter/config.m4
index 8c8490250c..148799ca61 100644
--- a/sapi/apache2filter/config.m4
+++ b/sapi/apache2filter/config.m4
@@ -2,15 +2,12 @@ dnl
dnl $Id$
dnl
-AC_MSG_CHECKING(for Apache 2.0 filter-module support via DSO through APXS)
-AC_ARG_WITH(apxs2filter,
+PHP_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]],[
- PHP_APXS2FILTER=$withval
-],[
- PHP_APXS2FILTER=no
-])
+ pathname to the Apache apxs tool [apxs]], no, no)
+
+AC_MSG_CHECKING([for Apache 2.0 filter-module support via DSO through APXS])
if test "$PHP_APXS2FILTER" != "no"; then
if test "$PHP_APXS2FILTER" = "yes"; then
diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
index 69db4e78e9..8bc677b4cc 100644
--- a/sapi/apache2handler/config.m4
+++ b/sapi/apache2handler/config.m4
@@ -2,14 +2,11 @@ dnl
dnl $Id$
dnl
-AC_MSG_CHECKING(for Apache 2.0 handler-module support via DSO through APXS)
-AC_ARG_WITH(apxs2,
+PHP_ARG_WITH(apxs2,,
[ --with-apxs2[=FILE] Build shared Apache 2.0 Handler module. FILE is the optional
- pathname to the Apache apxs tool [apxs]],[
- PHP_APXS2=$withval
-], [
- PHP_APXS2=no
-])
+ pathname to the Apache apxs tool [apxs]], no, no)
+
+AC_MSG_CHECKING([for Apache 2.0 handler-module support via DSO through APXS])
if test "$PHP_APXS2" != "no"; then
if test "$PHP_APXS2" = "yes"; then
diff --git a/sapi/apache_hooks/config.m4 b/sapi/apache_hooks/config.m4
index a6ce6828e3..4213b7c6a6 100644
--- a/sapi/apache_hooks/config.m4
+++ b/sapi/apache_hooks/config.m4
@@ -18,15 +18,13 @@ if test "$ac_cv_php_fd_in_buff" = "yes"; then
fi
])
-AC_MSG_CHECKING(for Apache 1.x (hooks) module support via DSO through APXS)
-AC_ARG_WITH(apache-hooks,
+dnl Apache 1.x shared module
+PHP_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]], [
- PHP_APACHE_HOOKS=$withval
-],[
- PHP_APACHE_HOOKS=no
-])
+ pathname to the Apache apxs tool [apxs]], no, no)
+
+AC_MSG_CHECKING([for Apache 1.x (hooks) module support via DSO through APXS])
if test "$PHP_APACHE_HOOKS" != "no"; then
if test "$PHP_APACHE_HOOKS" = "yes"; then
@@ -124,139 +122,131 @@ else
AC_MSG_RESULT(no)
fi
-AC_MSG_CHECKING(for Apache 1.x (hooks) module support)
-AC_ARG_WITH(apache-hooks-static,
+dnl Apache 1.x static module
+PHP_ARG_WITH(apache-hooks-static,,
[ --with-apache-hooks-static[=DIR]
EXPERIMENTAL: Build Apache 1.x module. DIR is the top-level Apache
- build directory [/usr/local/apache]], [
- if test "$withval" = "yes"; then
+ build directory [/usr/local/apache]], no, no)
+
+AC_MSG_CHECKING(for Apache 1.x (hooks) module support)
+
+if test "$PHP_SAPI" != "apache" && test "$PHP_SAPI" != "apache_hooks" && test "$PHP_APACHE_HOOKS_STATIC" != "no"; then
+
+ if test "$PHP_APACHE_HOOKS_STATIC" = "yes"; then
# Apache's default directory
- PHP_APACHE_HOOKS=/usr/local/apache
- else
- PHP_APACHE_HOOKS=$withval
+ PHP_APACHE_HOOKS_STATIC=/usr/local/apache
fi
-], [
- 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"
+ APACHE_HOOKS_INSTALL_FILES="\$(srcdir)/sapi/apache_hooks/mod_php5.* sapi/apache_hooks/libphp5.module"
- if test "$PHP_APACHE_HOOKS" != "no"; then
- AC_DEFINE(HAVE_APACHE,1,[ ])
- APACHE_HOOKS_MODULE=yes
- PHP_EXPAND_PATH($PHP_APACHE_HOOKS, PHP_APACHE_HOOKS)
- # For Apache 1.2.x
- 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_HOOKS_INSTALL_FILES $APACHE_TARGET"
- PHP_LIBS="-L. -lphp3"
- AC_MSG_RESULT(yes - Apache 1.2.x)
- STRONGHOLD=
- 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 $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 $PHP_APACHE_HOOKS/src/main/httpd.h; then
- APACHE_HAS_REGEX=1
- 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_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 $PHP_APACHE_HOOKS/src/include/ap_config.h; then
- AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
- fi
- if test -f $PHP_APACHE_HOOKS/src/include/ap_compat.h; then
- AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
- 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 $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 $PHP_APACHE_HOOKS/src/include/httpd.h; then
- APACHE_HAS_REGEX=1
- 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_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 $PHP_APACHE_HOOKS/src/include/ap_config.h; then
- AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
- fi
- if test -f $PHP_APACHE_HOOKS/src/include/ap_compat.h; then
- AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
- 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 $PHP_APACHE_HOOKS/src/include/compat.h; then
- AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
- fi
+ AC_DEFINE(HAVE_APACHE,1,[ ])
+ APACHE_HOOKS_MODULE=yes
+ PHP_EXPAND_PATH($PHP_APACHE_HOOKS_STATIC, PHP_APACHE_HOOKS_STATIC)
+ # For Apache 1.2.x
+ if test -f $PHP_APACHE_HOOKS_STATIC/src/httpd.h; then
+ APACHE_INCLUDE=-I$PHP_APACHE_HOOKS_STATIC/src
+ APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/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_HOOKS_INSTALL_FILES $APACHE_TARGET"
+ PHP_LIBS="-L. -lphp3"
+ AC_MSG_RESULT([yes - Apache 1.2.x])
+ STRONGHOLD=
+ if test -f $PHP_APACHE_HOOKS_STATIC/src/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
+ fi
+ # For Apache 2.0.x
+ elif test -f $PHP_APACHE_HOOKS_STATIC/include/httpd.h && test -f $PHP_APACHE_HOOKS_STATIC/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 $PHP_APACHE_HOOKS_STATIC/src/main/httpd.h; then
+ APACHE_HAS_REGEX=1
+ APACHE_INCLUDE="-I$PHP_APACHE_HOOKS_STATIC/src/main -I$PHP_APACHE_HOOKS_STATIC/src/os/unix -I$PHP_APACHE_HOOKS_STATIC/src/ap"
+ APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/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_HOOKS_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_HOOKS_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"
+ PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
+ AC_MSG_RESULT([yes - Apache 1.3.x])
+ STRONGHOLD=
+ if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H, 1, [ ])
+ fi
+ if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_compat.h; then
+ AC_DEFINE(HAVE_AP_COMPAT_H, 1, [ ])
+ if test ! -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config_auto.h; then
+ AC_MSG_ERROR([Please run Apache\'s configure or src/Configure program once and try again])
fi
- # For StrongHold 2.2
- 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_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 $PHP_APACHE_HOOKS/apache/ap_config.h; then
- AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
+ elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/compat.h; then
+ AC_DEFINE(HAVE_OLD_COMPAT_H, 1, [ ])
+ fi
+ # Also for Apache 1.3.x
+ elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/httpd.h; then
+ APACHE_HAS_REGEX=1
+ APACHE_INCLUDE="-I$PHP_APACHE_HOOKS_STATIC/src/include -I$PHP_APACHE_HOOKS_STATIC/src/os/unix"
+ APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/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_HOOKS_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_HOOKS_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"
+ AC_MSG_RESULT([yes - Apache 1.3.x])
+ STRONGHOLD=
+ if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H, 1, [ ])
+ fi
+ if test -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_compat.h; then
+ AC_DEFINE(HAVE_AP_COMPAT_H, 1, [ ])
+ if test ! -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config_auto.h; then
+ AC_MSG_ERROR([Please run Apache\'s configure or src/Configure program once and try again])
fi
- if test -f $PHP_APACHE_HOOKS/src/ap_compat.h; then
- AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
- 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 $PHP_APACHE_HOOKS/src/compat.h; then
- AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
- fi
+ elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/compat.h; then
+ AC_DEFINE(HAVE_OLD_COMPAT_H, 1, [ ])
+ fi
+ # For StrongHold 2.2
+ elif test -f $PHP_APACHE_HOOKS_STATIC/apache/httpd.h; then
+ APACHE_INCLUDE="-I$PHP_APACHE_HOOKS_STATIC/apache -I$PHP_APACHE_HOOKS_STATIC/ssl/include"
+ APACHE_TARGET=$PHP_APACHE_HOOKS_STATIC/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_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 $PHP_APACHE_HOOKS_STATIC/apache/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H, 1, [ ])
+ fi
+ if test -f $PHP_APACHE_HOOKS_STATIC/src/ap_compat.h; then
+ AC_DEFINE(HAVE_AP_COMPAT_H, 1, [ ])
+ if test ! -f $PHP_APACHE_HOOKS_STATIC/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
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $PHP_APACHE_HOOKS)
+ elif test -f $PHP_APACHE_HOOKS_STATIC/src/compat.h; then
+ AC_DEFINE(HAVE_OLD_COMPAT_H, 1, [ ])
fi
else
AC_MSG_RESULT(no)
+ AC_MSG_ERROR([Invalid Apache directory - unable to find httpd.h under $PHP_APACHE_HOOKS_STATIC])
fi
+else
+ AC_MSG_RESULT(no)
fi
-AC_MSG_CHECKING(for mod_charset compatibility option)
-AC_ARG_WITH(mod_charset,
-[ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache)],
-[
- AC_MSG_RESULT(yes)
- AC_DEFINE(USE_TRANSFER_TABLES,1,[ ])
-],[
- AC_MSG_RESULT(no)
-])
+# compatibility
+if test -z "$enable_mod_charset" && test "$with_mod_charset"; then
+ enable_mod_charset=$with_mod_charset
+fi
+
+PHP_ARG_ENABLE(mod-charset, whether to enable Apache charset compatibility option,
+[ --enable-mod-charset APACHE (hooks): Enable transfer tables for mod_charset (Rus Apache)], no, no)
+
+if test "$PHP_MOD_CHARSET" = "yes"; then
+ AC_DEFINE(USE_TRANSFER_TABLES, 1, [ ])
+fi
dnl Build as static module
-if test -n "$APACHE_HOOKS_MODULE"; then
+if test "$APACHE_HOOKS_MODULE" = "yes"; then
PHP_TARGET_RDYNAMIC
$php_shtool mkdir -p sapi/apache_hooks
PHP_OUTPUT(sapi/apache_hooks/libphp5.module)
diff --git a/sapi/caudium/config.m4 b/sapi/caudium/config.m4
index ba9dc3fa60..8aba33e23d 100644
--- a/sapi/caudium/config.m4
+++ b/sapi/caudium/config.m4
@@ -3,100 +3,96 @@ dnl $Id$
dnl
RESULT=no
-AC_MSG_CHECKING(for Caudium support)
-AC_ARG_WITH(caudium,
+PHP_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]],[
- PHP_CAUDIUM=$withval
-], [
- PHP_CAUDIUM=no
-])
+ DIR is the Caudium server dir [/usr/local/caudium/server]], no, no)
+
+AC_MSG_CHECKING([for Caudium support])
if test "$PHP_CAUDIUM" != "no"; then
- if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi
- if test ! -d $PHP_CAUDIUM ; then
- if test "$prefix" = "NONE"; then
- PHP_CAUDIUM=/usr/local/caudium/server/
- else
- PHP_CAUDIUM=$prefix/caudium/server/
- fi
- fi
- 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 $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/.*: //'`
- 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
- AC_MSG_RESULT(yes)
- PIKE=`echo $PIKE | pike -e 'int tries=100;
- string orig,pike=Stdio.File("stdin")->read()-"\n";
- orig=pike;
- if(search(orig, "/"))
- orig = combine_path(getcwd(), orig);
- while(!catch(pike=readlink(pike)) && tries--)
- ;
- write(combine_path(dirname(orig), pike)); '`
- PHP_ADD_INCLUDE($PIKE_INCLUDE_DIR)
- if test "$prefix" != "NONE"; then
- PIKE_C_INCLUDE=$prefix/include/`basename $PIKE`
- else
- PIKE_C_INCLUDE=/usr/local/include/`basename $PIKE`
- fi
- AC_MSG_CHECKING(for C includes in $PIKE_C_INCLUDE)
- if test -f $PIKE_C_INCLUDE/version.h; then
- PIKE_TEST_VER=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'`
- ###### VERSION MATCH CHECK #######
- PMAJOR="^#define PIKE_MAJOR_VERSION"
- PMINOR="^#define PIKE_MINOR_VERSION"
- PBUILD="^#define PIKE_BUILD_VERSION"
+ if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi
+ if test ! -d $PHP_CAUDIUM ; then
+ if test "$prefix" = "NONE"; then
+ PHP_CAUDIUM=/usr/local/caudium/server/
+ else
+ PHP_CAUDIUM=$prefix/caudium/server/
+ fi
+ fi
+ 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([Could not 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/.*: //'`
+ 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
+ AC_MSG_RESULT(yes)
+ PIKE=`echo $PIKE | pike -e 'int tries=100;
+ string orig,pike=Stdio.File("stdin")->read()-"\n";
+ orig=pike;
+ if(search(orig, "/"))
+ orig = combine_path(getcwd(), orig);
+ while(!catch(pike=readlink(pike)) && tries--)
+ ;
+ write(combine_path(dirname(orig), pike)); '`
+ PHP_ADD_INCLUDE($PIKE_INCLUDE_DIR)
+ if test "$prefix" != "NONE"; then
+ PIKE_C_INCLUDE=$prefix/include/`basename $PIKE`
+ else
+ PIKE_C_INCLUDE=/usr/local/include/`basename $PIKE`
+ fi
+ AC_MSG_CHECKING([for C includes in $PIKE_C_INCLUDE])
+ if test -f $PIKE_C_INCLUDE/version.h; then
+ PIKE_TEST_VER=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'`
+ ###### VERSION MATCH CHECK #######
+ PMAJOR="^#define PIKE_MAJOR_VERSION"
+ PMINOR="^#define PIKE_MINOR_VERSION"
+ PBUILD="^#define PIKE_BUILD_VERSION"
- PIKE_CMAJOR_VERSION=0
- PIKE_CMINOR_VERSION=0
- PIKE_CBUILD_VERSION=0
+ PIKE_CMAJOR_VERSION=0
+ PIKE_CMINOR_VERSION=0
+ PIKE_CBUILD_VERSION=0
- PIKE_CMAJOR_VERSION=`grep "$PMAJOR" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'`
- if test -z "$PIKE_CMAJOR_VERSION"; then
- if test -n "`grep f_version $PIKE_C_INCLUDE/version.h`"; then
- PIKE_CMAJOR_VERSION=6
- fi
- else
- PIKE_CMINOR_VERSION=`grep "$PMINOR" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'`
- PIKE_CBUILD_VERSION=`grep "$PBUILD" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'`
- fi
-
- if test "$PIKE_TEST_VER" = "${PIKE_CMAJOR_VERSION}.${PIKE_CMINOR_VERSION}.${PIKE_CBUILD_VERSION}"; then
- PHP_ADD_INCLUDE($PIKE_C_INCLUDE)
- PIKE_INCLUDE_DIR="$PIKE_INCLUDE_DIR, $PIKE_C_INCLUDE"
- AC_MSG_RESULT(found)
- else
- AC_MSG_RESULT(version mismatch)
- fi
- else
- AC_MSG_RESULT(not found)
- fi
- else
- AC_MSG_ERROR(Caudium PHP5 requires Pike 7.0 or newer)
- fi
- 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 $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
+ PIKE_CMAJOR_VERSION=`grep "$PMAJOR" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'`
+ if test -z "$PIKE_CMAJOR_VERSION"; then
+ if test -n "`grep f_version $PIKE_C_INCLUDE/version.h`"; then
+ PIKE_CMAJOR_VERSION=6
+ fi
+ else
+ PIKE_CMINOR_VERSION=`grep "$PMINOR" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'`
+ PIKE_CBUILD_VERSION=`grep "$PBUILD" $PIKE_C_INCLUDE/version.h | sed -e 's/\(#define.*N \)\(.*\)/\2/'`
+ fi
+
+ if test "$PIKE_TEST_VER" = "${PIKE_CMAJOR_VERSION}.${PIKE_CMINOR_VERSION}.${PIKE_CBUILD_VERSION}"; then
+ PHP_ADD_INCLUDE($PIKE_C_INCLUDE)
+ PIKE_INCLUDE_DIR="$PIKE_INCLUDE_DIR, $PIKE_C_INCLUDE"
+ AC_MSG_RESULT(found)
+ else
+ AC_MSG_RESULT(version mismatch)
+ fi
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ else
+ AC_MSG_ERROR([Caudium PHP5 requires Pike 7.0 or newer])
+ fi
+ 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 $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:
dnl ## tab-width: 4
dnl ## End:
-
diff --git a/sapi/cgi/config9.m4 b/sapi/cgi/config9.m4
index e465eaea67..855a8348ff 100644
--- a/sapi/cgi/config9.m4
+++ b/sapi/cgi/config9.m4
@@ -2,57 +2,36 @@ dnl
dnl $Id$
dnl
-AC_ARG_ENABLE(cgi,
-[ --disable-cgi Disable building CGI version of PHP],
-[
- PHP_SAPI_CGI=$enableval
-],[
- PHP_SAPI_CGI=yes
-])
+PHP_ARG_ENABLE(cgi,,
+[ --disable-cgi Disable building CGI version of PHP], yes, no)
-AC_ARG_ENABLE(force-cgi-redirect,
+PHP_ARG_ENABLE(fastcgi,,
+[ --enable-fastcgi CGI: Enable FastCGI support in the CGI binary], no, no)
+
+PHP_ARG_ENABLE(force-cgi-redirect,,
[ --enable-force-cgi-redirect
CGI: Enable security check for internal server
- redirects. Use this if you run the PHP CGI with Apache],
-[
- PHP_FORCE_CGI_REDIRECT=$enableval
-],[
- PHP_FORCE_CGI_REDIRECT=no
-])
+ redirects. Use this if you run the PHP CGI with Apache], no, no)
-AC_ARG_ENABLE(discard-path,
+PHP_ARG_ENABLE(discard-path,,
[ --enable-discard-path CGI: When this is enabled the PHP CGI binary can
safely be placed outside of the web tree and people
- will not be able to circumvent .htaccess security],
-[
- PHP_DISCARD_PATH=$enableval
-],[
- PHP_DISCARD_PATH=no
-])
-
-AC_ARG_ENABLE(fastcgi,
-[ --enable-fastcgi CGI: Enable FastCGI support in the CGI binary],
-[
- PHP_ENABLE_FASTCGI=$enableval
-],[
- PHP_ENABLE_FASTCGI=no
-])
+ will not be able to circumvent .htaccess security], no, no)
-AC_ARG_ENABLE(path-info-check,
+PHP_ARG_ENABLE(path-info-check,,
[ --disable-path-info-check CGI: If this is disabled, paths such as
- /info.php/test?a=b will fail to work],
-[
- PHP_ENABLE_PATHINFO_CHECK=$enableval
-],[
- PHP_ENABLE_PATHINFO_CHECK=yes
-])
+ /info.php/test?a=b will fail to work], yes, no)
+dnl
+dnl CGI setup
+dnl
if test "$PHP_SAPI" = "default"; then
- AC_MSG_CHECKING(for CGI build)
- if test "$PHP_SAPI_CGI" != "no"; then
+ AC_MSG_CHECKING(whether to build CGI binary)
+ if test "$PHP_CGI" != "no"; then
AC_MSG_RESULT(yes)
-
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
+
+ dnl Set filename
case $host_alias in
*cygwin* )
SAPI_CGI_PATH=sapi/cgi/php-cgi.exe
@@ -63,16 +42,29 @@ if test "$PHP_SAPI" = "default"; then
esac
PHP_SUBST(SAPI_CGI_PATH)
+ dnl --enable-fastcgi
+ AC_MSG_CHECKING(whether to enable fastcgi support)
+ if test "$PHP_FASTCGI" = "yes"; then
+ PHP_ENABLE_FASTCGI=1
+ PHP_FCGI_FILES="fastcgi.c"
+ else
+ PHP_ENABLE_FASTCGI=0
+ PHP_FCGI_FILES=
+ fi
+ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_ENABLE_FASTCGI, [ ])
+ AC_MSG_RESULT($PHP_FASTCGI)
+
+ dnl --enable-force-cgi-redirect
AC_MSG_CHECKING(whether to force Apache CGI redirect)
if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
- REDIRECT=1
+ CGI_REDIRECT=1
else
- REDIRECT=0
+ CGI_REDIRECT=0
fi
- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
+ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT, $CGI_REDIRECT, [ ])
AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
-
+ dnl --enable-discard-path
AC_MSG_CHECKING(whether to discard path_info + path_translated)
if test "$PHP_DISCARD_PATH" = "yes"; then
DISCARD_PATH=1
@@ -82,28 +74,19 @@ if test "$PHP_SAPI" = "default"; then
AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
AC_MSG_RESULT($PHP_DISCARD_PATH)
+ dnl --enable-path-info-check
AC_MSG_CHECKING(whether to enable path info checking)
- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
+ if test "$PHP_PATH_INFO_CHECK" = "yes"; then
ENABLE_PATHINFO_CHECK=1
else
ENABLE_PATHINFO_CHECK=0
fi
AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
-
- AC_MSG_CHECKING(whether to enable fastcgi support)
- if test "$PHP_ENABLE_FASTCGI" = "yes"; then
- PHP_FASTCGI=1
- PHP_FCGI_FILES="fastcgi.c"
- else
- PHP_FASTCGI=0
- PHP_FCGI_FILES=""
- fi
- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
- AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
+ AC_MSG_RESULT($PHP_PATH_INFO_CHECK)
+ dnl Set install target and select SAPI
INSTALL_IT="@echo \"Installing PHP CGI binary: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-cgi\$(program_suffix)\$(EXEEXT)"
- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, , '$(SAPI_CGI_PATH)')
+ PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c,, '$(SAPI_CGI_PATH)')
case $host_alias in
*aix*)
@@ -119,7 +102,7 @@ if test "$PHP_SAPI" = "default"; then
PHP_SUBST(BUILD_CGI)
- elif test "$PHP_SAPI_CLI" != "no"; then
+ elif test "$PHP_CLI" != "no"; then
AC_MSG_RESULT(no)
OVERALL_TARGET=
PHP_SAPI=cli
diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4
index c31ddd1209..6017443044 100644
--- a/sapi/cli/config.m4
+++ b/sapi/cli/config.m4
@@ -2,18 +2,12 @@ dnl
dnl $Id$
dnl
-AC_MSG_CHECKING(for CLI build)
-
-AC_ARG_ENABLE(cli,
+PHP_ARG_ENABLE(cli,,
[ --disable-cli Disable building CLI version of PHP
- (this forces --without-pear)],
-[
- PHP_SAPI_CLI=$enableval
-],[
- PHP_SAPI_CLI=yes
-])
+ (this forces --without-pear)], yes, no)
-if test "$PHP_SAPI_CLI" != "no"; then
+AC_MSG_CHECKING(for CLI build)
+if test "$PHP_CLI" != "no"; then
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cli/Makefile.frag,$abs_srcdir/sapi/cli,sapi/cli)
SAPI_CLI_PATH=sapi/cli/php
PHP_SUBST(SAPI_CLI_PATH)
@@ -38,5 +32,4 @@ if test "$PHP_SAPI_CLI" != "no"; then
PHP_SUBST(INSTALL_CLI)
PHP_OUTPUT(sapi/cli/php.1)
fi
-
-AC_MSG_RESULT($PHP_SAPI_CLI)
+AC_MSG_RESULT($PHP_CLI)
diff --git a/sapi/continuity/config.m4 b/sapi/continuity/config.m4
index 1be2dfa3a1..8d2741921a 100644
--- a/sapi/continuity/config.m4
+++ b/sapi/continuity/config.m4
@@ -1,36 +1,28 @@
dnl ## $Id$ -*- sh -*-
-AC_MSG_CHECKING(for Continuity support)
-AC_ARG_WITH(continuity,
+PHP_ARG_WITH(continuity, for Continuity support,
[ --with-continuity=DIR Build PHP as Continuity Server module.
- DIR is path to the installed Continuity Server root],[
- PHP_CONTINUITY=$withval
-],[
- PHP_CONTINUITY=no
-])
-AC_MSG_RESULT($PHP_CONTINUITY)
+ DIR is path to the installed Continuity Server root], no, no)
if test "$PHP_CONTINUITY" != "no"; then
-
if test ! -d $PHP_CONTINUITY; then
- AC_MSG_ERROR(Please specify the path to the root of your Continuity server using --with-continuity=DIR)
+ AC_MSG_ERROR([Please specify the path to the root of your Continuity server using --with-continuity=DIR])
fi
- AC_MSG_CHECKING(for Continuity include files)
+ AC_MSG_CHECKING([for Continuity include files])
if test -d $PHP_CONTINUITY/include ; then
CAPI_INCLUDE=$PHP_CONTINUITY/include
- AC_MSG_RESULT(Continuity Binary Distribution)
+ AC_MSG_RESULT([Continuity Binary Distribution])
else
- AC_MSG_ERROR(Cannot find your CAPI include files in either DIR/src or DIR/include)
+ AC_MSG_ERROR([Cannot find your CAPI include files in either DIR/src or DIR/include])
fi
- PHP_SELECT_SAPI(continuity,shared,capi.c)
+ PHP_SELECT_SAPI(continuity, shared, capi.c)
PHP_ADD_INCLUDE($CAPI_INCLUDE)
PHP_BUILD_THREAD_SAFE
- AC_DEFINE(HAVE_CONTINUITY,1,[Whether you have a Continuity Server])
+ AC_DEFINE(HAVE_CONTINUITY, 1, [Whether you have a Continuity Server])
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_CONTINUITY/lib/"
fi
-
dnl ## Local Variables:
dnl ## tab-width: 4
dnl ## End:
diff --git a/sapi/embed/config.m4 b/sapi/embed/config.m4
index fccae0198f..3a61b458f0 100644
--- a/sapi/embed/config.m4
+++ b/sapi/embed/config.m4
@@ -2,15 +2,11 @@ dnl
dnl $Id$
dnl
-AC_MSG_CHECKING(for embedded SAPI library support)
-
-AC_ARG_ENABLE(embed,
+PHP_ARG_ENABLE(embed,,
[ --enable-embed[=TYPE] EXPERIMENTAL: Enable building of embedded SAPI library
- TYPE is either 'shared' or 'static'. [TYPE=shared]], [
- PHP_EMBED=$enableval
-], [
- PHP_EMBED=no
-])
+ TYPE is either 'shared' or 'static'. [TYPE=shared]], no, no)
+
+AC_MSG_CHECKING([for embedded SAPI library support])
if test "$PHP_EMBED" != "no"; then
case "$PHP_EMBED" in
@@ -30,7 +26,7 @@ if test "$PHP_EMBED" != "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)
+ AC_MSG_RESULT([$PHP_EMBED_TYPE])
else
AC_MSG_RESULT(no)
fi
diff --git a/sapi/isapi/config.m4 b/sapi/isapi/config.m4
index 050c4d9e9b..7c7dcf0c21 100644
--- a/sapi/isapi/config.m4
+++ b/sapi/isapi/config.m4
@@ -2,14 +2,8 @@ dnl
dnl $Id$
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], [
- PHP_ISAPI=$withval
-], [
- PHP_ISAPI=no
-])
+PHP_ARG_WITH(isapi, for Zeus ISAPI support,
+[ --with-isapi[=DIR] Build PHP as an ISAPI module for use with Zeus], no, no)
if test "$PHP_ISAPI" != "no"; then
if test "$PHP_ISAPI" = "yes"; then
@@ -19,13 +13,11 @@ if test "$PHP_ISAPI" != "no"; then
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,[ ])
+ 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
fi
-AC_MSG_RESULT($RESULT)
dnl ## Local Variables:
dnl ## tab-width: 4
diff --git a/sapi/milter/config.m4 b/sapi/milter/config.m4
index 36c212b4c5..e314551857 100644
--- a/sapi/milter/config.m4
+++ b/sapi/milter/config.m4
@@ -2,15 +2,9 @@ dnl
dnl $Id$
dnl
-AC_MSG_CHECKING(for Milter support)
-AC_ARG_WITH(milter,
-[ --with-milter[=DIR] Build PHP as Milter application],[
- PHP_MILTER=$withval
-], [
- PHP_MILTER=no
-])
+PHP_ARG_WITH(milter, for Milter support,
+[ --with-milter[=DIR] Build PHP as Milter application], no, no)
-RESULT=no
if test "$PHP_MILTER" != "no"; then
if test "$PHP_MILTER" = "yes"; then
if test -f /usr/lib/libmilter.a ; then
@@ -19,7 +13,7 @@ if test "$PHP_MILTER" != "no"; then
if test -f /usr/lib/libmilter/libmilter.a ; then
MILTERPATH=/usr/lib/libmilter
else
- AC_MSG_ERROR(Unable to find libmilter.a)
+ AC_MSG_ERROR([Unable to find libmilter.a])
fi
fi
else
@@ -33,8 +27,6 @@ if test "$PHP_MILTER" != "no"; then
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)
fi
-AC_MSG_RESULT($RESULT)
diff --git a/sapi/nsapi/config.m4 b/sapi/nsapi/config.m4
index ce8cc96ae8..8923f53227 100644
--- a/sapi/nsapi/config.m4
+++ b/sapi/nsapi/config.m4
@@ -2,39 +2,33 @@ dnl
dnl $Id$
dnl
-AC_MSG_CHECKING(for NSAPI support)
-AC_ARG_WITH(nsapi,
-[ --with-nsapi=DIR Build PHP as NSAPI module for Netscape/iPlanet/Sun Webserver],[
- PHP_NSAPI=$withval
-],[
- PHP_NSAPI=no
-])
-AC_MSG_RESULT($PHP_NSAPI)
+PHP_ARG_WITH(nsapi, for NSAPI support,
+[ --with-nsapi=DIR Build PHP as NSAPI module for Netscape/iPlanet/Sun Webserver], no, no)
if test "$PHP_NSAPI" != "no"; then
if test ! -d $PHP_NSAPI/bin ; then
AC_MSG_ERROR(Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR)
fi
- AC_MSG_CHECKING(for NSAPI include files)
+ AC_MSG_CHECKING([for NSAPI include files])
if test -d $PHP_NSAPI/include ; then
NSAPI_INC_DIR="$PHP_NSAPI/include"
- AC_MSG_RESULT(Netscape 3.x / Sun 7.x style)
+ AC_MSG_RESULT([Netscape 3.x / Sun 7.x style])
AC_CHECK_HEADERS([$NSAPI_INC_DIR/nsapi.h])
NSAPI_INCLUDE="-I$NSAPI_INC_DIR"
fi
if test -d $PHP_NSAPI/plugins/include ; then
NSAPI_INC_DIR="$PHP_NSAPI/plugins/include"
- AC_MSG_RESULT(iPlanet 4.x / Sun 6.x style)
+ AC_MSG_RESULT([iPlanet 4.x / Sun 6.x style])
AC_CHECK_HEADERS([$NSAPI_INC_DIR/nsapi.h])
NSAPI_INCLUDE="$NSAPI_INCLUDE -I$NSAPI_INC_DIR"
fi
- if test "$NSAPI_INCLUDE" = ""; then
- AC_MSG_ERROR(Please check you have nsapi.h in either $PHP_NSAPI/include or $PHP_NSAPI/plugins/include)
+ if test -z "$NSAPI_INCLUDE"; then
+ AC_MSG_ERROR([Please check you have nsapi.h in either $PHP_NSAPI/include or $PHP_NSAPI/plugins/include])
fi
PHP_EVAL_INCLINE($NSAPI_INCLUDE)
PHP_BUILD_THREAD_SAFE
- AC_DEFINE(HAVE_NSAPI,1,[Whether you have a Netscape/iPlanet/Sun Webserver])
+ AC_DEFINE(HAVE_NSAPI, 1, [Whether you have a Netscape/iPlanet/Sun Webserver])
PHP_SELECT_SAPI(nsapi, shared, nsapi.c)
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_NSAPI/bin/"
fi
diff --git a/sapi/phttpd/config.m4 b/sapi/phttpd/config.m4
index a1f294c74c..91339a5278 100644
--- a/sapi/phttpd/config.m4
+++ b/sapi/phttpd/config.m4
@@ -2,27 +2,19 @@ dnl
dnl $Id$
dnl
-RESULT=no
-AC_MSG_CHECKING(for PHTTPD support)
-AC_ARG_WITH(phttpd,
-[ --with-phttpd=DIR Build PHP as phttpd module],[
- PHP_PHTTPD=$withval
-], [
- PHP_PHTTPD=no
-])
+PHP_ARG_WITH(phttpd, for PHTTPD support,
+[ --with-phttpd=DIR Build PHP as phttpd module], no, no)
if test "$PHP_PHTTPD" != "no"; then
if test ! -d $PHP_PHTTPD ; then
- AC_MSG_ERROR(You did not specify a directory)
+ 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])
+ 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
fi
-AC_MSG_RESULT($RESULT)
dnl ## Local Variables:
dnl ## tab-width: 4
diff --git a/sapi/pi3web/config.m4 b/sapi/pi3web/config.m4
index 83c212af46..7859481508 100644
--- a/sapi/pi3web/config.m4
+++ b/sapi/pi3web/config.m4
@@ -2,35 +2,25 @@ dnl
dnl $Id$
dnl
-RESULT=no
-AC_MSG_CHECKING(for Pi3Web support)
-AC_ARG_WITH(pi3web,
-[ --with-pi3web[=DIR] Build PHP as Pi3Web module],[
- PHP_PI3WEB=$withval
-], [
- PHP_PI3WEB=no
-])
+PHP_ARG_WITH(pi3web, for Pi3Web support,
+[ --with-pi3web[=DIR] Build PHP as Pi3Web module], no, no)
if test "$PHP_PI3WEB" != "no"; then
- if test "$PHP_PI3WEB" = "yes"; then
- PI3PATH=../.. # the default
- else
- 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
- AC_DEFINE(WITH_PI3WEB,1,[whether you want Pi3Web support])
- PHP_ADD_INCLUDE($PI3PATH/PiAPI)
- PHP_ADD_INCLUDE($PI3PATH/Pi2API)
- PHP_ADD_INCLUDE($PI3PATH/Pi3API)
- PHP_ADD_INCLUDE($PI3PATH/PHP5)
- PHP_SELECT_SAPI(pi3web, shared, pi3web_sapi.c)
- INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PI3PATH/bin/"
- RESULT=yes
-else
- RESULT=no
+ if test "$PHP_PI3WEB" = "yes"; then
+ PI3PATH=../.. # the default
+ else
+ 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
+ AC_DEFINE(WITH_PI3WEB, 1, [whether you want Pi3Web support])
+ PHP_ADD_INCLUDE($PI3PATH/PiAPI)
+ PHP_ADD_INCLUDE($PI3PATH/Pi2API)
+ PHP_ADD_INCLUDE($PI3PATH/Pi3API)
+ PHP_ADD_INCLUDE($PI3PATH/PHP5)
+ PHP_SELECT_SAPI(pi3web, shared, pi3web_sapi.c)
+ INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PI3PATH/bin/"
fi
-AC_MSG_RESULT($RESULT)
dnl ## Local Variables:
dnl ## tab-width: 4
diff --git a/sapi/roxen/config.m4 b/sapi/roxen/config.m4
index e050682d70..9b0bb90c35 100644
--- a/sapi/roxen/config.m4
+++ b/sapi/roxen/config.m4
@@ -2,46 +2,39 @@ dnl
dnl $Id$
dnl
-AC_ARG_WITH(roxen,
+PHP_ARG_WITH(roxen,,
[ --with-roxen=DIR Build PHP as a Pike module. DIR is the base Roxen
- directory, normally /usr/local/roxen/server], [
- PHP_ROXEN=$withval
-], [
- PHP_ROXEN=no
-])
+ directory, normally /usr/local/roxen/server], no, no)
-AC_ARG_ENABLE(roxen-zts,
-[ --enable-roxen-zts Build the Roxen module using Zend Thread Safety], [
- PHP_ROXEN_ZTS=$enableval
-], [
- PHP_ROXEN_ZTS=no
-])
+PHP_ARG_ENABLE(roxen-zts, whether Roxen module is build using ZTS,
+[ --enable-roxen-zts ROXEN: Build the Roxen module using Zend Thread Safety], no, no)
-AC_MSG_CHECKING(for Roxen/Pike support)
+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)
+ 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/)
+ AC_MSG_ERROR([Could not 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,'`
+ 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)
+ 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)
+ 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])
+ 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
@@ -50,16 +43,12 @@ if test "$PHP_ROXEN" != "no"; then
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)
+ AC_DEFINE(ROXEN_USE_ZTS, 1, [Whether to use Roxen in ZTS mode])
fi
fi
-AC_MSG_RESULT($RESULT)
+AC_MSG_RESULT([$RESULT])
dnl ## Local Variables:
dnl ## tab-width: 4
diff --git a/sapi/thttpd/config.m4 b/sapi/thttpd/config.m4
index f872aa4d2a..371edaee84 100644
--- a/sapi/thttpd/config.m4
+++ b/sapi/thttpd/config.m4
@@ -2,14 +2,11 @@ dnl
dnl $Id$
dnl
-AC_ARG_WITH(thttpd,
-[ --with-thttpd=SRCDIR Build PHP as thttpd module], [
- PHP_THTTPD=$withval
-],[
- PHP_THTTPD=no
-])
+PHP_ARG_WITH(thttpd,,
+[ --with-thttpd=SRCDIR Build PHP as thttpd module], no, no)
+
+AC_MSG_CHECKING([for thttpd])
-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))
diff --git a/sapi/tux/config.m4 b/sapi/tux/config.m4
index d0a8196b68..06788be757 100644
--- a/sapi/tux/config.m4
+++ b/sapi/tux/config.m4
@@ -2,19 +2,15 @@ dnl
dnl $Id$
dnl
-AC_ARG_WITH(tux,
-[ --with-tux=MODULEDIR Build PHP as a TUX module (Linux only)], [
- PHP_TUX=$withval
-], [
- PHP_TUX=no
-])
+PHP_ARG_WITH(tux,,
+[ --with-tux=MODULEDIR Build PHP as a TUX module (Linux only)], no, no)
-AC_MSG_CHECKING(for TUX)
+AC_MSG_CHECKING([for 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)
+ AC_MSG_RESULT([$PHP_TUX])
else
AC_MSG_RESULT(no)
fi
diff --git a/sapi/webjames/config.m4 b/sapi/webjames/config.m4
index 9e406fc057..78c8a1936d 100644
--- a/sapi/webjames/config.m4
+++ b/sapi/webjames/config.m4
@@ -2,14 +2,11 @@ dnl
dnl $Id$
dnl
-AC_ARG_WITH(webjames,
-[ --with-webjames=SRCDIR Build PHP as a WebJames module (RISC OS only)],[
- PHP_WEBJAMES=$withval
-],[
- PHP_WEBJAMES=no
-])
+PHP_ARG_WITH(webjames,,
+[ --with-webjames=SRCDIR Build PHP as a WebJames module (RISC OS only)], no, no)
+
+AC_MSG_CHECKING([for webjames])
-AC_MSG_CHECKING(for webjames)
if test "$PHP_WEBJAMES" != "no"; then
PHP_EXPAND_PATH($PHP_WEBJAMES, PHP_WEBJAMES)
INSTALL_IT="\