diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 9544e45620..bd752d93d3 100644 --- a/configure.ac +++ b/configure.ac @@ -489,7 +489,11 @@ AS_IF([test x"${RPATHFLAG}" = x], [ rpathflag=`echo "$RPATHFLAG" | sed 's/%.*//'` ]) -RUBY_TRY_CFLAGS(-fdeclspec, [RUBY_APPEND_OPTIONS(XCFLAGS, -fdeclspec)]) +RUBY_TRY_CFLAGS(-fdeclspec, [ + RUBY_APPEND_OPTIONS(CC, -fdeclspec) + RUBY_APPEND_OPTIONS(MJIT_CC, -fdeclspec) +]) +RUBY_TRY_CXXFLAGS(-fdeclspec, [RUBY_APPEND_OPTIONS(CXX, -fdeclspec)]) AS_CASE([$RUBY_PATCHLEVEL], [-*], [RUBY_DEVEL=yes], [RUBY_DEVEL=no]) @@ -1348,10 +1352,13 @@ AS_IF([test "$rb_cv_stdarg" = yes], [ AC_DEFINE(HAVE_STDARG_PROTOTYPES) ]) +# __VA_ARGS__ is also tested in AC_PROG_CC_C99 since autoconf 2.60a (around +# 2006). The check below is redundant and should always success. Remain not +# deleted for backward compat. AC_CACHE_CHECK(for variable length macro, rb_cv_va_args_macro, [AC_TRY_COMPILE([ -int foo(int x, ...); -@%:@define FOO(a, ...) foo(a, @%:@@%:@__VA_ARGS__) +int foo(const char*); +@%:@define FOO(...) foo(@%:@__VA_ARGS__) ], [FOO(1);FOO(1,2);FOO(1,2,3);], rb_cv_va_args_macro=yes, rb_cv_va_args_macro=no)]) |