mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update for autoconf 2.70 --- configure.ac | 232 +++++++++++++++++------------------ tool/m4/ruby_check_builtin_setjmp.m4 | 8 +- tool/m4/ruby_check_printf_prefix.m4 | 9 +- tool/m4/ruby_check_setjmp.m4 | 6 +- tool/m4/ruby_check_sysconf.m4 | 6 +- tool/m4/ruby_cppoutfile.m4 | 4 +- tool/m4/ruby_decl_attribute.m4 | 4 +- tool/m4/ruby_dtrace_available.m4 | 2 +- tool/m4/ruby_dtrace_postprocess.m4 | 2 +- tool/m4/ruby_mingw32.m4 | 4 +- tool/m4/ruby_stack_grow_direction.m4 | 4 +- tool/m4/ruby_try_cflags.m4 | 2 +- tool/m4/ruby_try_cxxflags.m4 | 2 +- tool/m4/ruby_try_ldflags.m4 | 2 +- 14 files changed, 143 insertions(+), 144 deletions(-) Revert AC_PROG_CC_C99 for -std=gnu99 option to gcc 4.8 --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
45 lines
1.6 KiB
Text
45 lines
1.6 KiB
Text
# -*- Autoconf -*-
|
|
dnl RUBY_DECL_ATTRIBUTE(attrib, macroname, cachevar, condition, type, code)
|
|
AC_DEFUN([RUBY_DECL_ATTRIBUTE], [dnl
|
|
m4_ifval([$2], dnl
|
|
[AS_VAR_PUSHDEF([attrib], m4_bpatsubst([$2], [(.*)], []))], dnl
|
|
[AS_VAR_PUSHDEF([attrib], m4_toupper(m4_format(%.4s, [$5]))[_]AS_TR_CPP($1))] dnl
|
|
)dnl
|
|
m4_ifval([$3], dnl
|
|
[AS_VAR_PUSHDEF([rbcv],[$3])], dnl
|
|
[AS_VAR_PUSHDEF([rbcv],[rb_cv_]m4_format(%.4s, [$5])[_][$1])]dnl
|
|
)dnl
|
|
m4_pushdef([attrib_code],[m4_bpatsubst([$1],["],[\\"])])dnl
|
|
m4_pushdef([attrib_params],[m4_bpatsubst([$2(x)],[^[^()]*(\([^()]*\)).*],[\1])])dnl
|
|
m4_ifval([$4], [rbcv_cond=["$4"]; test "$rbcv_cond" || unset rbcv_cond])
|
|
AC_CACHE_CHECK(for m4_ifval([$2],[m4_bpatsubst([$2], [(.*)], [])],[$1]) [$5] attribute, rbcv, dnl
|
|
[rbcv=x
|
|
RUBY_WERROR_FLAG([
|
|
for mac in \
|
|
"__attribute__ ((attrib_code)) x" \
|
|
"x __attribute__ ((attrib_code))" \
|
|
"__declspec(attrib_code) x" \
|
|
x; do
|
|
m4_ifval([$4],mac="$mac"${rbcv_cond+" /* only if $rbcv_cond */"})
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
|
m4_ifval([$4],${rbcv_cond+[@%:@if ]$rbcv_cond})
|
|
[@%:@define ]attrib[](attrib_params)[ $mac]
|
|
m4_ifval([$4],${rbcv_cond+[@%:@else]}
|
|
${rbcv_cond+[@%:@define ]attrib[](attrib_params)[ x]}
|
|
${rbcv_cond+[@%:@endif]})
|
|
$6
|
|
@%:@define mesg ("")
|
|
@%:@define san "address"
|
|
attrib[](attrib_params)[;]], [[]])],
|
|
[rbcv="$mac"; break])
|
|
done
|
|
])])
|
|
AS_IF([test "$rbcv" != x], [
|
|
RUBY_DEFINE_IF(m4_ifval([$4],[${rbcv_cond}]), attrib[](attrib_params)[], $rbcv)
|
|
])
|
|
m4_ifval([$4], [unset rbcv_cond]) dnl
|
|
m4_popdef([attrib_params])dnl
|
|
m4_popdef([attrib_code])dnl
|
|
AS_VAR_POPDEF([attrib])dnl
|
|
AS_VAR_POPDEF([rbcv])dnl
|
|
])dnl
|