mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Autotools: Update ax_check_compile_flag.m4 to serial 11 (#19127)
```sh wget -O build/ax_check_compile_flag.m4 \ https://cgit.git.savannah.gnu.org/cgit/autoconf-archive.git/plain/m4/ax_check_compile_flag.m4 ``` New version of AX_CHECK_COMPILE_FLAG macro now adds the -Werror flag automatically, if GNU-compatible compiler is detected.
This commit is contained in:
@@ -34,14 +34,24 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 7
|
||||
#serial 11
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether the _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
if test x"m4_case(_AC_LANG,
|
||||
[C], [$GCC],
|
||||
[C++], [$GXX],
|
||||
[Fortran], [$GFC],
|
||||
[Fortran 77], [$G77],
|
||||
[Objective C], [$GOBJC],
|
||||
[Objective C++], [$GOBJCXX],
|
||||
[no])" = xyes ; then
|
||||
add_gnu_werror="-Werror"
|
||||
fi
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 $add_gnu_werror"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
|
||||
Reference in New Issue
Block a user