Remove ``-W -Wall'' from top-level Makefile/configure.
[deliverable/binutils-gdb.git] / binutils / configure.in
index 603ccd3110414d086c8e623cb505857269c02b39..27a14866adcb4117aed82a509ca2266212556732 100644 (file)
@@ -25,6 +25,27 @@ AC_ARG_ENABLE(commonbfdlib,
   *)   AC_MSG_ERROR([bad value ${enableval} for BFD 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
@@ -78,7 +99,7 @@ AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(sbrk utimes)
 
 # Some systems have frexp only in -lm, not in -lc.
-AC_SEARCH_LIBS(frexp, -lm)
+AC_SEARCH_LIBS(frexp, m)
 
 AC_MSG_CHECKING(for time_t in time.h)
 AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
This page took 0.02603 seconds and 4 git commands to generate.