Removed strayed code fragment
[strongswan.git] / src / charon / plugins / nm / gnome / m4 / compiler_warnings.m4
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
7         AC_MSG_RESULT(yes)
8         CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
9
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
14                 SAVE_CFLAGS="$CFLAGS"
15                 CFLAGS="$CFLAGS $option"
16                 AC_MSG_CHECKING([whether gcc understands $option])
17                 AC_TRY_COMPILE([], [],
18                         has_option=yes,
19                         has_option=no,)
20                 if test $has_option = no; then
21                         CFLAGS="$SAVE_CFLAGS"
22                 fi
23                 AC_MSG_RESULT($has_option)
24                 unset has_option
25                 unset SAVE_CFLAGS
26         done
27         unset option
28 else
29         AC_MSG_RESULT(no)
30 fi
31 ])