diff options
author | Peter Simons <simons@cryp.to> | 2017-03-21 16:19:50 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2017-03-21 16:21:13 +0100 |
commit | 8f31e69c1b7fc79f78bf93ef10a18a53ddaeb765 (patch) | |
tree | 5956e170ae74462861157a0769e11e81a528a1f3 /m4/ax_compiler_flags_cxxflags.m4 | |
parent | 45f2bf2a9deffb2383051590852c371729561906 (diff) | |
download | autoconf-archive-8f31e69c1b7fc79f78bf93ef10a18a53ddaeb765.tar.gz |
AX_COMPILER_FLAGS_C(XX)FLAGS: only use -Wno-suggest-attribute=format if compiler supports it
Submitted in https://savannah.gnu.org/patch/index.php?9243.
Suggested-by: Attila <attila@stalphonsos.com>
Diffstat (limited to 'm4/ax_compiler_flags_cxxflags.m4')
-rw-r--r-- | m4/ax_compiler_flags_cxxflags.m4 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/m4/ax_compiler_flags_cxxflags.m4 b/m4/ax_compiler_flags_cxxflags.m4 index 405cee0..3067d9b 100644 --- a/m4/ax_compiler_flags_cxxflags.m4 +++ b/m4/ax_compiler_flags_cxxflags.m4 @@ -26,7 +26,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 9 +#serial 10 AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ AC_REQUIRE([AC_PROG_SED]) @@ -51,6 +51,13 @@ AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ ax_compiler_flags_test="" ]) + # Check that -Wno-suggest-attribute=format is supported + AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[ + ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format" + ],[ + ax_compiler_no_suggest_attribute_flags="" + ]) + # Base flags AX_APPEND_COMPILE_FLAGS([ dnl -fno-strict-aliasing dnl @@ -104,7 +111,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ AX_APPEND_FLAG([-Werror],ax_warn_cxxflags_variable) AX_APPEND_COMPILE_FLAGS([ dnl - -Wno-suggest-attribute=format dnl + [$ax_compiler_no_suggest_attribute_flags] dnl ],ax_warn_cxxflags_variable,[$ax_compiler_flags_test]) ]) |