--enable-Werror flag to cvs. does the obvious. defaults to enabled if

binding from CVS, disabled otherwise.
This commit is contained in:
Bill Currie 2001-07-30 23:35:33 +00:00
parent c3e3f8182d
commit aea1eda7ee

View file

@ -1125,9 +1125,21 @@ if test "x$GCC" != xyes; then
esac esac
fi fi
AC_ARG_ENABLE(Werror,
[ --enable-Werror treat warnings as errors]
)
dnl We want warnings, lots of warnings... dnl We want warnings, lots of warnings...
if test "x$GCC" = xyes; then if test "x$GCC" = "xyes"; then
if test -d $srcdir/CVS; then
tst="!= xno"
else
tst="= xyes"
fi
if test "x$enable_Werror" $tst; then
CFLAGS="$CFLAGS -Wall -Werror" CFLAGS="$CFLAGS -Wall -Werror"
else
CFLAGS="$CFLAGS -Wall"
fi
# CFLAGS="$CFLAGS -Wall -pedantic" # CFLAGS="$CFLAGS -Wall -pedantic"
fi fi