1
0
Fork 0
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:
Yuta Saito 2021-10-28 15:48:45 +09:00 committed by Yusuke Endoh
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
View 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