ruby-changes:65604
From: nagachika <ko1@a...>
Date: Sun, 21 Mar 2021 14:20:06 +0900 (JST)
Subject: [ruby-changes:65604] cfd1a17292 (ruby_2_7): merge revision(s) c32375883a696fcf8e9e99875f1339ee5474a255:
https://git.ruby-lang.org/ruby.git/commit/?id=cfd1a17292 From cfd1a17292ae37db4d09c1452a4a84e7fd58e7cf Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@r...> Date: Sun, 21 Mar 2021 14:19:35 +0900 Subject: merge revision(s) c32375883a696fcf8e9e99875f1339ee5474a255: 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(-) --- configure.ac | 200 ++++++++++++++++++----------------- 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_ldflags.m4 | 2 +- version.h | 4 +- 14 files changed, 129 insertions(+), 128 deletions(-) diff --git a/configure.ac b/configure.ac index af170ef..0cf371d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1 dnl Process this file with autoconf to produce a configure script. -AC_INIT() +AC_INIT { AC_CONFIG_AUX_DIR(tool) AC_CONFIG_MACRO_DIRS(tool/m4) @@ -150,6 +150,9 @@ AC_ARG_ENABLE(load-relative, https://github.com/ruby/ruby/blob/trunk/configure.ac#L150 AC_ARG_PROGRAM +# checks for UNIX variants that set C preprocessor variables +AC_USE_SYSTEM_EXTENSIONS + dnl Checks for programs. cflagspat= @@ -223,12 +226,12 @@ test -z "$CXX" || ac_cv_prog_CXX="$CXX" https://github.com/ruby/ruby/blob/trunk/configure.ac#L226 AS_CASE(["$target_os"], [darwin*], [ AC_MSG_CHECKING(if minimum required OS X version is supported) - AC_TRY_CPP([@%:@include <AvailabilityMacros.h> + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <AvailabilityMacros.h> @%:@if MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5 @%:@error pre OS X 10.5 [!<===== pre OS X 10.5 =====>] @%:@endif - ], + ]])], [macosx_min_required=yes], [AC_MSG_RESULT(no) AC_MSG_ERROR([Unsupported OS X version is required])]) @@ -359,8 +362,8 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L362 [mingw*], [ test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt AC_CACHE_CHECK(for mingw32 runtime DLL, rb_cv_msvcrt, [ - AC_TRY_LINK([@%:@include <stdio.h>], - [FILE* volatile f = stdin; return 0;], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>]], + [[FILE* volatile f = stdin; return 0;]])], [rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext | tr A-Z a-z | sed -n '/^[[ ]]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'`], @@ -441,7 +444,7 @@ AC_SUBST(CHDIR) https://github.com/ruby/ruby/blob/trunk/configure.ac#L444 : "compiler section" && { RUBY_WERROR_FLAG([ AC_MSG_CHECKING([whether CFLAGS is valid]) - AC_TRY_COMPILE([], [], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [AC_MSG_RESULT(yes)], [ AC_MSG_RESULT(no) @@ -457,7 +460,7 @@ RUBY_WERROR_FLAG([ https://github.com/ruby/ruby/blob/trunk/configure.ac#L460 echo '<?xml?><plist><dict><key>CFBundleIdentifier</key><string></string></dict></plist>' > Info.plist && : } || AC_MSG_ERROR([failed to make temporary directory]) - AC_TRY_LINK([], [], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [AC_MSG_RESULT(yes)], [ cd .. && rm -fr tmp.$$.try_link @@ -639,13 +642,13 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L642 ], [ CFLAGS="$CFLAGS -Werror -Wuninitialized" ]) - AC_TRY_COMPILE([@%:@include <math.h> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h> int foo(double x) { int exp; frexp(x, &exp); return exp; - }], [if (foo(0.0)) return 1;], + }]], [[if (foo(0.0)) return 1;]])], [rb_cv_mingw64_broken_frexp_modf=no], [rb_cv_mingw64_broken_frexp_modf=yes]) CFLAGS="$save_CFLAGS" @@ -735,13 +738,13 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L738 AS_CASE(["$target_cpu"], [[i[3-6]86*]], [ AC_CACHE_CHECK([for __sync_val_compare_and_swap], [rb_cv_gcc_compiler_cas], [ - AC_TRY_LINK([unsigned long atomic_var;], - [__sync_val_compare_and_swap(&atomic_var, 0, 1);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]], + [[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])], [rb_cv_gcc_compiler_cas=yes], [ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -march=i486" - AC_TRY_LINK([unsigned long atomic_var;], - [__sync_val_compare_and_swap(&atomic_var, 0, 1);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]], + [[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])], [rb_cv_gcc_compiler_cas=i486], [rb_cv_gcc_compiler_cas=no]) CFLAGS="$save_CFLAGS" @@ -768,7 +771,7 @@ test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cx https://github.com/ruby/ruby/blob/trunk/configure.ac#L771 AC_CACHE_CHECK([whether compiler has statement and declarations in expressions], rb_cv_have_stmt_and_decl_in_expr, - [AC_TRY_COMPILE([],[ __extension__ ({ int a = 0; a; }); ], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ __extension__ ({ int a = 0; a; }); ]])], [rb_cv_have_stmt_and_decl_in_expr=yes], [rb_cv_have_stmt_and_decl_in_expr=no])]) AS_IF([test "$rb_cv_have_stmt_and_decl_in_expr" = yes], [ @@ -789,12 +792,12 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L792 [freebsd*], [ AC_CACHE_CHECK([whether pthread should be enabled by default], rb_cv_enable_pthread_default, - [AC_TRY_CPP([ + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include <osreldate.h> #if __FreeBSD_version < 502102 #error pthread should be disabled on this platform #endif - ], + ]])], rb_cv_enable_pthread_default=yes, rb_cv_enable_pthread_default=no)]) enable_pthread=$rb_cv_enable_pthread_default @@ -822,8 +825,8 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L825 RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT) AC_CACHE_CHECK([whether syscall(2) is deprecated], rb_cv_syscall_deprecated, [RUBY_WERROR_FLAG([ - AC_TRY_COMPILE([@%:@include <unistd.h>], - [if (syscall(0)) return 1;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <unistd.h>]], + [[if (syscall(0)) return 1;]])], [rb_cv_syscall_deprecated=no], [rb_cv_syscall_deprecated=yes])])]) AS_IF([test $rb_cv_syscall_deprecated = yes], [ @@ -850,7 +853,7 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L853 ]) with_setjmp_type=sigsetjmp # to hijack SIGCHLD handler AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt, - [AC_TRY_RUN([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <unistd.h> #include <string.h> @@ -887,7 +890,7 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L890 } return 0; } -], +]])], rb_cv_broken_crypt=no, rb_cv_broken_crypt=yes, rb_cv_broken_crypt=yes)]) @@ -916,11 +919,11 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L919 [solaris*], [ LIBS="-lm $LIBS" ac_cv_func_vfork=no AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given) - AC_TRY_COMPILE([#include <unistd.h> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif - ], [], + ]], [[]])], [given_xopen_source=yes], [given_xopen_source=no]) AC_MSG_RESULT($given_xopen_source) AS_IF([test $given_xopen_source = no], [ @@ -930,13 +933,13 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L933 AS_IF([test x"$define_xopen_source" != x], [ break ]) - RUBY_WERROR_FLAG([AC_TRY_COMPILE([ + RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #define _XOPEN_SOURCE ${tmp_xpg}00 #include <unistd.h> #ifndef _XPG${tmp_xpg} #error _XPG${tmp_xpg} should be defined by _XOPEN_SOURCE=${tmp_xpg}00 #endif - ], [], + ]], [[]])], [define_xopen_source=${tmp_xpg}00], []) ]) done @@ -1230,8 +1233,8 @@ AC_CACHE_CHECK(packed struct attribute, rb_cv_packed_struct, https://github.com/ruby/ruby/blob/trunk/configure.ac#L1233 "__pragma(pack(push, 1)) x __pragma(pack(pop))" \ "x __attribute__((packed))" \ ; do - AC_TRY_COMPILE([@%:@define PACKED_STRUCT(x) $mac - PACKED_STRUCT(struct { int a; });], [], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define PACKED_STRUCT(x) $mac + PACKED_STRUCT(struct { int a; });]], [[]])], [rb_cv_packed_struct=$mac; break]) done]) AS_IF([test "$rb_cv_packed_struct" != no], [ @@ -1444,8 +1447,8 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1447 AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias], [rb_cv_gcc_function_alias=no for a in alias weak,alias; do - AC_TRY_LINK([void foo(void) {} - void bar(void) __attribute__(($a("foo")));], [ba (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/