ruby/tool/m4/ruby_thread.m4
Yuta Saito ccda26efe7 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
2021-10-30 10:18:33 +09:00

19 lines
436 B
Text

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