diff options
author | Eric Christopher <echristo@gcc.gnu.org> | 2006-07-05 17:32:41 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gcc.gnu.org> | 2006-07-05 17:32:41 +0000 |
commit | a1daed2dea5cd8d5cc9c122cdb6d080c87ad3776 (patch) | |
tree | 3c8d77b4fd64c8cc02c2aeba5c9441d922dfe107 /libgomp/configure.ac | |
parent | dc8f5205374552519f0e4a89c115f3a17c23931b (diff) | |
download | gcc-a1daed2dea5cd8d5cc9c122cdb6d080c87ad3776.tar.gz |
configure.ac: Depend addition of -pthread on host OS.
2006-07-05 Eric Christopher <echristo@apple.com>
* configure.ac: Depend addition of -pthread on host OS.
* configure: Regenerate.
From-SVN: r115205
Diffstat (limited to 'libgomp/configure.ac')
-rw-r--r-- | libgomp/configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
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 <pthread.h> 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( |