ruby-changes:69533
From: Yuta <ko1@a...>
Date: Sat, 30 Oct 2021 10:18:44 +0900 (JST)
Subject: [ruby-changes:69533] 4e0747a8a2 (master): Allow the thread-model to be switched by configure option
https://git.ruby-lang.org/ruby.git/commit/?id=4e0747a8a2 From 4e0747a8a29e4d61744a802aee2c15289c2f9d19 Mon Sep 17 00:00:00 2001 From: Yuta Saito <kateinoigakukun@g...> Date: Thu, 28 Oct 2021 21:08:35 +0900 Subject: Allow the thread-model to be switched by configure option This change adds --with-thread=IMPL option to the configure. If not supplied, default implementation for each platform will be used. --- tool/m4/ruby_thread.m4 | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tool/m4/ruby_thread.m4 b/tool/m4/ruby_thread.m4 index 6f1e3960b16..3831bc4c061 100644 --- a/tool/m4/ruby_thread.m4 +++ b/tool/m4/ruby_thread.m4 @@ -1,15 +1,20 @@ https://github.com/ruby/ruby/blob/trunk/tool/m4/ruby_thread.m4#L1 dnl -*- Autoconf -*- AC_DEFUN([RUBY_THREAD], [ -AS_CASE(["$target_os"], - [mingw*], [ - THREAD_MODEL=win32 - ], - [ - AS_IF([test "$rb_with_pthread" = "yes"], [ - THREAD_MODEL=pthread - ]) - ] -) +AC_ARG_WITH(thread, + AS_HELP_STRING([--with-thread=IMPLEMENTATION], [specify the thread implementation to use]), + [THREAD_MODEL=$withval], [ + THREAD_MODEL= + AS_CASE(["$target_os"], + [mingw*], [ + THREAD_MODEL=win32 + ], + [ + AS_IF([test "$rb_with_pthread" = "yes"], [ + THREAD_MODEL=pthread + ]) + ] + ) +]) AS_CASE(["$THREAD_MODEL"], [pthread], [AC_CHECK_HEADERS(pthread.h)], -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/