diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-07-02 22:15:24 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-07-02 22:15:24 +0200 |
commit | 16df718251cac201e956dee35af8d96f548395e6 (patch) | |
tree | fec129e902450c62203707895bbefa7c9fb85598 | |
parent | b1ef50091d81a94e1d0a92010d99a862bb5a58b0 (diff) | |
download | php-git-16df718251cac201e956dee35af8d96f548395e6.tar.gz |
Remove PHP_CHECK_CONFIGURE_OPTIONS
Instead of building a custom macro for checking configure options,
Autoconf 2.62+ already outputs a warning at the beginning and the end
of the output of configure script. It automatically detects correct
and wrong options better.
This is related also to bug #55634.
So now instead a better way is the default Autoconf approach:
This outputs a warning at the beginning and end of the configure output:
./configure --with-non-existing
This results in fatal error:
./configure --non-existing
configure: error: unrecognized option: `--non-existing'
Try `./configure --help' for more information
The `--enable-option-checking=fatal` results in fatal error for all non
existing options:
./configure --with-non-existing --enable-option-checking=fatal
configure: error: unrecognized options: --with-non-existing
Closes GH-4348
-rw-r--r-- | build/php.m4 | 55 | ||||
-rw-r--r-- | configure.ac | 12 |
2 files changed, 0 insertions, 67 deletions
diff --git a/build/php.m4 b/build/php.m4 index 9b84ce3274..d35cb037a7 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2209,61 +2209,6 @@ EOF ]) dnl -dnl PHP_CHECK_CONFIGURE_OPTIONS -dnl -AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[ - for arg in $ac_configure_args; do - case $arg in - --with-*[)] - arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`" - ;; - --without-*[)] - arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`" - ;; - --enable-*[)] - arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`" - ;; - --disable-*[)] - arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`" - ;; - *[)] - continue - ;; - esac - case $arg_name in - dnl Allow --disable-all / --enable-all - enable-all[)];; - - dnl Allow certain libtool options - enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];; - - dnl Allow certain TSRM options - with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads [)];; - - dnl Allow certain Zend options - with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];; - - dnl All the rest must be set using the PHP_ARG_* macros. PHP_ARG_* macros - dnl set php_enable_<arg_name> or php_with_<arg_name>. - *[)] - dnl Options that exist before PHP 6 - if test "$PHP_MAJOR_VERSION" -lt "6"; then - case $arg_name in - enable-zend-multibyte[)] continue;; - esac - fi - - is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'` - if eval test "x\$$is_arg_set" = "x"; then - PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS -[$]arg" - fi - ;; - esac - done -]) - -dnl dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]]) dnl AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[ diff --git a/configure.ac b/configure.ac index c536defa1e..35fadf7ee4 100644 --- a/configure.ac +++ b/configure.ac @@ -1585,9 +1585,6 @@ scripts/phpize scripts/man1/phpize.1 \ scripts/php-config scripts/man1/php-config.1 \ $PHP_OUTPUT_FILES" -dnl Check for unknown configure options. -PHP_CHECK_CONFIGURE_OPTIONS - dnl Generate build files. AC_CONFIG_FILES([$ALL_OUTPUT_FILES]) AC_CONFIG_COMMANDS([default],[],[ @@ -1689,15 +1686,6 @@ Thank you for using PHP. X - dnl 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 ]) AC_OUTPUT |