diff options
author | David King <dking@redhat.com> | 2015-02-20 09:02:46 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-02-20 23:06:10 +0100 |
commit | 9b3173af917403223157c07f1dcddd9c30f4eb6b (patch) | |
tree | 82fa13ed7a0877ac834f4ccbefa3e5dc67e61891 /m4/ax_compiler_flags_cflags.m4 | |
parent | 96dd179162e12f0111ce5bed2011a7611d6a9bbd (diff) | |
download | autoconf-archive-9b3173af917403223157c07f1dcddd9c30f4eb6b.tar.gz |
ax_compiler_flags_cflags: Ensure the current language is C
Diffstat (limited to 'm4/ax_compiler_flags_cflags.m4')
-rw-r--r-- | m4/ax_compiler_flags_cflags.m4 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/m4/ax_compiler_flags_cflags.m4 b/m4/ax_compiler_flags_cflags.m4 index 7f2388d..204f64c 100644 --- a/m4/ax_compiler_flags_cflags.m4 +++ b/m4/ax_compiler_flags_cflags.m4 @@ -25,7 +25,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 4 +#serial 5 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) @@ -36,6 +36,8 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ m4_define(ax_warn_cflags_variable, [m4_normalize(ifelse([$1],,[WARN_CFLAGS],[$1]))]) + AC_LANG_PUSH([C]) + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad # flags, otherwise they are always appended to the warn_cflags variable, and # Clang warns on them for every compilation unit. @@ -128,6 +130,8 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) ]) + AC_LANG_POP([C]) + # Substitute the variables AC_SUBST(ax_warn_cflags_variable) ])dnl AX_COMPILER_FLAGS |