Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
6c812c6
commit ccda26e
Showing
2 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |