]> granicus.if.org Git - php/commitdiff
Remove PHP_CHECK_CONFIGURE_OPTIONS
authorPeter Kokot <peterkokot@gmail.com>
Tue, 2 Jul 2019 20:15:24 +0000 (22:15 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Tue, 2 Jul 2019 20:15:24 +0000 (22:15 +0200)
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

build/php.m4
configure.ac

index 9b84ce3274a91cd5a32199aa5a73bccbbced6421..d35cb037a72bb15babbdd1b16c83429e63021997 100644 (file)
@@ -2208,61 +2208,6 @@ EOF
   PHP_SUBST_OLD(CONFIGURE_OPTIONS)
 ])
 
-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
index c536defa1e9949d1b8146e79504cc3c0b9834b0a..35fadf7ee425fcd7003e23cfdc7ed23147c53882 100644 (file)
@@ -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