~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to m4/reorganization/distcheck.m4

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_ARG_ENABLE([distcheck-werror],
 
2
              AC_HELP_STRING([--enable-distcheck-werror],
 
3
                             [enable warnings as error for distcheck
 
4
                              @<:@default=no@:>@]),
 
5
[enable_distcheckwerror=$enableval],[enable_distcheckwerror="no"])
 
6
 
 
7
# Enable distcheck warnings and Werror only for gcc versions that support them,
 
8
# and only after we've run the configure tests.
 
9
# Some configure tests fail (like checking for cos in -lm) if we enable these
 
10
# Werror flags for configure too (for example -Wstrict-prototypes makes
 
11
# configure think that -lm doesn't have cos, hence its in libc).
 
12
WERR_CFLAGS=
 
13
WERR_CFLAGS_MILTER=
 
14
if test "x$enable_distcheckwerror" = "xyes"; then
 
15
    if test "$distcheck_enable_flags" = "1"; then
 
16
        WERR_COMMON="-Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wno-error=strict-aliasing -Wno-error=bad-function-cast -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-but-set-variable -Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=aggregate-return"
 
17
        WERR_CFLAGS="$WERR_COMMON -Wwrite-strings"
 
18
        WERR_CFLAGS_MILTER="$WERR_COMMON -Wno-error=format-nonliteral"
 
19
    fi
 
20
fi
 
21
AC_SUBST([WERR_CFLAGS])
 
22
AC_SUBST([WERR_CFLAGS_MILTER])