Skip to content

Commit 16df718

Browse files
committed
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
1 parent b1ef500 commit 16df718

File tree

2 files changed

+0
-67
lines changed

2 files changed

+0
-67
lines changed

build/php.m4

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,61 +2208,6 @@ EOF
22082208
PHP_SUBST_OLD(CONFIGURE_OPTIONS)
22092209
])
22102210

2211-
dnl
2212-
dnl PHP_CHECK_CONFIGURE_OPTIONS
2213-
dnl
2214-
AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
2215-
for arg in $ac_configure_args; do
2216-
case $arg in
2217-
--with-*[)]
2218-
arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
2219-
;;
2220-
--without-*[)]
2221-
arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
2222-
;;
2223-
--enable-*[)]
2224-
arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
2225-
;;
2226-
--disable-*[)]
2227-
arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
2228-
;;
2229-
*[)]
2230-
continue
2231-
;;
2232-
esac
2233-
case $arg_name in
2234-
dnl Allow --disable-all / --enable-all
2235-
enable-all[)];;
2236-
2237-
dnl Allow certain libtool options
2238-
enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
2239-
2240-
dnl Allow certain TSRM options
2241-
with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads [)];;
2242-
2243-
dnl Allow certain Zend options
2244-
with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
2245-
2246-
dnl All the rest must be set using the PHP_ARG_* macros. PHP_ARG_* macros
2247-
dnl set php_enable_<arg_name> or php_with_<arg_name>.
2248-
*[)]
2249-
dnl Options that exist before PHP 6
2250-
if test "$PHP_MAJOR_VERSION" -lt "6"; then
2251-
case $arg_name in
2252-
enable-zend-multibyte[)] continue;;
2253-
esac
2254-
fi
2255-
2256-
is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
2257-
if eval test "x\$$is_arg_set" = "x"; then
2258-
PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
2259-
[$]arg"
2260-
fi
2261-
;;
2262-
esac
2263-
done
2264-
])
2265-
22662211
dnl
22672212
dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
22682213
dnl

configure.ac

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,9 +1585,6 @@ scripts/phpize scripts/man1/phpize.1 \
15851585
scripts/php-config scripts/man1/php-config.1 \
15861586
$PHP_OUTPUT_FILES"
15871587

1588-
dnl Check for unknown configure options.
1589-
PHP_CHECK_CONFIGURE_OPTIONS
1590-
15911588
dnl Generate build files.
15921589
AC_CONFIG_FILES([$ALL_OUTPUT_FILES])
15931590
AC_CONFIG_COMMANDS([default],[],[
@@ -1689,15 +1686,6 @@ Thank you for using PHP.
16891686
16901687
X
16911688
1692-
dnl Output unknown configure options.
1693-
if test "$PHP_UNKNOWN_CONFIGURE_OPTIONS"; then
1694-
echo "Notice: Following unknown configure options were used:
1695-
$PHP_UNKNOWN_CONFIGURE_OPTIONS
1696-
1697-
Check '[$]0 --help' for available options
1698-
"
1699-
fi
1700-
17011689
fi
17021690
])
17031691
AC_OUTPUT

0 commit comments

Comments
 (0)