diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-11-04 14:13:22 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-11-04 14:13:22 -0500 |
commit | da56efba489456c5b9374c76b5f74b60f8eb9891 (patch) | |
tree | e5e63bc2f0f8552174b2b4a22cc67285e900c9a5 | |
parent | Fix behavior of utimensat(..., AT_EMPTY_PATH) (diff) | |
download | sandbox-da56efba489456c5b9374c76b5f74b60f8eb9891.tar.gz sandbox-da56efba489456c5b9374c76b5f74b60f8eb9891.tar.bz2 sandbox-da56efba489456c5b9374c76b5f74b60f8eb9891.zip |
Update ax_check_compile_flag.m4
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rw-r--r-- | m4/ax_check_compile_flag.m4 | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 index bd753b3..54191c5 100644 --- a/m4/ax_check_compile_flag.m4 +++ b/m4/ax_check_compile_flag.m4 @@ -34,14 +34,24 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 6 +#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 _AC_LANG compiler accepts $1], CACHEVAR, [ +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])]) |