diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-12 22:55:09 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-01-18 16:22:17 +0900 |
commit | c32375883a696fcf8e9e99875f1339ee5474a255 (patch) | |
tree | 9302199c9cbe95f549031b502f5fcda11c937f8d /tool/m4/ruby_check_printf_prefix.m4 | |
parent | 414438688fd4a90d02ab7f8e2592356e1a542161 (diff) | |
download | ruby-c32375883a696fcf8e9e99875f1339ee5474a255.tar.gz |
Update for autoconf 2.70
Diffstat (limited to 'tool/m4/ruby_check_printf_prefix.m4')
-rw-r--r-- | tool/m4/ruby_check_printf_prefix.m4 | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tool/m4/ruby_check_printf_prefix.m4 b/tool/m4/ruby_check_printf_prefix.m4 index 9007c18c0a..0415f9fa92 100644 --- a/tool/m4/ruby_check_printf_prefix.m4 +++ b/tool/m4/ruby_check_printf_prefix.m4 @@ -4,8 +4,7 @@ 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_TRY_COMPILE( - [@%:@include <stdio.h> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h> @%:@include <stddef.h> @%:@ifdef __GNUC__ @%:@if defined __MINGW_PRINTF_FORMAT @@ -18,9 +17,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], [ |