Skip to content

Commit 0462cbb

Browse files
committed
Use default Autoconf configuration options checkings
Instead of building a custom macro for checking configure options, Autoconf 2.62+ 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 fixing the bug #55634.
1 parent cbbd473 commit 0462cbb

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
@@ -1590,9 +1590,6 @@ scripts/phpize scripts/man1/phpize.1 \
15901590
scripts/php-config scripts/man1/php-config.1 \
15911591
$PHP_OUTPUT_FILES"
15921592

1593-
dnl Check for unknown configure options.
1594-
PHP_CHECK_CONFIGURE_OPTIONS
1595-
15961593
dnl Generate build files.
15971594
AC_CONFIG_FILES([$ALL_OUTPUT_FILES])
15981595
AC_CONFIG_COMMANDS([default],[],[
@@ -1694,15 +1691,6 @@ Thank you for using PHP.
16941691
16951692
X
16961693
1697-
dnl Output unknown configure options.
1698-
if test "$PHP_UNKNOWN_CONFIGURE_OPTIONS"; then
1699-
echo "Notice: Following unknown configure options were used:
1700-
$PHP_UNKNOWN_CONFIGURE_OPTIONS
1701-
1702-
Check '[$]0 --help' for available options
1703-
"
1704-
fi
1705-
17061694
fi
17071695
])
17081696
AC_OUTPUT

0 commit comments

Comments
 (0)