diff --git a/ChangeLog b/ChangeLog index be86e2e2a..13c5772c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-17 Roland Illig + + * configure.ac: The GCC warning flags are only used in + maintainer-mode. + 2004-08-17 Pavel S. Shirshov * lib/cedit.menu: Security fix patch. Fix insecure temporary file and diff --git a/configure.ac b/configure.ac index ed5aee2cf..bf3e356f3 100644 --- a/configure.ac +++ b/configure.ac @@ -133,13 +133,6 @@ for h_lang in $ALL_DOC_LINGUAS; do done AC_SUBST(DOC_LINGUAS) -dnl -dnl Enforce coding standards -dnl -if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Wall" -fi - dnl dnl OS specific flags. dnl @@ -550,6 +543,14 @@ if test "$GLIBC21" != yes; then AC_DEFINE(USE_INCLUDED_REGEX, 1, [Use the regex included here]) fi +dnl +dnl Enforce coding standards +dnl +if test "x$GCC" = xyes -a x"$USE_MAINTAINER_MODE" = x"yes"; then +dnl Prepend the flags to keep them user-overridable + CFLAGS="-Wall -W -Wstrict-prototypes -Wno-unused-parameter $CFLAGS" +fi + AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS)