From bb3024110a022c633f112c436bf225d0b4781fd5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 25 Sep 2010 01:21:06 +0200 Subject: Improve pthread test --- m4/acx-pthread.m4 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'm4') 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 -- cgit v1.1