[前][次][番号順一覧][スレッド一覧]

ruby-changes:65605

From: nagachika <ko1@a...>
Date: Sun, 21 Mar 2021 14:27:47 +0900 (JST)
Subject: [ruby-changes:65605] ad8d6dcb48 (ruby_2_7): Revert "merge revision(s) c32375883a696fcf8e9e99875f1339ee5474a255:"

https://git.ruby-lang.org/ruby.git/commit/?id=ad8d6dcb48

From ad8d6dcb48a07caf7adb1dbc9df157149f0dee01 Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Sun, 21 Mar 2021 14:27:23 +0900
Subject: Revert "merge revision(s) c32375883a696fcf8e9e99875f1339ee5474a255:"

This reverts commit cfd1a17292ae37db4d09c1452a4a84e7fd58e7cf.
---
 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, 128 insertions(+), 129 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0cf371d..af170ef 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,9 +150,6 @@ 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=
@@ -226,12 +223,12 @@ test -z "$CXX" || ac_cv_prog_CXX="$CXX" https://github.com/ruby/ruby/blob/trunk/configure.ac#L223
 AS_CASE(["$target_os"],
 [darwin*], [
     AC_MSG_CHECKING(if minimum required OS X version is supported)
-    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <AvailabilityMacros.h>
+    AC_TRY_CPP([@%:@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])])
@@ -362,8 +359,8 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L359
     [mingw*], [
 	test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt
 	AC_CACHE_CHECK(for mingw32 runtime DLL, rb_cv_msvcrt, [
-	AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>]],
-		    [[FILE* volatile f = stdin; return 0;]])],
+	AC_TRY_LINK([@%:@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;}'`],
@@ -444,7 +441,7 @@ AC_SUBST(CHDIR) https://github.com/ruby/ruby/blob/trunk/configure.ac#L441
 : "compiler section" && {
 RUBY_WERROR_FLAG([
     AC_MSG_CHECKING([whether CFLAGS is valid])
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+    AC_TRY_COMPILE([], [],
 	[AC_MSG_RESULT(yes)],
 	[
 	AC_MSG_RESULT(no)
@@ -460,7 +457,7 @@ RUBY_WERROR_FLAG([ https://github.com/ruby/ruby/blob/trunk/configure.ac#L457
 	echo '<?xml?><plist><dict><key>CFBundleIdentifier</key><string></string></dict></plist>' > Info.plist &&
 	:
     } || AC_MSG_ERROR([failed to make temporary directory])
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+    AC_TRY_LINK([], [],
 	[AC_MSG_RESULT(yes)],
 	[
 	cd .. && rm -fr tmp.$$.try_link
@@ -642,13 +639,13 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L639
 	  ], [
 	    CFLAGS="$CFLAGS -Werror -Wuninitialized"
 	  ])
-	  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>
+	  AC_TRY_COMPILE([@%:@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"
@@ -738,13 +735,13 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L735
 
 AS_CASE(["$target_cpu"], [[i[3-6]86*]], [
     AC_CACHE_CHECK([for __sync_val_compare_and_swap], [rb_cv_gcc_compiler_cas], [
-	AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]],
-	    [[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])],
+	AC_TRY_LINK([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_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]],
-		[[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])],
+	    AC_TRY_LINK([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"
@@ -771,7 +768,7 @@ test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cx https://github.com/ruby/ruby/blob/trunk/configure.ac#L768
 
 AC_CACHE_CHECK([whether compiler has statement and declarations in expressions],
   rb_cv_have_stmt_and_decl_in_expr,
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ __extension__ ({ int a = 0; a; }); ]])],
+  [AC_TRY_COMPILE([],[ __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], [
@@ -792,12 +789,12 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L789
 [freebsd*], [
   AC_CACHE_CHECK([whether pthread should be enabled by default],
     rb_cv_enable_pthread_default,
-    [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+    [AC_TRY_CPP([
 #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
@@ -825,8 +822,8 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L822
 		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_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <unistd.h>]],
-							   [[if (syscall(0)) return 1;]])],
+			AC_TRY_COMPILE([@%:@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], [
@@ -853,7 +850,7 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L850
 		])
 		with_setjmp_type=sigsetjmp # to hijack SIGCHLD handler
 		AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
-		    [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+		    [AC_TRY_RUN([
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
@@ -890,7 +887,7 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L887
     }
     return 0;
 }
-]])],
+],
 		    rb_cv_broken_crypt=no,
 		    rb_cv_broken_crypt=yes,
 		    rb_cv_broken_crypt=yes)])
@@ -919,11 +916,11 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L916
 [solaris*], [	LIBS="-lm $LIBS"
 		ac_cv_func_vfork=no
 		AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given)
-		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
+		AC_TRY_COMPILE([#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], [
@@ -933,13 +930,13 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L930
 		    AS_IF([test x"$define_xopen_source" != x], [
 		      break
 		    ])
-		    RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+		    RUBY_WERROR_FLAG([AC_TRY_COMPILE([
 			#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
@@ -1233,8 +1230,8 @@ AC_CACHE_CHECK(packed struct attribute, rb_cv_packed_struct, https://github.com/ruby/ruby/blob/trunk/configure.ac#L1230
 	"__pragma(pack(push, 1)) x __pragma(pack(pop))" \
 	"x __attribute__((packed))" \
 	; do
-	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define PACKED_STRUCT(x) $mac
-			PACKED_STRUCT(struct { int a; });]], [[]])],
+	AC_TRY_COMPILE([@%:@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], [
@@ -1447,8 +1444,8 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1444
     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_LINK_IFELSE([AC_LANG_PROGRAM([[void foo(void) {}
-		void bar(void) __attribute__(($a("foo")));]], [[bar()]])],
+	    AC_TRY_LINK([void foo(void) {}
+		void bar(void) __attribute__(($a("foo")));], [bar()],
 		[rb_cv_gcc_function_alias=$a; break])
 	done])
     AS_IF([test "$rb_cv_gcc_function_alias" != no], [
@@ -1460,14 +1457,14 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1457
     ])
 
     AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
-	AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
-		    [[
+	AC_TRY_LINK([unsigned int atomic_var;],
+		    [
 			__atomic_exchange_n(&atomic_var, 0, __ATOMIC_SEQ_CST);
 			__atomic_exchange_n(&atomic_var, 1, __ATOMIC_SEQ_CST);
 			__atomic_fetch_add(&atomic_var, 1, __ATOMIC_SE (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]