Commit a1daed2d by Eric Christopher

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
parent dc8f5205
2006-07-05 Eric Christopher <echristo@apple.com>
* configure.ac: Depend addition of -pthread on host OS.
* configure: Regenerate.
2006-06-21 Jakub Jelinek <jakub@redhat.com> 2006-06-21 Jakub Jelinek <jakub@redhat.com>
* critical.c (GOMP_critical_name_start): Fix *pptr initialization * critical.c (GOMP_critical_name_start): Fix *pptr initialization
......
...@@ -8296,7 +8296,8 @@ fi ...@@ -8296,7 +8296,8 @@ fi
# Check to see if -pthread or -lpthread is needed. Prefer the former. # 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. # In case the pthread.h system header is not found, this test will fail.
XPCFLAGS="" XPCFLAGS=""
CFLAGS="$CFLAGS -pthread"
# Darwin doesn't need the -pthread option since threads are in libSystem
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
...@@ -8335,7 +8336,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ...@@ -8335,7 +8336,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
case $host in
*-darwin*)
;;
default)
XPCFLAGS=" -Wc,-pthread" XPCFLAGS=" -Wc,-pthread"
;;
esac
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
......
...@@ -145,13 +145,20 @@ GCC_HEADER_STDINT(gstdint.h) ...@@ -145,13 +145,20 @@ GCC_HEADER_STDINT(gstdint.h)
# Check to see if -pthread or -lpthread is needed. Prefer the former. # 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. # In case the pthread.h system header is not found, this test will fail.
XPCFLAGS="" XPCFLAGS=""
CFLAGS="$CFLAGS -pthread"
# Darwin doesn't need the -pthread option since threads are in libSystem
AC_LINK_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
[#include <pthread.h> [#include <pthread.h>
void *g(void *d) { return NULL; }], void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,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" [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
AC_LINK_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment