Make it easy to make --disable-werror the default for both binutils and gdb
[deliverable/binutils-gdb.git] / bfd / warning.m4
index 28e9f8ad3fa03e1724dc2ffa93ccab29ab8c2754..b1a8c7b5a37183689564a9ae35408fb78074d50e 100644 (file)
@@ -18,6 +18,9 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([AM_BINUTILS_WARNINGS],[
+# Set the 'development' global.
+. $srcdir/../bfd/development.sh
+
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
 
@@ -39,8 +42,8 @@ case "${host}" in
   *) ;;
 esac
 
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+# Enable -Werror by default when using gcc.  Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then
     ERROR_ON_WARNING=yes
 fi
 
This page took 0.028345 seconds and 4 git commands to generate.