summaryrefslogtreecommitdiff
path: root/tool/m4/ruby_check_printf_prefix.m4
diff options
context:
space:
mode:
Diffstat (limited to 'tool/m4/ruby_check_printf_prefix.m4')
-rw-r--r--tool/m4/ruby_check_printf_prefix.m49
1 files changed, 5 insertions, 4 deletions
diff --git a/tool/m4/ruby_check_printf_prefix.m4 b/tool/m4/ruby_check_printf_prefix.m4
index 0415f9fa92..9007c18c0a 100644
--- a/tool/m4/ruby_check_printf_prefix.m4
+++ b/tool/m4/ruby_check_printf_prefix.m4
@@ -4,7 +4,8 @@ AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
[rb_cv_pri_prefix_]AS_TR_SH($1)=[NONE]
RUBY_WERROR_FLAG(RUBY_APPEND_OPTIONS(CFLAGS, $rb_cv_wsuppress_flags)
for pri in $2; do
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>
+ AC_TRY_COMPILE(
+ [@%:@include <stdio.h>
@%:@include <stddef.h>
@%:@ifdef __GNUC__
@%:@if defined __MINGW_PRINTF_FORMAT
@@ -17,9 +18,9 @@ AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
@%:@else
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) decl
@%:@endif
- PRINTF_ARGS(void test_sprintf(const char*, ...), 1, 2);]],
- [[printf("%]${pri}[d", (]$1[)42);
- test_sprintf("%]${pri}[d", (]$1[)42);]])],
+ PRINTF_ARGS(void test_sprintf(const char*, ...), 1, 2);],
+ [printf("%]${pri}[d", (]$1[)42);
+ test_sprintf("%]${pri}[d", (]$1[)42);],
[rb_cv_pri_prefix_]AS_TR_SH($1)[=[$pri]; break])
done)])
AS_IF([test "[$rb_cv_pri_prefix_]AS_TR_SH($1)" != NONE], [