diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-10 15:48:45 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-10 15:48:45 +0000 |
commit | 2f18a95c4e4bf197a7a1c5e1f901ad0fbeeff289 (patch) | |
tree | c3657998fcefcf6fee1d9092d71d4240727524d4 /configure.ac | |
parent | 7405bbda27a60f2c06af10f2ab49e5b15b043274 (diff) | |
download | ruby-2f18a95c4e4bf197a7a1c5e1f901ad0fbeeff289.tar.gz |
fix r66311
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 3b740e0ff5..845e7e154d 100644 --- a/configure.ac +++ b/configure.ac @@ -730,12 +730,14 @@ test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\"" } -AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ - int main(void) { - return __extension__ ({ int a = 0; a; }); - } - ]])], - [AC_DEFINE(HAVE_STMT_AND_DECL_IN_EXPR, 1)]) +AC_CACHE_CHECK([whether compiler has statement and declarations in expressions], + rb_cv_have_stmt_and_decl_in_expr, + [AC_TRY_COMPILE([],[ __extension__ ({ int a = 0; a; }); ], + [rb_cv_have_stmt_and_decl_in_expr=yes], + [rb_cv_have_stmt_and_decl_in_expr=no])]) +AS_IF([test "$rb_cv_have_stmt_and_decl_in_expr" = yes], [ + AC_DEFINE(HAVE_STMT_AND_DECL_IN_EXPR) +]) : "header and library section" && { AC_ARG_WITH(winnt-ver, |