summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-19 10:15:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-19 10:15:20 +0000
commit33fed2d09a6b7b34821ce8e061fb1b296aad7438 (patch)
tree62fef793459541be46323c493c367c354682b866
parent7213568733f673da0d82f95e8a1bccf79ba3f0d3 (diff)
configure.ac: respect extra_warnflags if given
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--configure.ac7
1 files changed, 3 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index a4c845c..23ec9c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -473,11 +473,10 @@ AC_ARG_ENABLE(werror,
[particular_werror_flags=$enableval])
rb_cv_warnflags="$warnflags"
-AS_IF([test "$GCC:${warnflags+set}:no" = yes::no], [
+AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
+[yes::*|yes:*:set:], [# GCC && (!warnflags || extra_warnflags)
AS_IF([test $gcc_major -ge 4], [
- extra_warning=-Werror=extra-tokens
- ], [
- extra_warning=
+ extra_warning="$extra_warning -Werror=extra-tokens"
])
AS_IF([test $gcc_major -ge 5 -a $gcc_major -le 6], [
extra_warning="$extra_warning -Wno-maybe-uninitialized"