summaryrefslogtreecommitdiff
path: root/TSRM/threads.m4
diff options
context:
space:
mode:
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
])