summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorYuta Saito <kateinoigakukun@gmail.com>2021-10-28 15:51:40 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-10-30 10:18:33 +0900
commit8590d61ea9b6b91c89a14a8d0f6829c8a3a8c6c8 (patch)
tree52b07a13002406e41bc9f22c11614387650b952d /tool
parentccda26efe7c6acf7edd1262dd2826b8c7008ff75 (diff)
Select including thread impl file at config time
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5043
Diffstat (limited to 'tool')
-rw-r--r--tool/m4/ruby_thread.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/tool/m4/ruby_thread.m4 b/tool/m4/ruby_thread.m4
index 92d80421f1..6f1e3960b1 100644
--- a/tool/m4/ruby_thread.m4
+++ b/tool/m4/ruby_thread.m4
@@ -16,4 +16,13 @@ AS_CASE(["$THREAD_MODEL"],
[win32], [],
[""], [AC_MSG_ERROR(thread model is missing)],
[AC_MSG_ERROR(unknown thread model $THREAD_MODEL)])
+
+THREAD_IMPL_H=thread_$THREAD_MODEL.h
+AS_IF([test ! -f "$srcdir/$THREAD_IMPL_H"],
+ [AC_MSG_ERROR('$srcdir/$THREAD_IMPL_H' must exist)])
+THREAD_IMPL_SRC=thread_$THREAD_MODEL.c
+AS_IF([test ! -f "$srcdir/$THREAD_IMPL_SRC"],
+ [AC_MSG_ERROR('$srcdir/$THREAD_IMPL_SRC' must exist)])
+AC_DEFINE_UNQUOTED(THREAD_IMPL_H, ["$THREAD_IMPL_H"])
+AC_DEFINE_UNQUOTED(THREAD_IMPL_SRC, ["$THREAD_IMPL_SRC"])
])dnl