diff options
author | Nick Clifton <nickc@redhat.com> | 2005-03-16 16:17:14 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-03-16 16:17:14 +0000 |
commit | 000c7abf9f453ba6592bd77b0efbf923632b7aee (patch) | |
tree | 213ecef8066cf15a26f35dfce0dde4f6509d684e /binutils/configure.in | |
parent | 0680efb6097ba5eaa55d0d18d7bacbec0715a6cc (diff) | |
download | binutils-redhat-000c7abf9f453ba6592bd77b0efbf923632b7aee.tar.gz |
Enable -Werror by default
Diffstat (limited to 'binutils/configure.in')
-rw-r--r-- | binutils/configure.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/binutils/configure.in b/binutils/configure.in index 8bb7031cc3..7f615f7533 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -30,6 +30,22 @@ AC_ARG_ENABLE(commonbfdlib, esac])dnl build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" + +AC_ARG_ENABLE(error-on-warning, + [ --enable-error-on-warning treat compile warnings as errors], + [case "${enableval}" in + yes | y) ERROR_ON_WARNING="yes" ;; + no | n) ERROR_ON_WARNING="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;; + esac]) + +# Enable -Werror by default, suppressing it only for --disable-error-on-warning +# or --disable-build-warnings. +if test "${ERROR_ON_WARNING}" != no +then + build_warnings="$build_warnings -Werror" +fi + AC_ARG_ENABLE(build-warnings, [ --enable-build-warnings Enable build-time compiler warnings if gcc is used], [case "${enableval}" in |