aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-10-31 01:57:04 +0000
committerAndrew Cagney <cagney@redhat.com>2001-10-31 01:57:04 +0000
commit4536bbc6c73c16de738db89812cddb0b63f12714 (patch)
treec6fcaf36d806dd0718f6d0a85e11720e99168a9d /gdb/configure.in
parent6e814ff88112f40fe06e09ef984caaf59b48884f (diff)
downloadgdb-4536bbc6c73c16de738db89812cddb0b63f12714.zip
gdb-4536bbc6c73c16de738db89812cddb0b63f12714.tar.gz
gdb-4536bbc6c73c16de738db89812cddb0b63f12714.tar.bz2
Fix -W... flags check.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index 29518ec..812e6bb 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -746,11 +746,10 @@ then
case $w in
-Werr*) WERROR_CFLAGS=-Werror ;;
*) # Check that GCC accepts it
- if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then
- :
- else
- WARN_CFLAGS="${WARN_CFLAGS} $w"
- fi
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
+ CFLAGS="$saved_CFLAGS"
esac
done
AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS})