mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Split thread-model config into another ac file
This is a first step to allow the thread-model implementation to be switched by configure's option
This commit is contained in:
parent
6c812c6f4e
commit
ccda26efe7
Notes:
git
2021-10-30 10:18:53 +09:00
2 changed files with 21 additions and 9 deletions
19
tool/m4/ruby_thread.m4
Normal file
19
tool/m4/ruby_thread.m4
Normal file
|
@ -0,0 +1,19 @@
|
|||
dnl -*- Autoconf -*-
|
||||
AC_DEFUN([RUBY_THREAD], [
|
||||
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)],
|
||||
[win32], [],
|
||||
[""], [AC_MSG_ERROR(thread model is missing)],
|
||||
[AC_MSG_ERROR(unknown thread model $THREAD_MODEL)])
|
||||
])dnl
|
Loading…
Add table
Add a link
Reference in a new issue