summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
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