1
AC_DEFUN([NM_COMPILER_WARNINGS],
2
[AC_ARG_ENABLE(more-warnings,
3
AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
4
set_more_warnings="$enableval",set_more_warnings=yes)
5
AC_MSG_CHECKING(for more warnings, including -Werror)
6
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
8
CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
10
for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \
11
-Wdeclaration-after-statement -Wstrict-prototypes \
12
-Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \
13
-fno-strict-aliasing; do
15
CFLAGS="$CFLAGS $option"
16
AC_MSG_CHECKING([whether gcc understands $option])
17
AC_TRY_COMPILE([], [],
20
if test $has_option = no; then
23
AC_MSG_RESULT($has_option)