diff options
author | Yuta Saito <kateinoigakukun@gmail.com> | 2021-10-28 15:48:45 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-10-30 10:18:33 +0900 |
commit | ccda26efe7c6acf7edd1262dd2826b8c7008ff75 (patch) | |
tree | 4b81c477abafef921824787cf8389357d44b970a /tool/m4 | |
parent | 6c812c6f4e882d3a12ec0a9fabae4d6b86ef729f (diff) | |
download | ruby-ccda26efe7c6acf7edd1262dd2826b8c7008ff75.tar.gz |
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
Diffstat (limited to 'tool/m4')
-rw-r--r-- | tool/m4/ruby_thread.m4 | 19 |
1 files changed, 19 insertions, 0 deletions
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 |