diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-09-10 12:22:26 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-09-10 12:25:36 +0900 |
commit | 20e428ec40ee1c83708b3ade6a0007ab2a435f83 (patch) | |
tree | 8b155d47ed40fafbc7dca4bd55739ab2e670193a /configure.ac | |
parent | 8d3db4f26cbbc920c717dfa2784a467014b954a6 (diff) |
fix CentOS 6 compile error
See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-master/log/20190910T003005Z.fail.html.gz
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 94e07e729d..c2197f083b 100644 --- a/configure.ac +++ b/configure.ac @@ -1399,6 +1399,21 @@ AS_IF([test "$rb_cv_func_weak" != x], [ AC_DEFINE(HAVE_FUNC_WEAK) ]) +AC_CACHE_CHECK([for __attribute__((__depreacted__(msg))) in C++], + rb_cv_CentOS6_CXX_workaround, + RUBY_WERROR_FLAG([ + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [], + [__attribute__((__deprecated__("message"))) int conftest(...);])], + [rb_cv_CentOS6_CXX_workaround=yes], + [rb_cv_CentOS6_CXX_workaround=no]) + AC_LANG_POP()])) +AS_IF([test "rb_cv_CentOS6_CXX_workaround" != no],[ + AC_DEFINE([RUBY_CXX_DEPRECATED(msg)], + [__attribute__((__deprecated__(msg)))])]) + if_i386=${universal_binary+[defined __i386__]} RUBY_FUNC_ATTRIBUTE(__stdcall__, FUNC_STDCALL, rb_cv_func_stdcall, ${if_i386}) RUBY_FUNC_ATTRIBUTE(__cdecl__, FUNC_CDECL, rb_cv_func_cdecl, ${if_i386}) |