From ccda26efe7c6acf7edd1262dd2826b8c7008ff75 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Thu, 28 Oct 2021 15:48:45 +0900 Subject: 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 --- tool/m4/ruby_thread.m4 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tool/m4/ruby_thread.m4 (limited to 'tool/m4') diff --git a/tool/m4/ruby_thread.m4 b/tool/m4/ruby_thread.m4 new file mode 100644 index 0000000000..92d80421f1 --- /dev/null +++ b/tool/m4/ruby_thread.m4 @@ -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 -- cgit v1.2.1