summaryrefslogtreecommitdiff
path: root/TSRM/tsrm.m4
diff options
context:
space:
mode:
Diffstat (limited to 'TSRM/tsrm.m4')
-rw-r--r--TSRM/tsrm.m428
1 files changed, 7 insertions, 21 deletions
diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4
index 23cd49ffd9..317e9f8132 100644
--- a/TSRM/tsrm.m4
+++ b/TSRM/tsrm.m4
@@ -53,27 +53,13 @@ AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
AC_DEFUN(TSRM_CHECK_PTHREADS,[
-old_CFLAGS="$CFLAGS"
-
-if test -n "$GCC"; then
- TSRM_CHECK_GCC_ARG(-pthread, [
- CFLAGS="$CFLAGS -pthread"
- ],[
- TSRM_CHECK_GCC_ARG(-pthreads, [
- CFLAGS="$CFLAGS -pthreads"
- ])])
-fi
-
-AC_CHECK_FUNCS(pthread_kill)
-
-if test "$ac_cv_func_pthread_kill" != "yes"; then
- CFLAGS="$old_CFLAGS"
- AC_CHECK_LIB(pthread, pthread_kill)
- unset ac_cv_func_pthread_kill
- AC_CHECK_FUNCS(pthread_kill)
- if test "$ac_cv_func_pthread_kill" != "yes"; then
- AC_MSG_ERROR(Your system seems to lack POSIX threads.)
- fi
+sinclude(threads.m4)
+sinclude(TSRM/threads.m4)
+
+PTHREADS_CHECK
+
+if test "$pthreads_working" != "yes"; then
+ AC_MSG_ERROR(Your system seems to lack POSIX threads.)
fi
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)