]> granicus.if.org Git - php/commitdiff
Remove PHP_CHECK_GCC_ARG()
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Jul 2020 10:45:26 +0000 (12:45 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Jul 2020 13:07:53 +0000 (15:07 +0200)
In favor of AX_CHECK_COMPILE_FLAG(), which we bundle since at least
PHP 7.

Closes GH-5904.

UPGRADING.INTERNALS
build/php.m4
configure.ac

index bec30c8314bed66146873f1d1e11272e1fa2b5af..6985650801fb1c52cd6f78cf67c909333c1e9809 100644 (file)
@@ -214,7 +214,11 @@ PHP 8.0 INTERNALS UPGRADE NOTES
   b. Unix build system changes
 
     1.  --enable-maintainer-zts is renamed --enable-zts for parity with Windows
-        and as recognition that ZTS is not a "maintainer" or experimental feature.
+        and as recognition that ZTS is not a "maintainer" or experimental
+        feature.
+
+    2.  The PHP_CHECK_GCC_ARG() m4 macro has been removed in favor of
+        AX_CHECK_COMPILE_FLAG().
 
   c. Windows build system changes
 
index a5b18c15aaf18cb5f4a050fae6821f334261dfd7..bdc02573ac95aaf4a679a85e76761c2244a22c72 100644 (file)
@@ -304,30 +304,6 @@ if test "$PHP_RPATH" = "no"; then
 fi
 ])
 
-dnl
-dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
-dnl
-AC_DEFUN([PHP_CHECK_GCC_ARG],[
-  gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z=-,a-z__)
-  AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z=-,a-z__), [
-  echo 'void somefunc() { };' > conftest.c
-  cmd='$CC $1 -c conftest.c'
-  if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
-    ac_result=no
-  else
-    ac_result=yes
-  fi
-  eval $gcc_arg_name=$ac_result
-  rm -f conftest.*
-  ])
-  if eval test "\$$gcc_arg_name" = "yes"; then
-    $2
-  else
-    :
-    $3
-  fi
-])
-
 dnl
 dnl PHP_LIBGCC_LIBPATH(gcc)
 dnl
index 3e438c5fefeeec688164fdaf386e5ae9bcc49b6b..45614f858102dfae9d48ea5910335f2854fa9fb2 100644 (file)
@@ -224,10 +224,8 @@ case $host_alias in
     ;;
   *darwin*)
     if test -n "$GCC"; then
-      PHP_CHECK_GCC_ARG(-no-cpp-precomp, gcc_no_cpp_precomp=yes)
-      if test "$gcc_no_cpp_precomp" = "yes"; then
-        CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
-      fi
+      AX_CHECK_COMPILE_FLAG([-no-cpp-precomp],
+                            [CPPFLAGS="$CPPFLAGS -no-cpp-precomp"])
     fi
     ;;
   *mips*)