AC_CANONICAL_TARGET
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.15.94)
+AM_INIT_AUTOMAKE(bfd, 2.16.90)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
esac],[want_mmap=false])dnl
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+AC_ARG_ENABLE(werror,
+ [ --enable-werror 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-werror) ;;
+ esac])
+
+# Enable -Werror by default, suppressing it only for --disable-werror
+# 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