summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-04-08 13:28:13 +0900
committerGitHub <noreply@github.com>2020-04-08 13:28:13 +0900
commit9e6e39c3512f7a962c44dc3729c98a0f8be90341 (patch)
tree901a22676d54d78240e450b64a8cd06eb1703910 /configure.ac
parent5ac4bf2cd87e1eb5779ca5ae7f96a1a22e8436d9 (diff)
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
Notes
Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
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)])