diff options
Diffstat (limited to 'gas/configure.in')
-rw-r--r-- | gas/configure.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gas/configure.in b/gas/configure.in index 8bf3679..580e7d0 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -49,6 +49,22 @@ esac])dnl using_cgen=no 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 |