|
|
60f33a |
diff --git a/configure.ac b/configure.ac
|
|
|
60f33a |
index 826a688871..af170efecd 100644
|
|
|
60f33a |
--- a/configure.ac
|
|
|
60f33a |
+++ b/configure.ac
|
|
|
60f33a |
@@ -1,5 +1,5 @@
|
|
|
60f33a |
dnl Process this file with autoconf to produce a configure script.
|
|
|
60f33a |
-AC_INIT
|
|
|
60f33a |
+AC_INIT()
|
|
|
60f33a |
{
|
|
|
60f33a |
AC_CONFIG_AUX_DIR(tool)
|
|
|
60f33a |
AC_CONFIG_MACRO_DIRS(tool/m4)
|
|
|
60f33a |
@@ -150,9 +150,6 @@ AC_ARG_ENABLE(load-relative,
|
|
|
60f33a |
|
|
|
60f33a |
AC_ARG_PROGRAM
|
|
|
60f33a |
|
|
|
60f33a |
-# checks for UNIX variants that set C preprocessor variables
|
|
|
60f33a |
-AC_USE_SYSTEM_EXTENSIONS
|
|
|
60f33a |
-
|
|
|
60f33a |
dnl Checks for programs.
|
|
|
60f33a |
|
|
|
60f33a |
cflagspat=
|
|
|
60f33a |
@@ -180,14 +177,12 @@ AS_CASE(["$host_os:$build_os"],
|
|
|
60f33a |
# clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported)
|
|
|
60f33a |
# Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn)
|
|
|
60f33a |
# Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
|
|
|
60f33a |
- AC_PREPROC_IFELSE(
|
|
|
60f33a |
- [AC_LANG_PROGRAM([
|
|
|
60f33a |
- @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
|
|
|
60f33a |
- @%:@error premature clang
|
|
|
60f33a |
- @%:@endif
|
|
|
60f33a |
- ])],
|
|
|
60f33a |
- [],
|
|
|
60f33a |
- [AC_MSG_ERROR([clang version 3.0 or later is required])
|
|
|
60f33a |
+ AS_IF([! $CC -E -xc - <<SRC >/dev/null], [
|
|
|
60f33a |
+ @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
|
|
|
60f33a |
+ @%:@error premature clang
|
|
|
60f33a |
+ @%:@endif
|
|
|
60f33a |
+SRC
|
|
|
60f33a |
+ AC_MSG_ERROR([clang version 3.0 or later is required])
|
|
|
60f33a |
])],
|
|
|
60f33a |
[openbsd*:openbsd*], [
|
|
|
60f33a |
AC_CHECK_TOOLS(CC, [cc])
|
|
|
60f33a |
@@ -196,9 +191,7 @@ AS_IF([test x"${build}" != x"${host}"], [
|
|
|
60f33a |
AC_CHECK_TOOL(CC, gcc)
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
-dnl Seems necessarily in order to add -std=gnu99 option for gcc 4.9.
|
|
|
60f33a |
-m4_version_prereq([2.70], [], [AC_PROG_CC_C99])
|
|
|
60f33a |
-
|
|
|
60f33a |
+AC_PROG_CC_C99
|
|
|
60f33a |
AS_CASE([$CC],
|
|
|
60f33a |
[gcc-*], [
|
|
|
60f33a |
gcc_prefix=gcc- gcc_suffix=`echo "$CC" | sed 's/^gcc//'`
|
|
|
60f33a |
@@ -230,12 +223,12 @@ test -z "$CXX" || ac_cv_prog_CXX="$CXX"
|
|
|
60f33a |
AS_CASE(["$target_os"],
|
|
|
60f33a |
[darwin*], [
|
|
|
60f33a |
AC_MSG_CHECKING(if minimum required OS X version is supported)
|
|
|
60f33a |
- AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <AvailabilityMacros.h>
|
|
|
60f33a |
+ AC_TRY_CPP([@%:@include <AvailabilityMacros.h>
|
|
|
60f33a |
@%:@if MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5
|
|
|
60f33a |
@%:@error pre OS X 10.5
|
|
|
60f33a |
[!<===== pre OS X 10.5 =====>]
|
|
|
60f33a |
@%:@endif
|
|
|
60f33a |
- ]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
[macosx_min_required=yes],
|
|
|
60f33a |
[AC_MSG_RESULT(no)
|
|
|
60f33a |
AC_MSG_ERROR([Unsupported OS X version is required])])
|
|
|
60f33a |
@@ -366,8 +359,8 @@ AS_CASE(["$target_os"],
|
|
|
60f33a |
[mingw*], [
|
|
|
60f33a |
test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt
|
|
|
60f33a |
AC_CACHE_CHECK(for mingw32 runtime DLL, rb_cv_msvcrt, [
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>]],
|
|
|
60f33a |
- [[FILE* volatile f = stdin; return 0;]])],
|
|
|
60f33a |
+ AC_TRY_LINK([@%:@include <stdio.h>],
|
|
|
60f33a |
+ [FILE* volatile f = stdin; return 0;],
|
|
|
60f33a |
[rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext |
|
|
|
60f33a |
tr A-Z a-z |
|
|
|
60f33a |
sed -n '/^[[ ]]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'`],
|
|
|
60f33a |
@@ -410,6 +403,9 @@ AC_CHECK_PROGS(DOXYGEN, doxygen)
|
|
|
60f33a |
AC_CHECK_PROG(PKG_CONFIG, pkg-config, [pkg-config], [], [],
|
|
|
60f33a |
[`"$as_dir/$ac_word$ac_exec_ext" --print-errors --version > /dev/null 2>&1 || echo "$as_dir/$ac_word$ac_exec_ext"`])
|
|
|
60f33a |
|
|
|
60f33a |
+# checks for UNIX variants that set C preprocessor variables
|
|
|
60f33a |
+AC_USE_SYSTEM_EXTENSIONS
|
|
|
60f33a |
+
|
|
|
60f33a |
AC_SUBST(RM, ['rm -f'])
|
|
|
60f33a |
AC_SUBST(CP, ['cp'])
|
|
|
60f33a |
RMDIRS='$(top_srcdir)/tool/rmdirs'
|
|
|
60f33a |
@@ -445,7 +441,7 @@ AC_SUBST(CHDIR)
|
|
|
60f33a |
: "compiler section" && {
|
|
|
60f33a |
RUBY_WERROR_FLAG([
|
|
|
60f33a |
AC_MSG_CHECKING([whether CFLAGS is valid])
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
|
|
60f33a |
+ AC_TRY_COMPILE([], [],
|
|
|
60f33a |
[AC_MSG_RESULT(yes)],
|
|
|
60f33a |
[
|
|
|
60f33a |
AC_MSG_RESULT(no)
|
|
|
60f33a |
@@ -461,7 +457,7 @@ RUBY_WERROR_FLAG([
|
|
|
60f33a |
echo '<plist><dict><key>CFBundleIdentifier</key><string></string></dict></plist>' > Info.plist &&
|
|
|
60f33a |
:
|
|
|
60f33a |
} || AC_MSG_ERROR([failed to make temporary directory])
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
|
|
60f33a |
+ AC_TRY_LINK([], [],
|
|
|
60f33a |
[AC_MSG_RESULT(yes)],
|
|
|
60f33a |
[
|
|
|
60f33a |
cd .. && rm -fr tmp.$$.try_link
|
|
|
60f33a |
@@ -643,13 +639,13 @@ AS_IF([test "$GCC" = yes], [
|
|
|
60f33a |
], [
|
|
|
60f33a |
CFLAGS="$CFLAGS -Werror -Wuninitialized"
|
|
|
60f33a |
])
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@include <math.h>
|
|
|
60f33a |
int foo(double x)
|
|
|
60f33a |
{
|
|
|
60f33a |
int exp;
|
|
|
60f33a |
frexp(x, &exp);
|
|
|
60f33a |
return exp;
|
|
|
60f33a |
- }]], [[if (foo(0.0)) return 1;]])],
|
|
|
60f33a |
+ }], [if (foo(0.0)) return 1;],
|
|
|
60f33a |
[rb_cv_mingw64_broken_frexp_modf=no],
|
|
|
60f33a |
[rb_cv_mingw64_broken_frexp_modf=yes])
|
|
|
60f33a |
CFLAGS="$save_CFLAGS"
|
|
|
60f33a |
@@ -739,13 +735,13 @@ AS_IF([test "$GCC" = yes], [
|
|
|
60f33a |
|
|
|
60f33a |
AS_CASE(["$target_cpu"], [[i[3-6]86*]], [
|
|
|
60f33a |
AC_CACHE_CHECK([for __sync_val_compare_and_swap], [rb_cv_gcc_compiler_cas], [
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]],
|
|
|
60f33a |
- [[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])],
|
|
|
60f33a |
+ AC_TRY_LINK([unsigned long atomic_var;],
|
|
|
60f33a |
+ [__sync_val_compare_and_swap(&atomic_var, 0, 1);],
|
|
|
60f33a |
[rb_cv_gcc_compiler_cas=yes],
|
|
|
60f33a |
[
|
|
|
60f33a |
save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -march=i486"
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]],
|
|
|
60f33a |
- [[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])],
|
|
|
60f33a |
+ AC_TRY_LINK([unsigned long atomic_var;],
|
|
|
60f33a |
+ [__sync_val_compare_and_swap(&atomic_var, 0, 1);],
|
|
|
60f33a |
[rb_cv_gcc_compiler_cas=i486],
|
|
|
60f33a |
[rb_cv_gcc_compiler_cas=no])
|
|
|
60f33a |
CFLAGS="$save_CFLAGS"
|
|
|
60f33a |
@@ -772,7 +768,7 @@ test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cx
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK([whether compiler has statement and declarations in expressions],
|
|
|
60f33a |
rb_cv_have_stmt_and_decl_in_expr,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ __extension__ ({ int a = 0; a; }); ]])],
|
|
|
60f33a |
+ [AC_TRY_COMPILE([],[ __extension__ ({ int a = 0; a; }); ],
|
|
|
60f33a |
[rb_cv_have_stmt_and_decl_in_expr=yes],
|
|
|
60f33a |
[rb_cv_have_stmt_and_decl_in_expr=no])])
|
|
|
60f33a |
AS_IF([test "$rb_cv_have_stmt_and_decl_in_expr" = yes], [
|
|
|
60f33a |
@@ -793,12 +789,12 @@ AS_CASE(["$target_os"],
|
|
|
60f33a |
[freebsd*], [
|
|
|
60f33a |
AC_CACHE_CHECK([whether pthread should be enabled by default],
|
|
|
60f33a |
rb_cv_enable_pthread_default,
|
|
|
60f33a |
- [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_CPP([
|
|
|
60f33a |
#include <osreldate.h>
|
|
|
60f33a |
#if __FreeBSD_version < 502102
|
|
|
60f33a |
#error pthread should be disabled on this platform
|
|
|
60f33a |
#endif
|
|
|
60f33a |
- ]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
rb_cv_enable_pthread_default=yes,
|
|
|
60f33a |
rb_cv_enable_pthread_default=no)])
|
|
|
60f33a |
enable_pthread=$rb_cv_enable_pthread_default
|
|
|
60f33a |
@@ -826,8 +822,8 @@ AS_CASE(["$target_os"],
|
|
|
60f33a |
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT)
|
|
|
60f33a |
AC_CACHE_CHECK([whether syscall(2) is deprecated], rb_cv_syscall_deprecated,
|
|
|
60f33a |
[RUBY_WERROR_FLAG([
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <unistd.h>]],
|
|
|
60f33a |
- [[if (syscall(0)) return 1;]])],
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@include <unistd.h>],
|
|
|
60f33a |
+ [if (syscall(0)) return 1;],
|
|
|
60f33a |
[rb_cv_syscall_deprecated=no],
|
|
|
60f33a |
[rb_cv_syscall_deprecated=yes])])])
|
|
|
60f33a |
AS_IF([test $rb_cv_syscall_deprecated = yes], [
|
|
|
60f33a |
@@ -854,7 +850,7 @@ AS_CASE(["$target_os"],
|
|
|
60f33a |
])
|
|
|
60f33a |
with_setjmp_type=sigsetjmp # to hijack SIGCHLD handler
|
|
|
60f33a |
AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
|
|
|
60f33a |
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_RUN([
|
|
|
60f33a |
#include <stdio.h>
|
|
|
60f33a |
#include <unistd.h>
|
|
|
60f33a |
#include <string.h>
|
|
|
60f33a |
@@ -891,7 +887,7 @@ main()
|
|
|
60f33a |
}
|
|
|
60f33a |
return 0;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
rb_cv_broken_crypt=no,
|
|
|
60f33a |
rb_cv_broken_crypt=yes,
|
|
|
60f33a |
rb_cv_broken_crypt=yes)])
|
|
|
60f33a |
@@ -920,11 +916,11 @@ main()
|
|
|
60f33a |
[solaris*], [ LIBS="-lm $LIBS"
|
|
|
60f33a |
ac_cv_func_vfork=no
|
|
|
60f33a |
AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given)
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
|
|
|
60f33a |
+ AC_TRY_COMPILE([#include <unistd.h>
|
|
|
60f33a |
#ifndef _XOPEN_SOURCE
|
|
|
60f33a |
#error _XOPEN_SOURCE is not defined
|
|
|
60f33a |
#endif
|
|
|
60f33a |
- ]], [[]])],
|
|
|
60f33a |
+ ], [],
|
|
|
60f33a |
[given_xopen_source=yes], [given_xopen_source=no])
|
|
|
60f33a |
AC_MSG_RESULT($given_xopen_source)
|
|
|
60f33a |
AS_IF([test $given_xopen_source = no], [
|
|
|
60f33a |
@@ -934,13 +930,13 @@ main()
|
|
|
60f33a |
AS_IF([test x"$define_xopen_source" != x], [
|
|
|
60f33a |
break
|
|
|
60f33a |
])
|
|
|
60f33a |
- RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ RUBY_WERROR_FLAG([AC_TRY_COMPILE([
|
|
|
60f33a |
#define _XOPEN_SOURCE ${tmp_xpg}00
|
|
|
60f33a |
#include <unistd.h>
|
|
|
60f33a |
#ifndef _XPG${tmp_xpg}
|
|
|
60f33a |
#error _XPG${tmp_xpg} should be defined by _XOPEN_SOURCE=${tmp_xpg}00
|
|
|
60f33a |
#endif
|
|
|
60f33a |
- ]], [[]])],
|
|
|
60f33a |
+ ], [],
|
|
|
60f33a |
[define_xopen_source=${tmp_xpg}00], [])
|
|
|
60f33a |
])
|
|
|
60f33a |
done
|
|
|
60f33a |
@@ -1234,8 +1230,8 @@ AC_CACHE_CHECK(packed struct attribute, rb_cv_packed_struct,
|
|
|
60f33a |
"__pragma(pack(push, 1)) x __pragma(pack(pop))" \
|
|
|
60f33a |
"x __attribute__((packed))" \
|
|
|
60f33a |
; do
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define PACKED_STRUCT(x) $mac
|
|
|
60f33a |
- PACKED_STRUCT(struct { int a; });]], [[]])],
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@define PACKED_STRUCT(x) $mac
|
|
|
60f33a |
+ PACKED_STRUCT(struct { int a; });], [],
|
|
|
60f33a |
[rb_cv_packed_struct=$mac; break])
|
|
|
60f33a |
done])
|
|
|
60f33a |
AS_IF([test "$rb_cv_packed_struct" != no], [
|
|
|
60f33a |
@@ -1275,7 +1271,7 @@ RUBY_REPLACE_TYPE(clockid_t, [], CLOCKID, [@%:@ifdef HAVE_TIME_H
|
|
|
60f33a |
@%:@endif])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return foo(10);]])],
|
|
|
60f33a |
+ [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
|
|
|
60f33a |
rb_cv_have_prototypes=yes,
|
|
|
60f33a |
rb_cv_have_prototypes=no)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_have_prototypes" = yes], [
|
|
|
60f33a |
@@ -1283,8 +1279,8 @@ AS_IF([test "$rb_cv_have_prototypes" = yes], [
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(token paste string, rb_cv_tokenpaste,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define paste(a,b) a@%:@@%:@b]],
|
|
|
60f33a |
- [[int xy = 1; return paste(x,y);]])],
|
|
|
60f33a |
+ [AC_TRY_COMPILE([@%:@define paste(a,b) a@%:@@%:@b],
|
|
|
60f33a |
+ [int xy = 1; return paste(x,y);],
|
|
|
60f33a |
rb_cv_tokenpaste=ansi,
|
|
|
60f33a |
rb_cv_tokenpaste=knr)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_tokenpaste" = ansi], [
|
|
|
60f33a |
@@ -1329,7 +1325,7 @@ AS_IF([test "$rb_cv_string_literal_concatenation" = no], [
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for variable length prototypes and stdarg.h, rb_cv_stdarg,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
#include <stdarg.h>
|
|
|
60f33a |
int foo(int x, ...) {
|
|
|
60f33a |
va_list va;
|
|
|
60f33a |
@@ -1339,7 +1335,7 @@ int foo(int x, ...) {
|
|
|
60f33a |
va_arg(va, double);
|
|
|
60f33a |
return 0;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]], [[return foo(10, "", 3.14);]])],
|
|
|
60f33a |
+], [return foo(10, "", 3.14);],
|
|
|
60f33a |
rb_cv_stdarg=yes,
|
|
|
60f33a |
rb_cv_stdarg=no)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_stdarg" = yes], [
|
|
|
60f33a |
@@ -1347,10 +1343,10 @@ AS_IF([test "$rb_cv_stdarg" = yes], [
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for variable length macro, rb_cv_va_args_macro,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
int foo(int x, ...);
|
|
|
60f33a |
@%:@define FOO(a, ...) foo(a, @%:@@%:@__VA_ARGS__)
|
|
|
60f33a |
-]], [[FOO(1);FOO(1,2);FOO(1,2,3);]])],
|
|
|
60f33a |
+], [FOO(1);FOO(1,2);FOO(1,2,3);],
|
|
|
60f33a |
rb_cv_va_args_macro=yes,
|
|
|
60f33a |
rb_cv_va_args_macro=no)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_va_args_macro" = yes], [
|
|
|
60f33a |
@@ -1371,9 +1367,9 @@ do
|
|
|
60f33a |
# C11 _Alignas and GCC __attribute__((__aligned__)) behave
|
|
|
60f33a |
# slightly differently. What we want is GCC's. Check that
|
|
|
60f33a |
# here by something C11 does not allow (`struct ALIGNAS ...`)
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
|
|
60f33a |
+ AC_TRY_COMPILE(
|
|
|
60f33a |
[@%:@define ALIGNAS(x) $attr
|
|
|
60f33a |
- struct ALIGNAS(128) conftest_tag { int foo; } foo; ]], [[]])],
|
|
|
60f33a |
+ struct ALIGNAS(128) conftest_tag { int foo; } foo; ], [],
|
|
|
60f33a |
[rb_cv_have_alignas="$attr"; break], [])
|
|
|
60f33a |
done
|
|
|
60f33a |
])])
|
|
|
60f33a |
@@ -1391,10 +1387,10 @@ for expr in \
|
|
|
60f33a |
"__alignof__" \
|
|
|
60f33a |
;
|
|
|
60f33a |
do
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@ifdef HAVE_STDALIGN_H
|
|
|
60f33a |
@%:@include <stdalign.h>
|
|
|
60f33a |
- @%:@endif]],[[return (int)$expr(int);]])],
|
|
|
60f33a |
+ @%:@endif],[return (int)$expr(int);],
|
|
|
60f33a |
[rb_cv_have_alignof="$expr"; break], [])
|
|
|
60f33a |
done
|
|
|
60f33a |
])])
|
|
|
60f33a |
@@ -1448,8 +1444,8 @@ AS_IF([test "$GCC" = yes], [
|
|
|
60f33a |
AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias],
|
|
|
60f33a |
[rb_cv_gcc_function_alias=no
|
|
|
60f33a |
for a in alias weak,alias; do
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[void foo(void) {}
|
|
|
60f33a |
- void bar(void) __attribute__(($a("foo")));]], [[bar()]])],
|
|
|
60f33a |
+ AC_TRY_LINK([void foo(void) {}
|
|
|
60f33a |
+ void bar(void) __attribute__(($a("foo")));], [bar()],
|
|
|
60f33a |
[rb_cv_gcc_function_alias=$a; break])
|
|
|
60f33a |
done])
|
|
|
60f33a |
AS_IF([test "$rb_cv_gcc_function_alias" != no], [
|
|
|
60f33a |
@@ -1461,14 +1457,14 @@ AS_IF([test "$GCC" = yes], [
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
|
|
|
60f33a |
- [[
|
|
|
60f33a |
+ AC_TRY_LINK([unsigned int atomic_var;],
|
|
|
60f33a |
+ [
|
|
|
60f33a |
__atomic_exchange_n(&atomic_var, 0, __ATOMIC_SEQ_CST);
|
|
|
60f33a |
__atomic_exchange_n(&atomic_var, 1, __ATOMIC_SEQ_CST);
|
|
|
60f33a |
__atomic_fetch_add(&atomic_var, 1, __ATOMIC_SEQ_CST);
|
|
|
60f33a |
__atomic_fetch_sub(&atomic_var, 1, __ATOMIC_SEQ_CST);
|
|
|
60f33a |
__atomic_or_fetch(&atomic_var, 1, __ATOMIC_SEQ_CST);
|
|
|
60f33a |
- ]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
[rb_cv_gcc_atomic_builtins=yes],
|
|
|
60f33a |
[rb_cv_gcc_atomic_builtins=no])])
|
|
|
60f33a |
AS_IF([test "$rb_cv_gcc_atomic_builtins" = yes], [
|
|
|
60f33a |
@@ -1476,15 +1472,15 @@ AS_IF([test "$GCC" = yes], [
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK([for __sync builtins], [rb_cv_gcc_sync_builtins], [
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
|
|
|
60f33a |
- [[
|
|
|
60f33a |
+ AC_TRY_LINK([unsigned int atomic_var;],
|
|
|
60f33a |
+ [
|
|
|
60f33a |
__sync_lock_test_and_set(&atomic_var, 0);
|
|
|
60f33a |
__sync_lock_test_and_set(&atomic_var, 1);
|
|
|
60f33a |
__sync_fetch_and_add(&atomic_var, 1);
|
|
|
60f33a |
__sync_fetch_and_sub(&atomic_var, 1);
|
|
|
60f33a |
__sync_or_and_fetch(&atomic_var, 1);
|
|
|
60f33a |
__sync_val_compare_and_swap(&atomic_var, 0, 1);
|
|
|
60f33a |
- ]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
[rb_cv_gcc_sync_builtins=yes],
|
|
|
60f33a |
[rb_cv_gcc_sync_builtins=no])])
|
|
|
60f33a |
AS_IF([test "$rb_cv_gcc_sync_builtins" = yes], [
|
|
|
60f33a |
@@ -1493,8 +1489,8 @@ AS_IF([test "$GCC" = yes], [
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
|
|
|
60f33a |
[RUBY_WERROR_FLAG(
|
|
|
60f33a |
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[volatile int zero;]],
|
|
|
60f33a |
- [[if (zero) __builtin_unreachable();]])],
|
|
|
60f33a |
+ [AC_TRY_LINK([volatile int zero;],
|
|
|
60f33a |
+ [if (zero) __builtin_unreachable();],
|
|
|
60f33a |
[rb_cv_func___builtin_unreachable=yes],
|
|
|
60f33a |
[rb_cv_func___builtin_unreachable=no])
|
|
|
60f33a |
])
|
|
|
60f33a |
@@ -1508,8 +1504,8 @@ AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
|
|
|
60f33a |
rb_cv_func_exported=no
|
|
|
60f33a |
RUBY_WERROR_FLAG([
|
|
|
60f33a |
for mac in '__attribute__ ((__visibility__("default")))' '__declspec(dllexport)'; do
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define RUBY_FUNC_EXPORTED $mac extern
|
|
|
60f33a |
- RUBY_FUNC_EXPORTED void conftest_attribute_check(void);]], [[]])],
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@define RUBY_FUNC_EXPORTED $mac extern
|
|
|
60f33a |
+ RUBY_FUNC_EXPORTED void conftest_attribute_check(void);], [],
|
|
|
60f33a |
[rb_cv_func_exported="$mac"; break])
|
|
|
60f33a |
done
|
|
|
60f33a |
])])
|
|
|
60f33a |
@@ -1532,18 +1528,15 @@ AC_SUBST(MATHN, $mathn)
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for function name string predefined identifier,
|
|
|
60f33a |
rb_cv_function_name_string,
|
|
|
60f33a |
- [AS_CASE(["$target_os"],[openbsd*],[
|
|
|
60f33a |
- rb_cv_function_name_string=__func__
|
|
|
60f33a |
- ],[
|
|
|
60f33a |
- rb_cv_function_name_string=no
|
|
|
60f33a |
- RUBY_WERROR_FLAG([
|
|
|
60f33a |
- for func in __func__ __FUNCTION__; do
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>]],
|
|
|
60f33a |
- [[puts($func);]])],
|
|
|
60f33a |
- [rb_cv_function_name_string=$func
|
|
|
60f33a |
- break])
|
|
|
60f33a |
- done
|
|
|
60f33a |
- ])])]
|
|
|
60f33a |
+ [rb_cv_function_name_string=no
|
|
|
60f33a |
+ RUBY_WERROR_FLAG([
|
|
|
60f33a |
+ for func in __func__ __FUNCTION__; do
|
|
|
60f33a |
+ AC_TRY_LINK([@%:@include <stdio.h>],
|
|
|
60f33a |
+ [puts($func);],
|
|
|
60f33a |
+ [rb_cv_function_name_string=$func
|
|
|
60f33a |
+ break])
|
|
|
60f33a |
+ done
|
|
|
60f33a |
+ ])]
|
|
|
60f33a |
)
|
|
|
60f33a |
AS_IF([test "$rb_cv_function_name_string" != no], [
|
|
|
60f33a |
AC_DEFINE_UNQUOTED(RUBY_FUNCTION_NAME_STRING, [$rb_cv_function_name_string])
|
|
|
60f33a |
@@ -1605,9 +1598,9 @@ RUBY_CHECK_SIZEOF(size_t, [int long void*], [], [@%:@include <sys/types.h>])
|
|
|
60f33a |
RUBY_CHECK_SIZEOF(ptrdiff_t, size_t, [], [@%:@include <stddef.h>])
|
|
|
60f33a |
RUBY_CHECK_PRINTF_PREFIX(size_t, z)
|
|
|
60f33a |
RUBY_CHECK_PRINTF_PREFIX(ptrdiff_t, t)
|
|
|
60f33a |
-AC_CHECK_MEMBERS([struct stat.st_blksize])
|
|
|
60f33a |
-AC_CHECK_MEMBERS([struct stat.st_blocks])
|
|
|
60f33a |
-AC_CHECK_MEMBERS([struct stat.st_rdev])
|
|
|
60f33a |
+AC_STRUCT_ST_BLKSIZE
|
|
|
60f33a |
+AC_STRUCT_ST_BLOCKS
|
|
|
60f33a |
+AC_STRUCT_ST_RDEV
|
|
|
60f33a |
RUBY_CHECK_SIZEOF([struct stat.st_size], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
|
|
|
60f33a |
AS_IF([test "$ac_cv_member_struct_stat_st_blocks" = yes], [
|
|
|
60f33a |
RUBY_CHECK_SIZEOF([struct stat.st_blocks], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
|
|
|
60f33a |
@@ -1696,9 +1689,9 @@ AS_IF([test "x$rb_cv_type_int64_t" != xno], [
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for stack end address, rb_cv_stack_end_address,
|
|
|
60f33a |
[rb_cv_stack_end_address=no
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
|
60f33a |
- [[extern void *__libc_stack_end;]],
|
|
|
60f33a |
- [[if (!__libc_stack_end) return 1;]])],
|
|
|
60f33a |
+ AC_TRY_LINK(
|
|
|
60f33a |
+ [extern void *__libc_stack_end;],
|
|
|
60f33a |
+ [if (!__libc_stack_end) return 1;],
|
|
|
60f33a |
[rb_cv_stack_end_address="__libc_stack_end"])
|
|
|
60f33a |
])
|
|
|
60f33a |
AS_IF([test $rb_cv_stack_end_address != no], [
|
|
|
60f33a |
@@ -1707,7 +1700,7 @@ AS_IF([test $rb_cv_stack_end_address != no], [
|
|
|
60f33a |
|
|
|
60f33a |
dnl Checks for library functions.
|
|
|
60f33a |
AC_TYPE_GETGROUPS
|
|
|
60f33a |
-AC_DEFINE(RETSIGTYPE, void)
|
|
|
60f33a |
+AC_TYPE_SIGNAL
|
|
|
60f33a |
AS_CASE(["${target_cpu}-${target_os}:${target_archs}"],
|
|
|
60f33a |
[powerpc-darwin*], [
|
|
|
60f33a |
AC_LIBSOURCES(alloca.c)
|
|
|
60f33a |
@@ -1727,14 +1720,14 @@ AS_CASE(["${target_cpu}-${target_os}:${target_archs}"],
|
|
|
60f33a |
AS_IF([test "x$ALLOCA" = "x"], [
|
|
|
60f33a |
AC_CACHE_CHECK([for dynamic size alloca], rb_cv_dynamic_alloca, [
|
|
|
60f33a |
for chk in ok __chkstk; do
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ AC_TRY_LINK([
|
|
|
60f33a |
@%:@ifdef HAVE_ALLOCA_H
|
|
|
60f33a |
@%:@include <alloca.h>
|
|
|
60f33a |
@%:@endif
|
|
|
60f33a |
void $chk() {}
|
|
|
60f33a |
int dynamic_alloca_test;
|
|
|
60f33a |
- int dynamic_alloca_result;]],
|
|
|
60f33a |
- [[dynamic_alloca_result = alloca(dynamic_alloca_test) != 0;]])],
|
|
|
60f33a |
+ int dynamic_alloca_result;],
|
|
|
60f33a |
+ [dynamic_alloca_result = alloca(dynamic_alloca_test) != 0;],
|
|
|
60f33a |
[rb_cv_dynamic_alloca=$chk; break])
|
|
|
60f33a |
done])
|
|
|
60f33a |
AS_IF([test "x$rb_cv_dynamic_alloca" = "x__chkstk"], [
|
|
|
60f33a |
@@ -1786,9 +1779,9 @@ AC_CHECK_HEADERS(sys/pstat.h)
|
|
|
60f33a |
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for signbit, rb_cv_have_signbit,
|
|
|
60f33a |
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_LINK([
|
|
|
60f33a |
#include <math.h>
|
|
|
60f33a |
-]], [[int v = signbit(-0.0);]])],
|
|
|
60f33a |
+], [int v = signbit(-0.0);],
|
|
|
60f33a |
rb_cv_have_signbit=yes,
|
|
|
60f33a |
rb_cv_have_signbit=no)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_have_signbit" = yes], [
|
|
|
60f33a |
@@ -1944,7 +1937,7 @@ AS_CASE(["$ac_cv_func_memset_s:$ac_cv_func_qsort_s"], [*yes*],
|
|
|
60f33a |
|
|
|
60f33a |
AS_IF([test "$ac_cv_func_getcwd" = yes], [
|
|
|
60f33a |
AC_CACHE_CHECK(if getcwd allocates buffer if NULL is given, [rb_cv_getcwd_malloc],
|
|
|
60f33a |
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_RUN([
|
|
|
60f33a |
@%:@include <stddef.h>
|
|
|
60f33a |
@%:@include <stdio.h>
|
|
|
60f33a |
@%:@ifdef HAVE_UNISTD_H
|
|
|
60f33a |
@@ -1963,7 +1956,7 @@ main(int argc, char **argv)
|
|
|
60f33a |
if (!getcwd(NULL, 0)) return EXIT_FAILURE;
|
|
|
60f33a |
return EXIT_SUCCESS;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
rb_cv_getcwd_malloc=yes,
|
|
|
60f33a |
rb_cv_getcwd_malloc=no,
|
|
|
60f33a |
AS_CASE($target_os,
|
|
|
60f33a |
@@ -2011,21 +2004,21 @@ RUBY_CHECK_BUILTIN_FUNC(__builtin_trap, [__builtin_trap()])
|
|
|
60f33a |
|
|
|
60f33a |
AS_IF([test "$ac_cv_func_qsort_r" != no], [
|
|
|
60f33a |
AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@include <stdlib.h>
|
|
|
60f33a |
void (qsort_r)(void *base, size_t nmemb, size_t size,
|
|
|
60f33a |
int (*compar)(const void *, const void *, void *),
|
|
|
60f33a |
void *arg);
|
|
|
60f33a |
-]], [[ ]])],
|
|
|
60f33a |
+],[ ],
|
|
|
60f33a |
[rb_cv_gnu_qsort_r=yes],
|
|
|
60f33a |
[rb_cv_gnu_qsort_r=no])
|
|
|
60f33a |
])
|
|
|
60f33a |
AC_CACHE_CHECK(whether qsort_r is BSD version, rb_cv_bsd_qsort_r,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@include <stdlib.h>
|
|
|
60f33a |
void (qsort_r)(void *base, size_t nmemb, size_t size,
|
|
|
60f33a |
void *arg, int (*compar)(void *, const void *, const void *));
|
|
|
60f33a |
-]], [[ ]])],
|
|
|
60f33a |
+],[ ],
|
|
|
60f33a |
[rb_cv_bsd_qsort_r=yes],
|
|
|
60f33a |
[rb_cv_bsd_qsort_r=no])
|
|
|
60f33a |
])
|
|
|
60f33a |
@@ -2040,7 +2033,7 @@ void (qsort_r)(void *base, size_t nmemb, size_t size,
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(whether atan2 handles Inf as C99, rb_cv_atan2_inf_c99, [
|
|
|
60f33a |
AS_IF([test $ac_cv_func_atan2f:$ac_cv_func_atan2l = yes:yes], [
|
|
|
60f33a |
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ AC_TRY_RUN([
|
|
|
60f33a |
@%:@include <math.h>
|
|
|
60f33a |
@%:@ifdef HAVE_UNISTD_H
|
|
|
60f33a |
@%:@include <unistd.h>
|
|
|
60f33a |
@@ -2058,7 +2051,7 @@ main(int argc, char **argv)
|
|
|
60f33a |
if (fabs(atan2(INFINITY, INFINITY) - M_PI_4) <= 0.01) return EXIT_SUCCESS;
|
|
|
60f33a |
return EXIT_FAILURE;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
[rb_cv_atan2_inf_c99=yes],
|
|
|
60f33a |
[rb_cv_atan2_inf_c99=no],
|
|
|
60f33a |
[AS_CASE($target_os, [mingw*|mswin*], [rb_cv_atan2_inf_c99=no], [rb_cv_atan2_inf_c99=yes])]
|
|
|
60f33a |
@@ -2087,9 +2080,9 @@ AS_IF([test x"$ac_cv_lib_rt_timer_settime" = xyes], [
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for unsetenv returns a value, rb_cv_unsetenv_return_value,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
#include <stdlib.h>
|
|
|
60f33a |
-]], [[int v = unsetenv("foo");]])],
|
|
|
60f33a |
+], [int v = unsetenv("foo");],
|
|
|
60f33a |
rb_cv_unsetenv_return_value=yes,
|
|
|
60f33a |
rb_cv_unsetenv_return_value=no)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_unsetenv_return_value" = no], [
|
|
|
60f33a |
@@ -2107,21 +2100,21 @@ AS_IF([test "$use_setreuid" = yes], [
|
|
|
60f33a |
])
|
|
|
60f33a |
AC_STRUCT_TIMEZONE
|
|
|
60f33a |
AC_CACHE_CHECK(for struct tm.tm_gmtoff, rb_cv_member_struct_tm_tm_gmtoff,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@define _BSD_SOURCE
|
|
|
60f33a |
@%:@define _DEFAULT_SOURCE
|
|
|
60f33a |
@%:@include <time.h>
|
|
|
60f33a |
- ]],
|
|
|
60f33a |
- [[struct tm t; t.tm_gmtoff = 3600;]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
+ [struct tm t; t.tm_gmtoff = 3600;],
|
|
|
60f33a |
[rb_cv_member_struct_tm_tm_gmtoff=yes],
|
|
|
60f33a |
[rb_cv_member_struct_tm_tm_gmtoff=no])])
|
|
|
60f33a |
AS_IF([test "$rb_cv_member_struct_tm_tm_gmtoff" = yes], [
|
|
|
60f33a |
AC_DEFINE(HAVE_STRUCT_TM_TM_GMTOFF)
|
|
|
60f33a |
])
|
|
|
60f33a |
AC_CACHE_CHECK(for external int daylight, rb_cv_have_daylight,
|
|
|
60f33a |
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>
|
|
|
60f33a |
- int i;]],
|
|
|
60f33a |
- [[i = daylight;]])],
|
|
|
60f33a |
+ [AC_TRY_LINK([#include <time.h>
|
|
|
60f33a |
+ int i;],
|
|
|
60f33a |
+ [i = daylight;],
|
|
|
60f33a |
rb_cv_have_daylight=yes,
|
|
|
60f33a |
rb_cv_have_daylight=no)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_have_daylight" = yes], [
|
|
|
60f33a |
@@ -2129,7 +2122,7 @@ AS_IF([test "$rb_cv_have_daylight" = yes], [
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(for negative time_t for gmtime(3), rb_cv_negative_time_t,
|
|
|
60f33a |
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_RUN([
|
|
|
60f33a |
#include <stdlib.h>
|
|
|
60f33a |
#include <time.h>
|
|
|
60f33a |
|
|
|
60f33a |
@@ -2159,7 +2152,7 @@ main()
|
|
|
60f33a |
check(gmtime(&t), 1, 12, 13, 20, 52);
|
|
|
60f33a |
return 0;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
rb_cv_negative_time_t=yes,
|
|
|
60f33a |
rb_cv_negative_time_t=no,
|
|
|
60f33a |
rb_cv_negative_time_t=yes)])
|
|
|
60f33a |
@@ -2170,7 +2163,7 @@ AS_IF([test "$rb_cv_negative_time_t" = yes], [
|
|
|
60f33a |
# [ruby-dev:40910] overflow of time on FreeBSD
|
|
|
60f33a |
# http://www.freebsd.org/cgi/query-pr.cgi?pr=145341
|
|
|
60f33a |
AC_CACHE_CHECK(for localtime(3) overflow correctly, rb_cv_localtime_overflow,
|
|
|
60f33a |
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_RUN([
|
|
|
60f33a |
#include <stdlib.h>
|
|
|
60f33a |
#include <time.h>
|
|
|
60f33a |
|
|
|
60f33a |
@@ -2202,7 +2195,7 @@ main()
|
|
|
60f33a |
check(t);
|
|
|
60f33a |
return 0;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
rb_cv_localtime_overflow=yes,
|
|
|
60f33a |
rb_cv_localtime_overflow=no,
|
|
|
60f33a |
rb_cv_localtime_overflow=no)])
|
|
|
60f33a |
@@ -2215,7 +2208,7 @@ AS_IF([test "$ac_cv_func_sigprocmask" = yes && test "$ac_cv_func_sigaction" = ye
|
|
|
60f33a |
], [
|
|
|
60f33a |
AC_CHECK_FUNCS(sigsetmask)
|
|
|
60f33a |
AC_CACHE_CHECK(for BSD signal semantics, rb_cv_bsd_signal,
|
|
|
60f33a |
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_RUN([
|
|
|
60f33a |
#include <stdio.h>
|
|
|
60f33a |
#include <signal.h>
|
|
|
60f33a |
|
|
|
60f33a |
@@ -2233,7 +2226,7 @@ main()
|
|
|
60f33a |
kill(getpid(), SIGINT);
|
|
|
60f33a |
return 0;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
rb_cv_bsd_signal=yes,
|
|
|
60f33a |
rb_cv_bsd_signal=no,
|
|
|
60f33a |
rb_cv_bsd_signal=$ac_cv_func_sigsetmask)])
|
|
|
60f33a |
@@ -2402,13 +2395,13 @@ AS_IF([test x"$enable_pthread" = xyes], [
|
|
|
60f33a |
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
|
|
|
60f33a |
])
|
|
|
60f33a |
AC_CACHE_CHECK([whether pthread_t is scalar type], [rb_cv_scalar_pthread_t], [
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@include <pthread.h>
|
|
|
60f33a |
- ]], [[
|
|
|
60f33a |
+ ], [
|
|
|
60f33a |
pthread_t thread_id;
|
|
|
60f33a |
thread_id = 0;
|
|
|
60f33a |
if (!thread_id) return 0;
|
|
|
60f33a |
- ]])],[rb_cv_scalar_pthread_t=yes],[rb_cv_scalar_pthread_t=no])
|
|
|
60f33a |
+ ], [rb_cv_scalar_pthread_t=yes], [rb_cv_scalar_pthread_t=no])
|
|
|
60f33a |
])
|
|
|
60f33a |
AS_IF([test x"$rb_cv_scalar_pthread_t" = xyes], [
|
|
|
60f33a |
: # RUBY_CHECK_SIZEOF(pthread_t, [void* int long], [], [@%:@include <pthread.h>])
|
|
|
60f33a |
@@ -2434,14 +2427,14 @@ AS_IF([test x"$enable_pthread" = xyes], [
|
|
|
60f33a |
"(pthread_self(), \"%s\", name)" \
|
|
|
60f33a |
"(name)" \
|
|
|
60f33a |
; do
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@include <pthread.h>
|
|
|
60f33a |
@%:@ifdef HAVE_PTHREAD_NP_H
|
|
|
60f33a |
@%:@include <pthread_np.h>
|
|
|
60f33a |
@%:@endif
|
|
|
60f33a |
@%:@define SET_THREAD_NAME(name) pthread_setname_np${mac}
|
|
|
60f33a |
- ]],
|
|
|
60f33a |
- [[if (SET_THREAD_NAME("conftest")) return 1;]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
+ [if (SET_THREAD_NAME("conftest")) return 1;],
|
|
|
60f33a |
[rb_cv_func_pthread_setname_np_arguments="${mac}"
|
|
|
60f33a |
break])
|
|
|
60f33a |
done
|
|
|
60f33a |
@@ -2465,8 +2458,8 @@ AS_IF([test x"$enable_pthread" = xyes], [
|
|
|
60f33a |
|
|
|
60f33a |
AS_IF([test x"$ac_cv_header_ucontext_h" = xno], [
|
|
|
60f33a |
AC_CACHE_CHECK([if signal.h defines ucontext_t], [rb_cv_ucontext_in_signal_h],
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <signal.h>]],
|
|
|
60f33a |
- [[size_t size = sizeof(ucontext_t);]])],
|
|
|
60f33a |
+ [AC_TRY_COMPILE([@%:@include <signal.h>],
|
|
|
60f33a |
+ [size_t size = sizeof(ucontext_t);],
|
|
|
60f33a |
[rb_cv_ucontext_in_signal_h=yes], [rb_cv_ucontext_in_signal_h=no])])
|
|
|
60f33a |
AS_IF([test x"$rb_cv_ucontext_in_signal_h" = xyes], [
|
|
|
60f33a |
AC_DEFINE_UNQUOTED(UCONTEXT_IN_SIGNAL_H, 1)
|
|
|
60f33a |
@@ -2474,14 +2467,14 @@ AS_IF([test x"$ac_cv_header_ucontext_h" = xno], [
|
|
|
60f33a |
])
|
|
|
60f33a |
AS_IF([test x"$ac_cv_header_ucontext_h" = xyes -o x"$rb_cv_ucontext_in_signal_h" = xyes], [
|
|
|
60f33a |
AC_CACHE_CHECK([if mcontext_t is a pointer], [rb_cv_mcontext_t_ptr],
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@include <signal.h>
|
|
|
60f33a |
@%:@ifdef HAVE_UCONTEXT_H
|
|
|
60f33a |
@%:@include <ucontext.h>
|
|
|
60f33a |
@%:@endif
|
|
|
60f33a |
mcontext_t test(mcontext_t mc) {return mc+1;}
|
|
|
60f33a |
- ]],
|
|
|
60f33a |
- [[test(0);]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
+ [test(0);],
|
|
|
60f33a |
[rb_cv_mcontext_t_ptr=yes], [rb_cv_mcontext_t_ptr=no])])
|
|
|
60f33a |
AS_IF([test x"$rb_cv_mcontext_t_ptr" = xyes], [
|
|
|
60f33a |
AC_DEFINE_UNQUOTED(DEFINE_MCONTEXT_PTR(mc, uc), mcontext_t mc = (uc)->uc_mcontext)
|
|
|
60f33a |
@@ -2495,7 +2488,7 @@ AS_IF([test x"$ac_cv_header_ucontext_h" = xyes -o x"$rb_cv_ucontext_in_signal_h"
|
|
|
60f33a |
|
|
|
60f33a |
AS_IF([test "$ac_cv_func_fork_works" = "yes" -a "$rb_with_pthread" = "yes"], [
|
|
|
60f33a |
AC_CACHE_CHECK([if fork works with pthread], rb_cv_fork_with_pthread,
|
|
|
60f33a |
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_RUN([
|
|
|
60f33a |
#include <stdlib.h>
|
|
|
60f33a |
#include <unistd.h>
|
|
|
60f33a |
#include <pthread.h>
|
|
|
60f33a |
@@ -2551,7 +2544,7 @@ main(int argc, char *argv[])
|
|
|
60f33a |
}
|
|
|
60f33a |
|
|
|
60f33a |
return EXIT_SUCCESS;
|
|
|
60f33a |
-}]])],
|
|
|
60f33a |
+}],
|
|
|
60f33a |
rb_cv_fork_with_pthread=yes,
|
|
|
60f33a |
rb_cv_fork_with_pthread=no,
|
|
|
60f33a |
rb_cv_fork_with_pthread=yes)])
|
|
|
60f33a |
@@ -2574,7 +2567,7 @@ AC_ARG_WITH(dln-a-out,
|
|
|
60f33a |
with_dln_a_out=no])], [with_dln_a_out=no])
|
|
|
60f33a |
|
|
|
60f33a |
AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
|
|
|
60f33a |
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[
|
|
|
60f33a |
+[AC_TRY_LINK([],[], [
|
|
|
60f33a |
AS_CASE(["`head -1 conftest$EXEEXT | tr -dc '\177ELF' | tr '\177' .`"],
|
|
|
60f33a |
[.ELF*], [rb_cv_binary_elf=yes], [rb_cv_binary_elf=no])],
|
|
|
60f33a |
rb_cv_binary_elf=no)])
|
|
|
cd6bb9 |
@@ -2868,7 +2861,7 @@ AC_CHECK_FUNCS(backtrace)
|
|
|
60f33a |
|
|
|
60f33a |
AS_IF([test "x$ac_cv_func_backtrace" = xyes], [
|
|
|
60f33a |
AC_CACHE_CHECK(for broken backtrace, rb_cv_broken_backtrace,
|
|
|
60f33a |
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ [AC_TRY_RUN([
|
|
|
60f33a |
#include <unistd.h>
|
|
|
60f33a |
#include <stdio.h>
|
|
|
60f33a |
#include <stdlib.h>
|
|
|
cd6bb9 |
@@ -2916,7 +2909,7 @@ main(void)
|
|
|
60f33a |
a[0] = 1;
|
|
|
60f33a |
return EXIT_SUCCESS;
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
rb_cv_broken_backtrace=no,
|
|
|
60f33a |
rb_cv_broken_backtrace=yes,
|
|
|
60f33a |
rb_cv_broken_backtrace=no)])
|
|
|
cd6bb9 |
@@ -2936,10 +2929,11 @@ AS_IF([test "$ac_cv_header_a_out_h" = yes], [
|
|
|
60f33a |
AS_IF([test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown], [
|
|
|
60f33a |
cat confdefs.h > config.h
|
|
|
60f33a |
AC_CACHE_CHECK(whether matz's dln works, rb_cv_dln_a_out,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
#define USE_DLN_A_OUT
|
|
|
60f33a |
#include "dln.c"
|
|
|
60f33a |
-]], [[]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
+ [],
|
|
|
60f33a |
rb_cv_dln_a_out=yes,
|
|
|
60f33a |
rb_cv_dln_a_out=no)])
|
|
|
60f33a |
AS_IF([test "$rb_cv_dln_a_out" = yes], [
|
|
|
cd6bb9 |
@@ -3005,10 +2999,10 @@ AS_CASE(["$target_os"],
|
|
|
60f33a |
STRIP="$STRIP -A -n"])
|
|
|
60f33a |
|
|
|
60f33a |
AC_ARG_WITH(ext,
|
|
|
60f33a |
- AS_HELP_STRING([--with-ext=EXTS],
|
|
|
60f33a |
+ AC_HELP_STRING([--with-ext=EXTS],
|
|
|
60f33a |
[pass to --with-ext option of extmk.rb]))
|
|
|
60f33a |
AC_ARG_WITH(out-ext,
|
|
|
60f33a |
- AS_HELP_STRING([--with-out-ext=EXTS],
|
|
|
60f33a |
+ AC_HELP_STRING([--with-out-ext=EXTS],
|
|
|
60f33a |
[pass to --without-ext option of extmk.rb]))
|
|
|
60f33a |
EXTSTATIC=
|
|
|
60f33a |
AC_SUBST(EXTSTATIC)dnl
|
|
|
cd6bb9 |
@@ -3472,7 +3466,7 @@ AS_IF([test "$rb_with_pthread" = "yes"], [
|
|
|
60f33a |
THREAD_MODEL=pthread
|
|
|
60f33a |
])
|
|
|
60f33a |
AC_CACHE_CHECK([for prefix of external symbols], rb_cv_symbol_prefix, [
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern void conftest_external(void) {}]], [[]])],[
|
|
|
60f33a |
+ AC_TRY_COMPILE([extern void conftest_external(void) {}], [], [
|
|
|
60f33a |
rb_cv_symbol_prefix=`$NM conftest.$ac_objext |
|
|
|
60f33a |
sed -n ['/.*T[ ]\([^ ]*\)conftest_external.*/!d;s//\1/p;q']`
|
|
|
60f33a |
],
|
|
|
cd6bb9 |
@@ -3483,7 +3477,7 @@ SYMBOL_PREFIX="$rb_cv_symbol_prefix"
|
|
|
60f33a |
test "x$SYMBOL_PREFIX" = xNONE && SYMBOL_PREFIX=''
|
|
|
60f33a |
DLNOBJ=dln.o
|
|
|
60f33a |
AC_ARG_ENABLE(dln,
|
|
|
60f33a |
- AS_HELP_STRING([--disable-dln], [disable dynamic link feature]),
|
|
|
60f33a |
+ AC_HELP_STRING([--disable-dln], [disable dynamic link feature]),
|
|
|
60f33a |
[test "$enableval" = yes || DLNOBJ=dmydln.o])
|
|
|
60f33a |
AC_SUBST(DLNOBJ)
|
|
|
60f33a |
MINIDLNOBJ=dmydln.o
|
|
|
cd6bb9 |
@@ -3615,12 +3609,13 @@ AS_IF([test "${universal_binary-no}" = yes ], [
|
|
|
60f33a |
AC_CACHE_CHECK([for architecture macros], rb_cv_architecture_macros, [
|
|
|
60f33a |
mv confdefs.h confdefs1.h
|
|
|
60f33a |
: > confdefs.h
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@if defined __`echo ${universal_archnames} |
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@if defined __`echo ${universal_archnames} |
|
|
|
60f33a |
sed 's/=[^ ]*//g;s/ /__ || defined __/g'`__
|
|
|
60f33a |
@%:@else
|
|
|
60f33a |
@%:@error
|
|
|
60f33a |
>>>>>><<<<<<
|
|
|
60f33a |
-@%:@endif]], [[]])],[
|
|
|
60f33a |
+@%:@endif], [],
|
|
|
60f33a |
+[
|
|
|
60f33a |
rb_cv_architecture_macros=yes
|
|
|
60f33a |
mv -f confdefs1.h confdefs.h
|
|
|
60f33a |
], [
|
|
|
cd6bb9 |
@@ -3633,17 +3628,16 @@ AS_IF([test "${universal_binary-no}" = yes ], [
|
|
|
60f33a |
CFLAGS="$new_cflags -arch $archs"
|
|
|
60f33a |
archs="__${archs}__"
|
|
|
60f33a |
AC_MSG_CHECKING([for macro ${archs} on ${cpu}])
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@ifndef ${archs}
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@ifndef ${archs}
|
|
|
60f33a |
@%:@error
|
|
|
60f33a |
-@%:@endif]], [[]])],
|
|
|
60f33a |
- [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
|
|
|
60f33a |
+@%:@endif], [], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
|
|
|
60f33a |
done
|
|
|
60f33a |
mv -f confdefs1.h confdefs.h
|
|
|
60f33a |
AC_MSG_ERROR([failed])
|
|
|
60f33a |
])])
|
|
|
60f33a |
AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>
|
|
|
60f33a |
- const char arch[[]] = __ARCHITECTURE__;]], [[puts(arch);]])],
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@include <stdio.h>
|
|
|
60f33a |
+ const char arch[[]] = __ARCHITECTURE__;], [puts(arch);],
|
|
|
60f33a |
[rb_cv_architecture_available=yes], [rb_cv_architecture_available=no]))
|
|
|
60f33a |
])
|
|
|
60f33a |
|
|
|
cd6bb9 |
@@ -4058,7 +4052,7 @@ AC_CONFIG_FILES(Makefile:template/Makefile.in, [
|
|
|
60f33a |
[EXEEXT='$EXEEXT' gnumake='$gnumake' GIT='$GIT'])
|
|
|
60f33a |
|
|
|
60f33a |
AC_ARG_WITH([ruby-pc],
|
|
|
60f33a |
- AS_HELP_STRING([--with-ruby-pc=FILENAME], [pc file basename]),
|
|
|
60f33a |
+ AC_HELP_STRING([--with-ruby-pc=FILENAME], [pc file basename]),
|
|
|
60f33a |
[ruby_pc="$withval"],
|
|
|
60f33a |
[ruby_pc="${RUBY_BASE_NAME}-${MAJOR}.${MINOR}.pc"])
|
|
|
60f33a |
AC_SUBST(ruby_pc)
|
|
|
60f33a |
diff --git a/missing/fileblocks.c b/missing/fileblocks.c
|
|
|
60f33a |
new file mode 100644
|
|
|
60f33a |
index 0000000000..ccb8d667b4
|
|
|
60f33a |
--- /dev/null
|
|
|
60f33a |
+++ b/missing/fileblocks.c
|
|
|
60f33a |
@@ -0,0 +1 @@
|
|
|
60f33a |
+/* dummy for autoconf */
|
|
|
60f33a |
diff --git a/tool/m4/ruby_check_builtin_setjmp.m4 b/tool/m4/ruby_check_builtin_setjmp.m4
|
|
|
60f33a |
index 008fd45911..a4289e2e9d 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_check_builtin_setjmp.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_check_builtin_setjmp.m4
|
|
|
60f33a |
@@ -8,18 +8,18 @@ AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
|
|
|
60f33a |
ac_cv_func___builtin_setjmp=no
|
|
|
60f33a |
for cast in "" "(void **)"; do
|
|
|
60f33a |
RUBY_WERROR_FLAG(
|
|
|
60f33a |
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <setjmp.h>
|
|
|
60f33a |
+ [AC_TRY_LINK([@%:@include <setjmp.h>
|
|
|
60f33a |
@%:@include <stdio.h>
|
|
|
60f33a |
jmp_buf jb;
|
|
|
60f33a |
@%:@ifdef NORETURN
|
|
|
60f33a |
NORETURN(void t(void));
|
|
|
60f33a |
@%:@endif
|
|
|
60f33a |
void t(void) {__builtin_longjmp($cast jb, 1);}
|
|
|
60f33a |
- int jump(void) {(void)(__builtin_setjmp($cast jb) ? 1 : 0); return 0;}]],
|
|
|
60f33a |
- [[
|
|
|
60f33a |
+ int jump(void) {(void)(__builtin_setjmp($cast jb) ? 1 : 0); return 0;}],
|
|
|
60f33a |
+ [
|
|
|
60f33a |
void (*volatile f)(void) = t;
|
|
|
60f33a |
if (!jump()) printf("%d\n", f != 0);
|
|
|
60f33a |
- ]])],
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
[ac_cv_func___builtin_setjmp="yes with cast ($cast)"])
|
|
|
60f33a |
])
|
|
|
60f33a |
test "$ac_cv_func___builtin_setjmp" = no || break
|
|
|
60f33a |
diff --git a/tool/m4/ruby_check_printf_prefix.m4 b/tool/m4/ruby_check_printf_prefix.m4
|
|
|
60f33a |
index 0415f9fa92..9007c18c0a 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_check_printf_prefix.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_check_printf_prefix.m4
|
|
|
60f33a |
@@ -4,7 +4,8 @@ AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
|
|
|
60f33a |
[rb_cv_pri_prefix_]AS_TR_SH($1)=[NONE]
|
|
|
60f33a |
RUBY_WERROR_FLAG(RUBY_APPEND_OPTIONS(CFLAGS, $rb_cv_wsuppress_flags)
|
|
|
60f33a |
for pri in $2; do
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>
|
|
|
60f33a |
+ AC_TRY_COMPILE(
|
|
|
60f33a |
+ [@%:@include <stdio.h>
|
|
|
60f33a |
@%:@include <stddef.h>
|
|
|
60f33a |
@%:@ifdef __GNUC__
|
|
|
60f33a |
@%:@if defined __MINGW_PRINTF_FORMAT
|
|
|
60f33a |
@@ -17,9 +18,9 @@ AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
|
|
|
60f33a |
@%:@else
|
|
|
60f33a |
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) decl
|
|
|
60f33a |
@%:@endif
|
|
|
60f33a |
- PRINTF_ARGS(void test_sprintf(const char*, ...), 1, 2);]],
|
|
|
60f33a |
- [[printf("%]${pri}[d", (]$1[)42);
|
|
|
60f33a |
- test_sprintf("%]${pri}[d", (]$1[)42);]])],
|
|
|
60f33a |
+ PRINTF_ARGS(void test_sprintf(const char*, ...), 1, 2);],
|
|
|
60f33a |
+ [printf("%]${pri}[d", (]$1[)42);
|
|
|
60f33a |
+ test_sprintf("%]${pri}[d", (]$1[)42);],
|
|
|
60f33a |
[rb_cv_pri_prefix_]AS_TR_SH($1)[=[$pri]; break])
|
|
|
60f33a |
done)])
|
|
|
60f33a |
AS_IF([test "[$rb_cv_pri_prefix_]AS_TR_SH($1)" != NONE], [
|
|
|
60f33a |
diff --git a/tool/m4/ruby_check_setjmp.m4 b/tool/m4/ruby_check_setjmp.m4
|
|
|
60f33a |
index 66652984ea..59f38581b8 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_check_setjmp.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_check_setjmp.m4
|
|
|
60f33a |
@@ -2,14 +2,14 @@
|
|
|
60f33a |
# used for AC_ARG_WITH(setjmp-type)
|
|
|
60f33a |
AC_DEFUN([RUBY_CHECK_SETJMP], [
|
|
|
60f33a |
AC_CACHE_CHECK([for ]$1[ as a macro or function], ac_cv_func_$1,
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
60f33a |
+ [AC_TRY_COMPILE([
|
|
|
60f33a |
@%:@include <setjmp.h>
|
|
|
60f33a |
]AC_INCLUDES_DEFAULT([$3])[
|
|
|
60f33a |
@%:@define JMPARGS_1 env
|
|
|
60f33a |
@%:@define JMPARGS_2 env,1
|
|
|
60f33a |
@%:@define JMPARGS JMPARGS_]m4_ifval($2,2,1)[
|
|
|
60f33a |
-]],
|
|
|
60f33a |
- [m4_ifval($2,$2,jmp_buf)[ env; $1(JMPARGS);]])],
|
|
|
60f33a |
+],
|
|
|
60f33a |
+ m4_ifval($2,$2,jmp_buf)[ env; $1(JMPARGS);],
|
|
|
60f33a |
ac_cv_func_$1=yes,
|
|
|
60f33a |
ac_cv_func_$1=no)]
|
|
|
60f33a |
)
|
|
|
60f33a |
diff --git a/tool/m4/ruby_check_sysconf.m4 b/tool/m4/ruby_check_sysconf.m4
|
|
|
60f33a |
index 8324be6764..f6b247a16f 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_check_sysconf.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_check_sysconf.m4
|
|
|
60f33a |
@@ -1,9 +1,9 @@
|
|
|
60f33a |
# -*- Autoconf -*-
|
|
|
60f33a |
AC_DEFUN([RUBY_CHECK_SYSCONF], [dnl
|
|
|
60f33a |
AC_CACHE_CHECK([whether _SC_$1 is supported], rb_cv_have_sc_[]m4_tolower($1),
|
|
|
60f33a |
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
|
|
|
60f33a |
- ]],
|
|
|
60f33a |
- [[_SC_$1 >= 0]])],
|
|
|
60f33a |
+ [AC_TRY_COMPILE([#include <unistd.h>
|
|
|
60f33a |
+ ],
|
|
|
60f33a |
+ [_SC_$1 >= 0],
|
|
|
60f33a |
rb_cv_have_sc_[]m4_tolower($1)=yes,
|
|
|
60f33a |
rb_cv_have_sc_[]m4_tolower($1)=no)
|
|
|
60f33a |
])
|
|
|
60f33a |
diff --git a/tool/m4/ruby_cppoutfile.m4 b/tool/m4/ruby_cppoutfile.m4
|
|
|
60f33a |
index 495ae0aae4..7c81c4f354 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_cppoutfile.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_cppoutfile.m4
|
|
|
60f33a |
@@ -4,8 +4,8 @@ AC_DEFUN([RUBY_CPPOUTFILE],
|
|
|
60f33a |
[save_CPPFLAGS="$CPPFLAGS"
|
|
|
60f33a |
CPPFLAGS='-o conftest-1.i'
|
|
|
60f33a |
rb_cv_cppoutfile=no
|
|
|
60f33a |
-AC_PREPROC_IFELSE([AC_LANG_SOURCE([[test-for-cppout]])],
|
|
|
60f33a |
- [grep test-for-cppout conftest-1.i > /dev/null && rb_cv_cppoutfile=yes])
|
|
|
60f33a |
+AC_TRY_CPP([test-for-cppout],
|
|
|
60f33a |
+ [grep test-for-cppout conftest-1.i > /dev/null && rb_cv_cppoutfile=yes])
|
|
|
60f33a |
CPPFLAGS="$save_CPPFLAGS"
|
|
|
60f33a |
rm -f conftest*])
|
|
|
60f33a |
AS_IF([test "$rb_cv_cppoutfile" = yes], [
|
|
|
60f33a |
diff --git a/tool/m4/ruby_decl_attribute.m4 b/tool/m4/ruby_decl_attribute.m4
|
|
|
60f33a |
index 22358a079a..3187b9be60 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_decl_attribute.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_decl_attribute.m4
|
|
|
60f33a |
@@ -21,7 +21,7 @@ for mac in \
|
|
|
60f33a |
"__declspec(attrib_code) x" \
|
|
|
60f33a |
x; do
|
|
|
60f33a |
m4_ifval([$4],mac="$mac"${rbcv_cond+" /* only if $rbcv_cond */"})
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
|
|
60f33a |
+ AC_TRY_COMPILE(
|
|
|
60f33a |
m4_ifval([$4],${rbcv_cond+[@%:@if ]$rbcv_cond})
|
|
|
60f33a |
[@%:@define ]attrib[](attrib_params)[ $mac]
|
|
|
60f33a |
m4_ifval([$4],${rbcv_cond+[@%:@else]}
|
|
|
60f33a |
@@ -30,7 +30,7 @@ ${rbcv_cond+[@%:@endif]})
|
|
|
60f33a |
$6
|
|
|
60f33a |
@%:@define mesg ("")
|
|
|
60f33a |
@%:@define san "address"
|
|
|
60f33a |
- attrib[](attrib_params)[;]], [[]])],
|
|
|
60f33a |
+ attrib[](attrib_params)[;], [],
|
|
|
60f33a |
[rbcv="$mac"; break])
|
|
|
60f33a |
done
|
|
|
60f33a |
])])
|
|
|
60f33a |
diff --git a/tool/m4/ruby_dtrace_available.m4 b/tool/m4/ruby_dtrace_available.m4
|
|
|
60f33a |
index babffaffac..79586d152c 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_dtrace_available.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_dtrace_available.m4
|
|
|
60f33a |
@@ -7,7 +7,7 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE],
|
|
|
60f33a |
AS_FOR(opt, rb_dtrace_opt, ["-xnolibs" ""], [dnl
|
|
|
60f33a |
AS_IF([$DTRACE opt -h -o conftest_provider.h -s conftest_provider.d >/dev/null 2>/dev/null],
|
|
|
60f33a |
[], [continue])
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include "conftest_provider.h"]], [[CONFTEST_FIRE();]])],
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@include "conftest_provider.h"], [CONFTEST_FIRE();],
|
|
|
60f33a |
[], [continue])
|
|
|
60f33a |
# DTrace is available on the system
|
|
|
60f33a |
rb_cv_dtrace_available=yes${rb_dtrace_opt:+"(opt)"}
|
|
|
60f33a |
diff --git a/tool/m4/ruby_dtrace_postprocess.m4 b/tool/m4/ruby_dtrace_postprocess.m4
|
|
|
60f33a |
index 1cb651b481..9ef088b3f8 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_dtrace_postprocess.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_dtrace_postprocess.m4
|
|
|
60f33a |
@@ -12,7 +12,7 @@ _PROBES
|
|
|
60f33a |
$DTRACE ${DTRACE_OPT} -h -o conftest_provider.h -s conftest_provider.d >/dev/null 2>/dev/null &&
|
|
|
60f33a |
:
|
|
|
60f33a |
}], [
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include "conftest_provider.h"]], [[CONFTEST_FIRE();]])],[
|
|
|
60f33a |
+ AC_TRY_COMPILE([@%:@include "conftest_provider.h"], [CONFTEST_FIRE();], [
|
|
|
60f33a |
AS_IF([{
|
|
|
60f33a |
cp -p conftest.${ac_objext} conftest.${ac_objext}.save &&
|
|
|
60f33a |
$DTRACE ${DTRACE_OPT} -G -s conftest_provider.d conftest.${ac_objext} 2>/dev/null &&
|
|
|
60f33a |
diff --git a/tool/m4/ruby_mingw32.m4 b/tool/m4/ruby_mingw32.m4
|
|
|
60f33a |
index 76b95f02a8..f44fe5575c 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_mingw32.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_mingw32.m4
|
|
|
60f33a |
@@ -3,11 +3,11 @@ AC_DEFUN([RUBY_MINGW32],
|
|
|
60f33a |
[AS_CASE(["$host_os"],
|
|
|
60f33a |
[cygwin*], [
|
|
|
60f33a |
AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
|
|
|
60f33a |
-[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+[AC_TRY_CPP([
|
|
|
60f33a |
#ifndef __MINGW32__
|
|
|
60f33a |
# error
|
|
|
60f33a |
#endif
|
|
|
60f33a |
-]])],[rb_cv_mingw32=yes],[rb_cv_mingw32=no])
|
|
|
60f33a |
+], rb_cv_mingw32=yes,rb_cv_mingw32=no)
|
|
|
60f33a |
rm -f conftest*])
|
|
|
60f33a |
AS_IF([test "$rb_cv_mingw32" = yes], [
|
|
|
60f33a |
target_os="mingw32"
|
|
|
60f33a |
diff --git a/tool/m4/ruby_rm_recursive.m4 b/tool/m4/ruby_rm_recursive.m4
|
|
|
60f33a |
index e2c8f66ccc..e33ba1d97a 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_rm_recursive.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_rm_recursive.m4
|
|
|
60f33a |
@@ -1,6 +1,6 @@
|
|
|
60f33a |
# -*- Autoconf -*-
|
|
|
60f33a |
-AC_DEFUN([RUBY_RM_RECURSIVE], [dnl
|
|
|
60f33a |
-m4_version_prereq([2.70], [], [dnl
|
|
|
60f33a |
+AC_DEFUN([RUBY_RM_RECURSIVE], [
|
|
|
60f33a |
+m4_version_prereq([2.70], [-1], [
|
|
|
60f33a |
# suppress error messages, rm: cannot remove 'conftest.dSYM', from
|
|
|
60f33a |
# AC_EGREP_CPP with CFLAGS=-g on Darwin.
|
|
|
60f33a |
AS_CASE([$build_os], [darwin*], [
|
|
|
60f33a |
diff --git a/tool/m4/ruby_stack_grow_direction.m4 b/tool/m4/ruby_stack_grow_direction.m4
|
|
|
60f33a |
index f5f93579a4..74ec219322 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_stack_grow_direction.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_stack_grow_direction.m4
|
|
|
60f33a |
@@ -6,7 +6,7 @@ AS_CASE(["$1"],
|
|
|
60f33a |
[m68*|x86*|x64|i?86|ppc*|sparc*|alpha*], [ $2=-1],
|
|
|
60f33a |
[hppa*], [ $2=+1],
|
|
|
60f33a |
[
|
|
|
60f33a |
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
|
60f33a |
+ AC_TRY_RUN([
|
|
|
60f33a |
/* recurse to get rid of inlining */
|
|
|
60f33a |
static int
|
|
|
60f33a |
stack_growup_p(addr, n)
|
|
|
60f33a |
@@ -23,7 +23,7 @@ int main()
|
|
|
60f33a |
int x;
|
|
|
60f33a |
return stack_growup_p(&x, 10);
|
|
|
60f33a |
}
|
|
|
60f33a |
-]])],[$2=-1],[$2=+1],[$2=0])
|
|
|
60f33a |
+], $2=-1, $2=+1, $2=0)
|
|
|
60f33a |
])
|
|
|
60f33a |
eval stack_grow_dir=\$$2])
|
|
|
60f33a |
eval $2=\$stack_grow_dir
|
|
|
60f33a |
diff --git a/tool/m4/ruby_try_cflags.m4 b/tool/m4/ruby_try_cflags.m4
|
|
|
60f33a |
index 8c9f22d50c..86ab80e1e6 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_try_cflags.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_try_cflags.m4
|
|
|
60f33a |
@@ -3,7 +3,7 @@ AC_DEFUN([RUBY_TRY_CFLAGS], [
|
|
|
60f33a |
AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])
|
|
|
60f33a |
RUBY_WERROR_FLAG([
|
|
|
60f33a |
CFLAGS="[$]CFLAGS $1"
|
|
|
60f33a |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$4]], [[$5]])],
|
|
|
60f33a |
+ AC_TRY_COMPILE([$4], [$5],
|
|
|
60f33a |
[$2
|
|
|
60f33a |
AC_MSG_RESULT(yes)],
|
|
|
60f33a |
[$3
|
|
|
60f33a |
diff --git a/tool/m4/ruby_try_ldflags.m4 b/tool/m4/ruby_try_ldflags.m4
|
|
|
60f33a |
index d27940c7b2..b275107ed9 100644
|
|
|
60f33a |
--- a/tool/m4/ruby_try_ldflags.m4
|
|
|
60f33a |
+++ b/tool/m4/ruby_try_ldflags.m4
|
|
|
60f33a |
@@ -4,7 +4,7 @@ AC_DEFUN([RUBY_TRY_LDFLAGS], [
|
|
|
60f33a |
LDFLAGS="[$]LDFLAGS $1"
|
|
|
60f33a |
AC_MSG_CHECKING([whether $1 is accepted as LDFLAGS])
|
|
|
60f33a |
RUBY_WERROR_FLAG([
|
|
|
60f33a |
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$4]], [[$5]])],
|
|
|
60f33a |
+ AC_TRY_LINK([$4], [$5],
|
|
|
60f33a |
[$2
|
|
|
60f33a |
AC_MSG_RESULT(yes)],
|
|
|
60f33a |
[$3
|
|
|
60f33a |
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
|
|
|
60f33a |
index 0bc5efbfb2..326bd7fa7a 100644
|
|
|
60f33a |
--- a/win32/Makefile.sub
|
|
|
60f33a |
+++ b/win32/Makefile.sub
|
|
|
12267e |
@@ -728,6 +728,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
|
|
60f33a |
#define rb_gid_t int
|
|
|
60f33a |
#define rb_uid_t int
|
|
|
60f33a |
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
|
|
60f33a |
+#define HAVE_ST_RDEV 1
|
|
|
60f33a |
#define HAVE_STRUCT_TIMEVAL 1
|
|
|
60f33a |
!if $(MSC_VER) >= 1900
|
|
|
60f33a |
#define HAVE_STRUCT_TIMESPEC
|
|
|
60f33a |
--
|
|
|
60f33a |
2.31.1
|
|
|
60f33a |
|