File: wflags.m4

package info (click to toggle)
heimdal 1.6~git20120403%2Bdfsg1-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 34,428 kB
  • sloc: ansic: 338,234; sh: 7,993; makefile: 4,671; yacc: 3,036; perl: 1,888; python: 748; lex: 731; awk: 465; java: 119; asm: 30; lisp: 29
file content (37 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
dnl $Id$
dnl
dnl set WFLAGS

AC_DEFUN([rk_WFLAGS],[

AC_ARG_ENABLE(developer, 
	AS_HELP_STRING([--enable-developer], [enable developer warnings]))
if test "X$enable_developer" = Xyes; then
    dwflags="-Werror"
fi
AM_CONDITIONAL(DEVELOPER_MODE, test "X$enable_developer" = Xyes)

WFLAGS_NOUNUSED=""
WFLAGS_NOIMPLICITINT=""
if test -z "$WFLAGS" -a "$GCC" = "yes"; then
  # -Wno-implicit-int for broken X11 headers
  # leave these out for now:
  #   -Wcast-align doesn't work well on alpha osf/1
  #   -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast
  #   -Wmissing-declarations -Wnested-externs
  #   -Wstrict-overflow=5
  WFLAGS="ifelse($#, 0,-Wall, $1) $dwflags"
  WFLAGS_NOIMPLICITINT="-Wno-implicit-int"

  #
  # WFLAGS_LITE can be appended to WFLAGS to turn off a host of warnings
  # that fail for various bits of older code in appl/.  Let's not use it
  # for the main libraries, though.
  WFLAGS_LITE="-Wno-extra -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-shadow"
  # -Wno-unused-result (not supported on gcc-4.2)

fi
AC_SUBST(WFLAGS)dnl
AC_SUBST(WFLAGS_LITE)dnl
AC_SUBST(WFLAGS_NOIMPLICITINT)dnl
])