dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: dnl dnl -ansi (prevents declaration of functions like strdup, and because dnl it makes warning in system headers). dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x) dnl -Wtraditional (combines too many unrelated messages, only a few useful) dnl -Wredundant-decls (system headers make this too noisy) dnl -pedantic dnl AC_DEFUN([ad_GCC_WARNINGS], [AC_ARG_ENABLE([warnings], [AC_HELP_STRING([--enable-warnings], [enable compiler warnings])]) if test "$enable_warnings" = "yes"; then CF_GCC_WARNINGS CF_GCC_MORE_WARNINGS AC_SUBST([MORE_WARNINGS_CFLAGS]) fi]) AC_DEFUN([CF_GCC_WARNINGS], [if test -n "$GCC"; then AC_CACHE_CHECK([for gcc warning options], ac_cv_prog_gcc_warn_flags, [changequote(,)dnl cat > conftest.$ac_ext < conftest.$ac_ext <