summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tool/m4/ruby_thread.m425
1 files changed, 15 insertions, 10 deletions
diff --git a/tool/m4/ruby_thread.m4 b/tool/m4/ruby_thread.m4
index 6f1e3960b1..3831bc4c06 100644
--- a/tool/m4/ruby_thread.m4
+++ b/tool/m4/ruby_thread.m4
@@ -1,15 +1,20 @@
dnl -*- Autoconf -*-
AC_DEFUN([RUBY_THREAD], [
-AS_CASE(["$target_os"],
- [mingw*], [
- THREAD_MODEL=win32
- ],
- [
- AS_IF([test "$rb_with_pthread" = "yes"], [
- THREAD_MODEL=pthread
- ])
- ]
-)
+AC_ARG_WITH(thread,
+ AS_HELP_STRING([--with-thread=IMPLEMENTATION], [specify the thread implementation to use]),
+ [THREAD_MODEL=$withval], [
+ THREAD_MODEL=
+ 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)],