diff options
| author | Jani Taskinen <jani@php.net> | 2007-07-11 23:20:37 +0000 |
|---|---|---|
| committer | Jani Taskinen <jani@php.net> | 2007-07-11 23:20:37 +0000 |
| commit | eb923bf6fc9cf71aaf45641784aeb3d23254bf45 (patch) | |
| tree | 8348f41d3874c54c18f8d5baf2007c76bcca45a1 /configure.in | |
| parent | 4ef905ae59202730d1d8a37d4babec76f98b6664 (diff) | |
| download | php-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 'configure.in')
| -rw-r--r-- | configure.in | 128 |
1 files changed, 65 insertions, 63 deletions
diff --git a/configure.in b/configure.in index 8e88952db3..0e0d967bab 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ - ## $Id$ -*- autoconf -*- +## $Id$ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -10,8 +10,6 @@ dnl ## options and check for the basic compile tools. dnl ## Diversion 2 is the initial checking of OS features, programs, dnl ## libraries and so on. - - dnl ## In diversion 3 we check for compile-time options to the PHP dnl ## core and how to deal with different system dependencies. This dnl ## includes what regex library is used and whether debugging or short @@ -131,9 +129,8 @@ AC_AIX AC_PROG_LN_S dnl Support systems with system libraries in e.g. /usr/lib64 -AC_ARG_WITH(libdir, -[ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib], -[PHP_LIBDIR=$withval], [PHP_LIBDIR=lib]) +PHP_ARG_WITH(libdir, for system library directory, +[ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib],lib,no) dnl check for -R, etc. switch PHP_RUNPATH_SWITCH @@ -707,9 +704,9 @@ else ZEND_DEBUG=no fi -PHP_ARG_WITH(layout,[layout of installed files], -[ --with-layout=TYPE Set how installed files will be laid out. Type is - one of "PHP" or "GNU" [TYPE=PHP]], PHP, no) +PHP_ARG_WITH(layout, layout of installed files, +[ --with-layout=TYPE Set how installed files will be laid out. Type can + be either PHP or GNU [PHP]], PHP, no) case $PHP_LAYOUT in GNU) @@ -720,7 +717,7 @@ case $PHP_LAYOUT in ;; esac -PHP_ARG_WITH(config-file-path,[path to configuration file], +PHP_ARG_WITH(config-file-path, path to configuration file, [ --with-config-file-path=PATH Set the path in which to look for php.ini [PREFIX/lib]], DEFAULT, no) @@ -735,12 +732,14 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then esac fi -PHP_ARG_WITH(config-file-scan-dir,[where to scan for configuration files], +AC_MSG_CHECKING([where to scan for configuration files]) +PHP_ARG_WITH(config-file-scan-dir,, [ --with-config-file-scan-dir=PATH Set the path where to scan for configuration files], DEFAULT, no) if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then PHP_CONFIG_FILE_SCAN_DIR= fi +AC_MSG_RESULT([$PHP_CONFIG_FILE_SCAN_DIR]) test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS" @@ -754,28 +753,19 @@ else fi AC_MSG_CHECKING([for safe mode exec dir]) -AC_ARG_WITH(exec-dir, +PHP_ARG_WITH(exec-dir,, [ --with-exec-dir[=DIR] Only allow executables in DIR under safe-mode - [/usr/local/php/bin]], -[ - if test "$withval" != "no"; then - if test "$withval" = "yes"; then - AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ]) - AC_MSG_RESULT([/usr/local/php/bin]) - else - AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ]) - AC_MSG_RESULT([$withval]) - fi - else - AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ]) - AC_MSG_RESULT([/usr/local/php/bin]) - fi -],[ - AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ]) + [/usr/local/php/bin]], no, no) + +if test "$PHP_EXEC_DIR" != "no" && test "$PHP_EXEC_DIR" != "yes" ; then + AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR, "$PHP_EXEC_DIR", [ ]) + AC_MSG_RESULT([$PHP_EXEC_DIR]) +else + AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR, "/usr/local/php/bin", [ ]) AC_MSG_RESULT([/usr/local/php/bin]) -]) +fi -PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler, +PHP_ARG_ENABLE(sigchild, whether to enable PHP's own SIGCHLD handler, [ --enable-sigchild Enable PHP's own SIGCHLD handler], no, no) if test "$PHP_SIGCHILD" = "yes"; then @@ -784,7 +774,7 @@ else AC_DEFINE(PHP_SIGCHILD, 0, [ ]) fi -PHP_ARG_ENABLE(magic-quotes,whether to enable magic quotes by default, +PHP_ARG_ENABLE(magic-quotes, whether to enable magic quotes by default, [ --enable-magic-quotes Enable magic quotes by default.], no, no) if test "$PHP_MAGIC_QUOTES" = "yes"; then @@ -809,20 +799,19 @@ if test "$PHP_LIBGCC" = "yes"; then PHP_ADD_LIBRARY(gcc, yes) fi -PHP_ARG_ENABLE(short-tags,whether to enable short tags by default, -[ --disable-short-tags Disable the short-form <? start tag by default],yes, no) +PHP_ARG_ENABLE(short-tags, whether to enable short tags by default, +[ --disable-short-tags Disable the short-form <? start tag by default], yes, no) if test "$PHP_SHORT_TAGS" = "yes"; then - AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"1",[ ]) + AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "1", [ ]) else - AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"0",[ ]) + AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, "0", [ ]) fi -PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc, +PHP_ARG_ENABLE(dmalloc, whether to enable dmalloc, [ --enable-dmalloc Enable dmalloc], no, no) if test "$PHP_DMALLOC" = "yes"; then - AC_CHECK_LIB(dmalloc, dmalloc_error, [ PHP_ADD_LIBRARY(dmalloc) AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc]) @@ -832,25 +821,23 @@ if test "$PHP_DMALLOC" = "yes"; then ]) fi -PHP_ARG_ENABLE(ipv6,whether to enable IPv6 support, +PHP_ARG_ENABLE(ipv6, whether to enable IPv6 support, [ --disable-ipv6 Disable IPv6 support], yes, no) if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then - AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support]) + AC_DEFINE(HAVE_IPV6, 1, [Whether to enable IPv6 support]) fi AC_MSG_CHECKING([how big to make fd sets]) -AC_ARG_ENABLE(fd-setsize, -[ --enable-fd-setsize Set size of descriptor sets],[ - if test "x$enableval" != "xyes"; then - CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$enableval" - AC_MSG_RESULT(using $enableval) - else - AC_MSG_RESULT(using system default) - fi -],[ - AC_MSG_RESULT(using system default) -]) +PHP_ARG_ENABLE(fd-setsize,, +[ --enable-fd-setsize Set size of descriptor sets], no, no) + +if test "$PHP_FD_SETSIZE" != "yes"; then + CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PHP_FD_SETSIZE" + AC_MSG_RESULT([using $PHP_FD_SETSIZE]) +else + AC_MSG_RESULT([using system default]) +fi divert(5) @@ -932,7 +919,7 @@ if test -z "$with_pear" && test "$enable_pear" = "no"; then fi # If CLI is disabled -> disable PEAR -if test "$PHP_SAPI_CLI" = "no"; then +if test "$PHP_CLI" = "no"; then with_pear=no fi @@ -1146,7 +1133,7 @@ case $host_alias in ;; esac -if test "$PHP_SAPI_CLI" != "no"; then +if test "$PHP_CLI" != "no"; then PHP_CLI_TARGET="\$(SAPI_CLI_PATH)" PHP_INSTALL_CLI_TARGET="install-cli" PHP_ADD_SOURCES(sapi/cli, php_cli.c php_cli_readline.c getopt.c,, cli) @@ -1365,6 +1352,14 @@ scripts/phpize scripts/man1/phpize.1 \ scripts/php-config scripts/man1/php-config.1 \ $PHP_OUTPUT_FILES" +dnl +dnl Check for unknown configure options +dnl +PHP_CHECK_CONFIGURE_OPTIONS + +dnl +dnl Generate build files +dnl AC_OUTPUT($ALL_OUTPUT_FILES, [], [ if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then @@ -1426,17 +1421,15 @@ dnl fi # Warn about CGI version with no extra security options. if test "$PHP_SAPI" = "cgi"; then - if test "$REDIRECT" = "0"; then - if test "$DISCARD_PATH" = "0"; then - echo "+--------------------------------------------------------------------+" - echo "| *** WARNING *** |" - echo "| |" - echo "| You will be compiling the CGI version of PHP without any |" - echo "| redirection checking. By putting this cgi binary somewhere in |" - echo "| your web space, users may be able to circumvent existing .htaccess |" - echo "| security by loading files directly through the parser. See |" - echo "| http://www.php.net/manual/security.php for more details. |" - fi + if test "$PHP_FORCE_CGI_REDIRECT" = "no" && test "$PHP_DISCARD_PATH" = "no"; then + echo "+--------------------------------------------------------------------+" + echo "| *** WARNING *** |" + echo "| |" + echo "| You will be compiling the CGI version of PHP without any |" + echo "| redirection checking. By putting this cgi binary somewhere in |" + echo "| your web space, users may be able to circumvent existing .htaccess |" + echo "| security by loading files directly through the parser. See |" + echo "| http://www.php.net/manual/security.php for more details. |" fi fi @@ -1498,6 +1491,15 @@ Thank you for using PHP. X + # Output unknown configure options + if test "$PHP_UNKNOWN_CONFIGURE_OPTIONS"; then + echo "Notice: Following unknown configure options were used: +$PHP_UNKNOWN_CONFIGURE_OPTIONS + +Check '[$]0 --help' for available options +" + fi + fi ]) |
