summaryrefslogtreecommitdiff
path: root/TSRM/threads.m4
diff options
context:
space:
mode:
authorDavid Reid <dreid@php.net>2002-10-05 11:26:17 +0000
committerDavid Reid <dreid@php.net>2002-10-05 11:26:17 +0000
commit2a0fbded3dc3f366cf3e4bfd3a42c7a2f5d2b745 (patch)
tree16a454a99aa47c8b954271b995bd200712af8326 /TSRM/threads.m4
parent4ca381aacfc77f43d02895d7ced4ecd36b5a286e (diff)
downloadphp-git-2a0fbded3dc3f366cf3e4bfd3a42c7a2f5d2b745.tar.gz
Add BeOS thread support to TSRM. This should not impact on any other OS's
but allows us to build PHP with threading support and therefore we can build as an Apache 2 module. The locking is currently done using benaphores but this may be reviewed.
Diffstat (limited to 'TSRM/threads.m4')
-rw-r--r--TSRM/threads.m443
1 files changed, 24 insertions, 19 deletions
diff --git a/TSRM/threads.m4 b/TSRM/threads.m4
index e0f934e556..790579656e 100644
--- a/TSRM/threads.m4
+++ b/TSRM/threads.m4
@@ -102,26 +102,31 @@ dnl -threads gcc (HP-UX)
dnl
AC_DEFUN(PTHREADS_CHECK,[
-save_CFLAGS=$CFLAGS
-save_LIBS=$LIBS
-PTHREADS_ASSIGN_VARS
-PTHREADS_CHECK_COMPILE
-LIBS=$save_LIBS
-CFLAGS=$save_CFLAGS
+if test "$beos_threads" = "1"; then
+ pthreads_working="yes"
+ ac_cv_pthreads_cflags=""
+else
+ save_CFLAGS=$CFLAGS
+ save_LIBS=$LIBS
+ PTHREADS_ASSIGN_VARS
+ PTHREADS_CHECK_COMPILE
+ LIBS=$save_LIBS
+ CFLAGS=$save_CFLAGS
-AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
-ac_cv_pthreads_cflags=
-if test "$pthreads_working" != "yes"; then
- for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
- ac_save=$CFLAGS
- CFLAGS="$CFLAGS $flag"
- PTHREADS_CHECK_COMPILE
- CFLAGS=$ac_save
- if test "$pthreads_working" = "yes"; then
- ac_cv_pthreads_cflags=$flag
- break
- fi
- done
+ AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
+ ac_cv_pthreads_cflags=
+ if test "$pthreads_working" != "yes"; then
+ for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
+ ac_save=$CFLAGS
+ CFLAGS="$CFLAGS $flag"
+ PTHREADS_CHECK_COMPILE
+ CFLAGS=$ac_save
+ if test "$pthreads_working" = "yes"; then
+ ac_cv_pthreads_cflags=$flag
+ break
+ fi
+ done
+ fi
fi
])