1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
This commit is contained in:
Yuta Saito 2021-10-28 21:08:35 +09:00 committed by Yusuke Endoh
parent 8590d61ea9
commit 4e0747a8a2
Notes: git 2021-10-30 10:18:52 +09:00

View file

@ -1,15 +1,20 @@
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)],