summaryrefslogtreecommitdiff
path: root/sapi/apache
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/apache
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/apache')
-rw-r--r--sapi/apache/config.m4232
1 files changed, 111 insertions, 121 deletions
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)