aboutsummaryrefslogtreecommitdiff
path: root/m4/acx-pthread.m4
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-25 01:21:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-25 01:21:06 +0200
commite17a24c4056ae335def31e60e40865ff8b1d2202 (patch)
tree004eff6380c5f97de4bbe2b624840a7f30741481 /m4/acx-pthread.m4
parentdac04ecb8cc5d00b6840603643ea06ef03cd4ab2 (diff)
Improve pthread test
Diffstat (limited to 'm4/acx-pthread.m4')
-rw-r--r--m4/acx-pthread.m49
1 files changed, 8 insertions, 1 deletions
diff --git a/m4/acx-pthread.m4 b/m4/acx-pthread.m4
index feeb01d..4be477f 100644
--- a/m4/acx-pthread.m4
+++ b/m4/acx-pthread.m4
@@ -128,8 +128,15 @@ case "${host_cpu}-${host_os}" in
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
- acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ # CS: Move -mt to the front of the list; Sun CC will use -mt,
+ # gcc will use -pthreads.
+ #
+ acx_pthread_flags="-mt -pthreads pthread -pthread $acx_pthread_flags"
;;
+
+ *-darwin*)
+ acx_pthread_flags="-pthread $acx_pthread_flags"
+ ;;
esac
if test x"$acx_pthread_ok" = xno; then