summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TSRM/tsrm.m418
1 files changed, 6 insertions, 12 deletions
diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4
index 28443530a0..0eea9be2fa 100644
--- a/TSRM/tsrm.m4
+++ b/TSRM/tsrm.m4
@@ -46,19 +46,13 @@ AC_DEFUN(TSRM_CHECK_PTHREADS,[
old_CFLAGS="$CFLAGS"
if test -n "$GCC"; then
- dnl FreeBSD/Linux
- TSRM_CHECK_GCC_ARG(-pthread, gcc_pthread)
-
- if test "$gcc_pthread" = "yes"; then
- CFLAGS="$CFLAGS -pthread"
- else
- dnl gcc on Solaris
- TSRM_CHECK_GCC_ARG(-pthreads, gcc_pthreads)
- if test "$gcc_pthreads" = "yes"; then
- CFLAGS="$CFLAGS -pthreads"
+ for i in -pthread -pthreads; do
+ TSRM_CHECK_GCC_ARG($i, gcc_opt)
+ if test "$gcc_opt" = "yes"; then
+ CFLAGS="$CFLAGS $i"
+ break
fi
- fi
-
+ done
AC_CHECK_FUNCS(pthread_kill)
fi