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:
parent
8590d61ea9
commit
4e0747a8a2
Notes:
git
2021-10-30 10:18:52 +09:00
1 changed files with 15 additions and 10 deletions
|
@ -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)],
|
||||
|
|
Loading…
Add table
Reference in a new issue