diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-10-31 01:57:04 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-10-31 01:57:04 +0000 |
commit | b07a97060815466362541204d50dacffa35a1e6d (patch) | |
tree | d7f68bcbcdfce2d90c0ac28299d3e328cccdd0a9 /gdb/configure.in | |
parent | 238c403c7549c2d04539465bd177481f9bcd6927 (diff) | |
download | gdb-b07a97060815466362541204d50dacffa35a1e6d.tar.gz |
Fix -W... flags check.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r-- | gdb/configure.in | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index 29518ecdc14..812e6bb615c 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}) |