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