From 2f18a95c4e4bf197a7a1c5e1f901ad0fbeeff289 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 10 Dec 2018 15:48:45 +0000 Subject: [PATCH] fix r66311 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.ac | 14 ++++++++------ 1 file 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,