aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/libgomp/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/libgomp/configure.ac')
-rw-r--r--gcc-4.6/libgomp/configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc-4.6/libgomp/configure.ac b/gcc-4.6/libgomp/configure.ac
index c3dcc0cb5..6db8054a5 100644
--- a/gcc-4.6/libgomp/configure.ac
+++ b/gcc-4.6/libgomp/configure.ac
@@ -184,6 +184,13 @@ AC_LINK_IFELSE(
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[XPCFLAGS=" -Wc,-pthread"],
+ [CFLAGS="$save_CFLAGS" LIBS="$LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>
+ void *g(void *d) { return NULL; }],
+ [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
+ [],
[CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -191,7 +198,7 @@ AC_LINK_IFELSE(
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[],
- [AC_MSG_ERROR([Pthreads are required to build libgomp])])])
+ [AC_MSG_ERROR([Pthreads are required to build libgomp])])])])
# Check for functions needed.
AC_CHECK_FUNCS(getloadavg clock_gettime strtoull)