summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-14 15:26:08 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-14 15:26:08 +0000
commita5ed0865c5c7b7a372c90962a36d3718a067c13b (patch)
tree402ef75dcb788279789a8c2e0feb7b977ee5c17f /configure.in
parent19061851b76c8a210e03cd1f346e47563b31dec5 (diff)
merge revision(s) 39214,39221: [Backport #7830]
configure.in: Werror-implicit-function-declaration * configure.in (warnflags): -Werror-implicit-function-declaration haven't been used as-is, but always replaced with -Werror= or -W. * configure.in (warnflags): disable -Werror by default unless development. [ruby-core:52131] [Bug #7830] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@40742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 12 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index 557f6d300a..b734e47d09 100644
--- a/configure.in
+++ b/configure.in
@@ -83,6 +83,7 @@ RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/ver
AC_SUBST(RUBY_PROGRAM_VERSION)
RUBY_RELEASE_DATE=`sed -n 's/^#define RUBY_RELEASE_DATE "\(.*\)"/\1/p' $srcdir/version.h`
AC_SUBST(RUBY_RELEASE_DATE)
+RUBY_PATCHLEVEL=`sed -n 's/^#define RUBY_PATCHLEVEL //p' $srcdir/version.h`
if test "$MAJOR" = "1"; then
AC_DEFINE(CANONICALIZATION_FOR_MATHN)
fi
@@ -453,20 +454,26 @@ AC_DEFUN(RUBY_TRY_LDFLAGS, [
save_LDFLAGS=
])
+AS_CASE([$RUBY_PATCHLEVEL], [-*],
+ [particular_werror_flags=yes], [particular_werror_flags=no])
+AC_ARG_ENABLE(werror,
+ AS_HELP_STRING([--disable-werror],
+ [don't make warnings into errors
+ even if a compiler support -Werror feature
+ [[disabled by default unless development version]]]),
+ [particular_werror_flags=$enableval])
+
rb_cv_warnflags="$warnflags"
if test "$GCC:${warnflags+set}:no" = yes::no; then
- particular_werror_flags=yes
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \
-Wno-missing-field-initializers \
-Werror=pointer-arith \
-Werror=write-strings \
-Werror=declaration-after-statement \
-Werror=shorten-64-to-32 \
- -Werror-implicit-function-declaration \
+ -Werror=implicit-function-declaration \
; do
- if test "$particular_werror_flags" = yes; then
- wflag=`echo x$wflag | sed 's/^x-Werror-/-Werror=/;s/^x//'`
- else
+ if test "$particular_werror_flags" != yes; then
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'`
fi
ok=no