X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=opcodes%2Fconfigure.in;h=cdf5c51613e425b74f77150f5c6a51de389562b8;hb=1ad12f975f8a2a0ce45569ea3f550ef25705ad37;hp=bbe5aa3ad1e4f6e8eb3ecf91b630380f3afa14e1;hpb=9b265ec209d7dd38bd411cdd3bac4d705a244398;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/configure.in b/opcodes/configure.in index bbe5aa3ad1..cdf5c51613 100644 --- a/opcodes/configure.in +++ b/opcodes/configure.in @@ -45,6 +45,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