Skip to content

Commit e2f39f8

Browse files
committed
Remove PHP_CHECK_GCC_ARG()
In favor of AX_CHECK_COMPILE_FLAG(), which we bundle since at least PHP 7. Closes GH-5904.
1 parent 3a29da0 commit e2f39f8

File tree

3 files changed

+7
-29
lines changed

3 files changed

+7
-29
lines changed

UPGRADING.INTERNALS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ PHP 8.0 INTERNALS UPGRADE NOTES
214214
b. Unix build system changes
215215

216216
1. --enable-maintainer-zts is renamed --enable-zts for parity with Windows
217-
and as recognition that ZTS is not a "maintainer" or experimental feature.
217+
and as recognition that ZTS is not a "maintainer" or experimental
218+
feature.
219+
220+
2. The PHP_CHECK_GCC_ARG() m4 macro has been removed in favor of
221+
AX_CHECK_COMPILE_FLAG().
218222

219223
c. Windows build system changes
220224

build/php.m4

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -304,30 +304,6 @@ if test "$PHP_RPATH" = "no"; then
304304
fi
305305
])
306306

307-
dnl
308-
dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
309-
dnl
310-
AC_DEFUN([PHP_CHECK_GCC_ARG],[
311-
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z=-,a-z__)
312-
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z=-,a-z__), [
313-
echo 'void somefunc() { };' > conftest.c
314-
cmd='$CC $1 -c conftest.c'
315-
if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
316-
ac_result=no
317-
else
318-
ac_result=yes
319-
fi
320-
eval $gcc_arg_name=$ac_result
321-
rm -f conftest.*
322-
])
323-
if eval test "\$$gcc_arg_name" = "yes"; then
324-
$2
325-
else
326-
:
327-
$3
328-
fi
329-
])
330-
331307
dnl
332308
dnl PHP_LIBGCC_LIBPATH(gcc)
333309
dnl

configure.ac

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,8 @@ case $host_alias in
224224
;;
225225
*darwin*)
226226
if test -n "$GCC"; then
227-
PHP_CHECK_GCC_ARG(-no-cpp-precomp, gcc_no_cpp_precomp=yes)
228-
if test "$gcc_no_cpp_precomp" = "yes"; then
229-
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
230-
fi
227+
AX_CHECK_COMPILE_FLAG([-no-cpp-precomp],
228+
[CPPFLAGS="$CPPFLAGS -no-cpp-precomp"])
231229
fi
232230
;;
233231
*mips*)

0 commit comments

Comments
 (0)