summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 9 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index b33e56cf..9ae070c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,29 +59,15 @@ if test "$YACC" = :; then
AC_MSG_ERROR([bison not found but required])
fi
-
-changequote(,)dnl
-ensureflag() {
- flag="$1"; shift
- result="$@"
-
- case " ${result} " in
- *[\ \ ]${flag}[\ \ ]*) ;;
- *) result="${flag} ${result}" ;;
- esac
-
- echo ${result}
-}
-changequote([,])dnl
-
-if test "$GCC" = "yes"; then
- for flag in -Wall -Wchar-subscripts -Wmissing-declarations \
- -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align \
- -Wsign-compare -fno-strict-aliasing;
- do
- CFLAGS="$(ensureflag $flag $CFLAGS)"
- done
-fi
+# Default compiler warnings
+m4_ifndef([AX_COMPILER_FLAGS], [AC_MSG_ERROR(['autoconf-archive' missing])])
+AX_COMPILER_FLAGS(,, [yes])
+# These get triggered a lot, not worth it imo, but feel free to fix them
+AX_APPEND_COMPILE_FLAGS([-Wno-discarded-qualifiers -Wno-duplicated-branches -Wno-switch-enum])
+# FIXME: Fix the warnings and remove the flags
+AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls -Wno-switch-default -Wno-shadow -Wno-deprecated-declarations -Wno-cast-function-type -Wno-type-limits])
+AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough -Wno-suggest-attribute=format -Wno-double-promotion -Wno-sign-compare])
+AX_APPEND_COMPILE_FLAGS([-Wno-incompatible-pointer-types])
# Checks for libraries.
AC_CHECK_LIB([dl], [dlopen])