commit 70f477360fb0ecccc0038231e2d4577a51d88dcd Author: KOSAKI Motohiro Date: Mon Feb 11 14:14:41 2013 -0500 * configure.in: added --disable-werror option. [Bug #7830] [ruby-core:52131] diff --git a/ChangeLog b/ChangeLog index 5ea6b4a..c5b56af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 12 04:11:09 2013 KOSAKI Motohiro + + * configure.in: added --disable-werror option. + [Bug #7830] [ruby-core:52131] + Mon Feb 11 23:08:48 2013 Tanaka Akira * configure.in: enable rb_cv_page_size_log test for MirOS BSD. diff --git a/configure.in b/configure.in index 732dd5d..1a40528 100644 --- a/configure.in +++ b/configure.in @@ -615,9 +615,13 @@ AC_DEFUN(RUBY_TRY_LDFLAGS, [ save_LDFLAGS= ]) +AC_ARG_ENABLE(werror, + AS_HELP_STRING([--disable-werror], + [don't make warnings into errors even if a compiler support -Werror feature.]), + [particular_werror_flags=$enableval], [particular_werror_flags=yes]) + 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 \ -Wunused-variable \ @@ -625,11 +629,9 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then -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" = no; then wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'` fi ok=no