From aea1eda7ee4c118b413c960168e4e7a8ab4ad3e5 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 30 Jul 2001 23:35:33 +0000 Subject: [PATCH] --enable-Werror flag to cvs. does the obvious. defaults to enabled if binding from CVS, disabled otherwise. --- configure.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index c35df6590..d9c49c413 100644 --- a/configure.in +++ b/configure.in @@ -1125,9 +1125,21 @@ if test "x$GCC" != xyes; then esac fi +AC_ARG_ENABLE(Werror, +[ --enable-Werror treat warnings as errors] +) dnl We want warnings, lots of warnings... -if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Wall -Werror" +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" + else + CFLAGS="$CFLAGS -Wall" + fi # CFLAGS="$CFLAGS -Wall -pedantic" fi