Skip to content

Commit c323758

Browse files
committed
Update for autoconf 2.70
1 parent 4144386 commit c323758

14 files changed

+143
-144
lines changed

configure.ac

Lines changed: 116 additions & 116 deletions
Large diffs are not rendered by default.

tool/m4/ruby_check_builtin_setjmp.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
88
ac_cv_func___builtin_setjmp=no
99
for cast in "" "(void **)"; do
1010
RUBY_WERROR_FLAG(
11-
[AC_TRY_LINK([@%:@include <setjmp.h>
11+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <setjmp.h>
1212
@%:@include <stdio.h>
1313
jmp_buf jb;
1414
@%:@ifdef NORETURN
1515
NORETURN(void t(void));
1616
@%:@endif
1717
void t(void) {__builtin_longjmp($cast jb, 1);}
18-
int jump(void) {(void)(__builtin_setjmp($cast jb) ? 1 : 0); return 0;}],
19-
[
18+
int jump(void) {(void)(__builtin_setjmp($cast jb) ? 1 : 0); return 0;}]],
19+
[[
2020
void (*volatile f)(void) = t;
2121
if (!jump()) printf("%d\n", f != 0);
22-
],
22+
]])],
2323
[ac_cv_func___builtin_setjmp="yes with cast ($cast)"])
2424
])
2525
test "$ac_cv_func___builtin_setjmp" = no || break

tool/m4/ruby_check_printf_prefix.m4

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
44
[rb_cv_pri_prefix_]AS_TR_SH($1)=[NONE]
55
RUBY_WERROR_FLAG(RUBY_APPEND_OPTIONS(CFLAGS, $rb_cv_wsuppress_flags)
66
for pri in $2; do
7-
AC_TRY_COMPILE(
8-
[@%:@include <stdio.h>
7+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>
98
@%:@include <stddef.h>
109
@%:@ifdef __GNUC__
1110
@%:@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),[
1817
@%:@else
1918
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) decl
2019
@%:@endif
21-
PRINTF_ARGS(void test_sprintf(const char*, ...), 1, 2);],
22-
[printf("%]${pri}[d", (]$1[)42);
23-
test_sprintf("%]${pri}[d", (]$1[)42);],
20+
PRINTF_ARGS(void test_sprintf(const char*, ...), 1, 2);]],
21+
[[printf("%]${pri}[d", (]$1[)42);
22+
test_sprintf("%]${pri}[d", (]$1[)42);]])],
2423
[rb_cv_pri_prefix_]AS_TR_SH($1)[=[$pri]; break])
2524
done)])
2625
AS_IF([test "[$rb_cv_pri_prefix_]AS_TR_SH($1)" != NONE], [

tool/m4/ruby_check_setjmp.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# used for AC_ARG_WITH(setjmp-type)
33
AC_DEFUN([RUBY_CHECK_SETJMP], [
44
AC_CACHE_CHECK([for ]$1[ as a macro or function], ac_cv_func_$1,
5-
[AC_TRY_COMPILE([
5+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
66
@%:@include <setjmp.h>
77
]AC_INCLUDES_DEFAULT([$3])[
88
@%:@define JMPARGS_1 env
99
@%:@define JMPARGS_2 env,1
1010
@%:@define JMPARGS JMPARGS_]m4_ifval($2,2,1)[
11-
],
12-
m4_ifval($2,$2,jmp_buf)[ env; $1(JMPARGS);],
11+
]],
12+
[m4_ifval($2,$2,jmp_buf)[ env; $1(JMPARGS);]])],
1313
ac_cv_func_$1=yes,
1414
ac_cv_func_$1=no)]
1515
)

tool/m4/ruby_check_sysconf.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- Autoconf -*-
22
AC_DEFUN([RUBY_CHECK_SYSCONF], [dnl
33
AC_CACHE_CHECK([whether _SC_$1 is supported], rb_cv_have_sc_[]m4_tolower($1),
4-
[AC_TRY_COMPILE([#include <unistd.h>
5-
],
6-
[_SC_$1 >= 0],
4+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
5+
]],
6+
[[_SC_$1 >= 0]])],
77
rb_cv_have_sc_[]m4_tolower($1)=yes,
88
rb_cv_have_sc_[]m4_tolower($1)=no)
99
])

tool/m4/ruby_cppoutfile.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ AC_DEFUN([RUBY_CPPOUTFILE],
44
[save_CPPFLAGS="$CPPFLAGS"
55
CPPFLAGS='-o conftest-1.i'
66
rb_cv_cppoutfile=no
7-
AC_TRY_CPP([test-for-cppout],
8-
[grep test-for-cppout conftest-1.i > /dev/null && rb_cv_cppoutfile=yes])
7+
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[test-for-cppout]])],
8+
[grep test-for-cppout conftest-1.i > /dev/null && rb_cv_cppoutfile=yes])
99
CPPFLAGS="$save_CPPFLAGS"
1010
rm -f conftest*])
1111
AS_IF([test "$rb_cv_cppoutfile" = yes], [

tool/m4/ruby_decl_attribute.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ for mac in \
2121
"__declspec(attrib_code) x" \
2222
x; do
2323
m4_ifval([$4],mac="$mac"${rbcv_cond+" /* only if $rbcv_cond */"})
24-
AC_TRY_COMPILE(
24+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
2525
m4_ifval([$4],${rbcv_cond+[@%:@if ]$rbcv_cond})
2626
[@%:@define ]attrib[](attrib_params)[ $mac]
2727
m4_ifval([$4],${rbcv_cond+[@%:@else]}
@@ -30,7 +30,7 @@ ${rbcv_cond+[@%:@endif]})
3030
$6
3131
@%:@define mesg ("")
3232
@%:@define san "address"
33-
attrib[](attrib_params)[;], [],
33+
attrib[](attrib_params)[;]], [[]])],
3434
[rbcv="$mac"; break])
3535
done
3636
])])

tool/m4/ruby_dtrace_available.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE],
77
AS_FOR(opt, rb_dtrace_opt, ["-xnolibs" ""], [dnl
88
AS_IF([$DTRACE opt -h -o conftest_provider.h -s conftest_provider.d >/dev/null 2>/dev/null],
99
[], [continue])
10-
AC_TRY_COMPILE([@%:@include "conftest_provider.h"], [CONFTEST_FIRE();],
10+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include "conftest_provider.h"]], [[CONFTEST_FIRE();]])],
1111
[], [continue])
1212
# DTrace is available on the system
1313
rb_cv_dtrace_available=yes${rb_dtrace_opt:+"(opt)"}

tool/m4/ruby_dtrace_postprocess.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ _PROBES
1212
$DTRACE ${DTRACE_OPT} -h -o conftest_provider.h -s conftest_provider.d >/dev/null 2>/dev/null &&
1313
:
1414
}], [
15-
AC_TRY_COMPILE([@%:@include "conftest_provider.h"], [CONFTEST_FIRE();], [
15+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include "conftest_provider.h"]], [[CONFTEST_FIRE();]])],[
1616
AS_IF([{
1717
cp -p conftest.${ac_objext} conftest.${ac_objext}.save &&
1818
$DTRACE ${DTRACE_OPT} -G -s conftest_provider.d conftest.${ac_objext} 2>/dev/null &&

tool/m4/ruby_mingw32.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ AC_DEFUN([RUBY_MINGW32],
33
[AS_CASE(["$host_os"],
44
[cygwin*], [
55
AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
6-
[AC_TRY_CPP([
6+
[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
77
#ifndef __MINGW32__
88
# error
99
#endif
10-
], rb_cv_mingw32=yes,rb_cv_mingw32=no)
10+
]])],[rb_cv_mingw32=yes],[rb_cv_mingw32=no])
1111
rm -f conftest*])
1212
AS_IF([test "$rb_cv_mingw32" = yes], [
1313
target_os="mingw32"

0 commit comments

Comments
 (0)