CFLAGS_NOSTRICT=-fno-strict-aliasing
CFLAGS_NOUNUSED=
CFLAGS_NOOLDSTYLE=
+CFLAGS_NOIMPLICIT_FALLTHROUGH=
XCFLAGS_NOCHECKING="$XCFLAGS"
if test "x$GCC" = "xyes"; then
CFLAGS_NOERROR="-Wno-error"
CFLAGS_NOUNUSED="-Wno-unused"
CFLAGS_NOOLDSTYLE="-Wno-old-style-definition"
+ AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough],
+ [CFLAGS_NOIMPLICIT_FALLTHROUGH])
AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode])
else
CFLAGS_NOSTRICT=
esac
fi
+dnl add additional checks if compilers support the flags
+AS_IF([test "x$enable_checking" != "xno"],
+ [AX_APPEND_COMPILE_FLAGS([-Wimplicit-fallthrough], [XCFLAGS])
+])
+
dnl horribly cheating, assuming double / is ok.
case $INSTALL in
./* )
AC_SUBST(CFLAGS_NOSTRICT)
AC_SUBST(CFLAGS_NOUNUSED)
AC_SUBST(CFLAGS_NOOLDSTYLE)
+AC_SUBST(CFLAGS_NOIMPLICIT_FALLTHROUGH)
AC_SUBST(CFLAGS_WERROR)
AC_SUBST(XCFLAGS64)
AC_SUBST(XLDFLAGS)