~ubuntu-branches/ubuntu/utopic/strongswan/utopic

« back to all changes in this revision

Viewing changes to src/frontends/gnome/m4/compiler_warnings.m4

  • Committer: Package Import Robot
  • Author(s): Jonathan Davies
  • Date: 2014-01-20 19:00:59 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20140120190059-z8e4dl3g8cd09yi5
Tags: 5.1.2~dr3+git20130120-0ubuntu1
* Upstream Git snapshot for build fixes with regards to entropy.
* debian/rules:
  - Enforcing DEB_BUILD_OPTIONS=nostrip for library integrity checking.
  - Set TESTS_REDUCED_KEYLENGTHS to one generate smallest key-lengths in
    tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
])