From d64f2ddca116c1cc51f804d4ec453ad45cb7a51e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 21 May 2009 19:24:29 +0000 Subject: [PATCH] allow for explicit control over -Werror flag similar to how most GNU toolchain packages work git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1609 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 3 +++ urjtag/configure.ac | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index f6a07947..b785f3df 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -3,6 +3,9 @@ * data/xilinx/PARTS: added xc3s1200e_fg320 and xc2vp30-ffg896 (Florian Fainelli) + * configure.ac: enable -Werror by default only when building out of an scm, + and add an explicit --enable-werror option to control it + 2009-05-19 Arnim Laeuger * data/Makefile.am, data/broadcom/bcm6348/bcm6348, diff --git a/urjtag/configure.ac b/urjtag/configure.ac index 7a948b4f..f20bfdfa 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -280,8 +280,18 @@ AS_IF([test "x$with_inpout32" = xyes], [ ]) -WARNINGCFLAGS="-Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith" +WARNINGCFLAGS="-Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith" +AC_ARG_ENABLE([werror], + [AS_HELP_STRING([--enable-werror], [build with -Werror])], + [], [enable_werror=maybe]) +AS_IF([test "x$enable_werror" = xmaybe -a -d .svn], [ + enable_werror=yes +]) +AS_IF([test "x$enable_werror" = xyes], [ + WARNINGCFLAGS="$WARNINGCFLAGS -Werror" +]) AC_SUBST(WARNINGCFLAGS) + CPPFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include $CPPFLAGS"