summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-23 06:05:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-23 06:05:43 +0000
commitb4080cf9eabc7c106a32b248c66ef9f780c439f5 (patch)
tree1fe29d9196d2690eb4aabc14eee4a95122b0930c /configure.in
parent8044ac7b43ffcc5ac8885db0b7dc41fac6f5bab0 (diff)
* configure.in (RUBY_TRY_CFLAGS): try with werror turned on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in32
1 files changed, 17 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index 4aed3a1357..ee92b9e2d1 100644
--- a/configure.in
+++ b/configure.in
@@ -393,15 +393,31 @@ AC_SUBST(CHDIR)
dnl }
dnl compiler section {
+AC_DEFUN([RUBY_WERROR_FLAG], [dnl
+if test "${ac_c_werror_flag+set}"; then
+ rb_c_werror_flag="$ac_c_werror_flag"
+else
+ unset rb_c_werror_flag
+fi
+ac_c_werror_flag=yes
+$1
+if test "${rb_c_werror_flag+set}"; then
+ ac_c_werror_flag="$rb_c_werror_flag"
+else
+ unset ac_c_werror_flag
+fi])
+
AC_DEFUN(RUBY_TRY_CFLAGS, [
save_CFLAGS="$CFLAGS"
CFLAGS="[$]CFLAGS $1"
AC_MSG_CHECKING([whether ]$1[ is accepted])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ RUBY_WERROR_FLAG([
+ AC_TRY_COMPILE([$4], [$5],
[$2
AC_MSG_RESULT(yes)],
[$3
AC_MSG_RESULT(no)])
+ ])
CFLAGS="$save_CFLAGS"
save_CFLAGS=
])
@@ -676,20 +692,6 @@ EOH
])dnl
])dnl
-AC_DEFUN([RUBY_WERROR_FLAG], [dnl
-if test "${ac_c_werror_flag+set}"; then
- rb_c_werror_flag="$ac_c_werror_flag"
-else
- unset rb_c_werror_flag
-fi
-ac_c_werror_flag=yes
-$1
-if test "${rb_c_werror_flag+set}"; then
- ac_c_werror_flag="$rb_c_werror_flag"
-else
- unset ac_c_werror_flag
-fi])
-
dnl RUBY_FUNC_ATTRIBUTE(attrib, macroname, cachevar, condition)
AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl
m4_ifval([$2], dnl