summaryrefslogtreecommitdiff
path: root/TSRM/tsrm.m4
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-03-07 13:24:12 +0000
committerSascha Schumann <sas@php.net>2000-03-07 13:24:12 +0000
commit05024cb094dd9349808704579cee9b351e5ce26f (patch)
tree3b240fd5453789cdda20f3c8d519c885e34bd83d /TSRM/tsrm.m4
parent4cb71a069bedc5b1e97cd0830a28f8afe439b835 (diff)
downloadphp-git-05024cb094dd9349808704579cee9b351e5ce26f.tar.gz
Use improved POSIX threads check from threads.m4
This is shared between some projects (currently Apache 2.0, mhash, mcrypt)
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)