diff options
author | Hubert Figuière <hub@figuiere.net> | 2017-01-11 19:38:04 -0500 |
---|---|---|
committer | Hubert Figuière <hub@figuiere.net> | 2017-01-11 19:38:04 -0500 |
commit | 5c89459d2ab795f9598dda36d7c1455680b9c3a8 (patch) | |
tree | 9f55b586d6feb15118f3157b8aaa37cb0565781f | |
parent | b3c18a4a0a1ffd2989e54616b582db583ce9af37 (diff) |
configure: enable a lot of warnings
-rw-r--r-- | configure.ac | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index dfd8587..9f24bb4 100644 --- a/configure.ac +++ b/configure.ac @@ -209,9 +209,44 @@ dnl due to stupid m4 I had to double the [ and ] in the regexp fi AC_SUBST(VALGRIND) +AC_LANG_CPLUSPLUS +AC_LANG_COMPILER_REQUIRE + +dnl *************************************************************** +dnl Excessive warnings +dnl *************************************************************** +AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option], [ + ax_compiler_flags_test="-Werror=unknown-warning-option" +], [ + ax_compiler_flags_test="" +]) +AX_APPEND_COMPILE_FLAGS([ \ + -Wchar-subscripts \ + -Wcast-align \ + -Wextra \ + -Wexceptions \ + -Wheader-guard \ + -Wformat \ +dnl -Wformat-nonliteral \ + -Wformat-security \ + -Wlogical-not-parentheses \ + -Wmisleading-indentation \ + -Wmissing-noreturn \ + -Woverloaded-virtual \ + -Wpointer-arith \ +dnl -Wredundant-decls \ + -Wpointer-bool-conversion \ + -Wshadow \ + -Wsign-compare \ + -Wno-suggest-attribute=noreturn \ + -Wnull-conversion \ + -Wunreachable-code \ + -Wunused \ + -Wwrite-strings \ +], [], [$ax_compiler_flags_test]) + AC_ARG_ENABLE(asan,[ --enable-asan Turn on address sanitizer],[ - AX_CFLAGS_GCC_OPTION([-fsanitize=address -fno-omit-frame-pointer]) - AX_CXXFLAGS_GCC_OPTION([-fsanitize=address -fno-omit-frame-pointer]) + AX_APPEND_COMPILE_FLAGS([-fsanitize=address -fno-omit-frame-pointer]) ] , [ |