From a1daed2dea5cd8d5cc9c122cdb6d080c87ad3776 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 5 Jul 2006 17:32:41 +0000 Subject: configure.ac: Depend addition of -pthread on host OS. 2006-07-05 Eric Christopher * configure.ac: Depend addition of -pthread on host OS. * configure: Regenerate. From-SVN: r115205 --- libgomp/configure.ac | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libgomp/configure.ac') diff --git a/libgomp/configure.ac b/libgomp/configure.ac index f653b70422d..5d11982b157 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -145,13 +145,20 @@ GCC_HEADER_STDINT(gstdint.h) # Check to see if -pthread or -lpthread is needed. Prefer the former. # In case the pthread.h system header is not found, this test will fail. XPCFLAGS="" -CFLAGS="$CFLAGS -pthread" + +# Darwin doesn't need the -pthread option since threads are in libSystem AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include void *g(void *d) { return NULL; }], [pthread_t t; pthread_create(&t,NULL,g,NULL);])], - [XPCFLAGS=" -Wc,-pthread"], + [case $host in + *-darwin*) + ;; + default) + XPCFLAGS=" -Wc,-pthread" + ;; + esac], [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( -- cgit v1.2.1