1fcfd9267Selricdnl Id
2f59d82ffSelricdnl
3f59d82ffSelricdnl set WFLAGS
4f59d82ffSelric
5f59d82ffSelricAC_DEFUN([rk_WFLAGS],[
6f59d82ffSelric
7f59d82ffSelricAC_ARG_ENABLE(developer,
8f59d82ffSelric	AS_HELP_STRING([--enable-developer], [enable developer warnings]))
9f59d82ffSelricif test "X$enable_developer" = Xyes; then
10f59d82ffSelric    dwflags="-Werror"
11f59d82ffSelricfi
12*e0895134SchristosAM_CONDITIONAL(DEVELOPER_MODE, test "X$enable_developer" = Xyes)
13f59d82ffSelric
14f59d82ffSelricWFLAGS_NOUNUSED=""
15f59d82ffSelricif test -z "$WFLAGS" -a "$GCC" = "yes"; then
16f59d82ffSelric  # leave these out for now:
17f59d82ffSelric  #   -Wcast-align doesn't work well on alpha osf/1
18f59d82ffSelric  #   -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast
19f59d82ffSelric  #   -Wmissing-declarations -Wnested-externs
20f59d82ffSelric  #   -Wstrict-overflow=5
21f59d82ffSelric  WFLAGS="ifelse($#, 0,-Wall, $1) $dwflags"
22*e0895134Schristos
23*e0895134Schristos  #
24*e0895134Schristos  # WFLAGS_LITE can be appended to WFLAGS to turn off a host of warnings
25*e0895134Schristos  # that fail for various bits of older code in appl/.  Let's not use it
26*e0895134Schristos  # for the main libraries, though.
27*e0895134Schristos  WFLAGS_LITE="-Wno-extra -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-shadow"
28*e0895134Schristos  # -Wno-unused-result (not supported on gcc-4.2)
29*e0895134Schristos
30f59d82ffSelricfi
31f59d82ffSelricAC_SUBST(WFLAGS)dnl
32*e0895134SchristosAC_SUBST(WFLAGS_LITE)dnl
33f59d82ffSelric])
34