]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - opcodes/configure.in
Remove ``-W -Wall'' from top-level Makefile/configure.
[thirdparty/binutils-gdb.git] / opcodes / configure.in
index 6ef461f9a4985222b7d781e2516c7c92b33f5845..6895c57908edaf5b06618ad493da15d111b12641 100644 (file)
@@ -43,6 +43,27 @@ AC_ARG_ENABLE(commonbfdlib,
   *)   AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
 esac])dnl
 
+build_warnings="-W -Wall"
+AC_ARG_ENABLE(build-warnings,
+[  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+  yes) ;;
+  no)  build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting warning flags = $build_warnings" 6>&1
+fi])dnl
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+    WARN_CFLAGS="${build_warnings}"
+fi
+AC_SUBST(WARN_CFLAGS)
+
 AM_CONFIG_HEADER(config.h:config.in)
 
 if test -z "$target" ; then