summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2005-09-15 22:37:52 +0000
committerwtchang%redhat.com <devnull@localhost>2005-09-15 22:37:52 +0000
commit703e8c25e1f2635d3944cbec761e9fd0fba2de4c (patch)
tree43dc782aadc0381bb0b7911c16054e197f9140b9
parentb9c87c2674d4c3af268fe2ba64efeccb288c1dbd (diff)
downloadnspr-hg-703e8c25e1f2635d3944cbec761e9fd0fba2de4c.tar.gz
Skip libpthread check in Darwin builds
Bug #212708 r=wtc a=asa for mozilla1.8b5 Tag: MOZILLA_1_8_BRANCH
-rwxr-xr-xconfigure29
-rw-r--r--configure.in27
2 files changed, 35 insertions, 21 deletions
diff --git a/configure b/configure
index 8d87a24d..c15d109d 100755
--- a/configure
+++ b/configure
@@ -5136,9 +5136,14 @@ esac
-
+case "$target_os" in
+darwin*)
+ _HAVE_PTHREADS=1
+ ;;
+*)
+
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5142: checking for pthread_create in -lpthreads" >&5
+echo "configure:5147: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5160,7 +5165,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5164: checking for pthread_create in -lpthread" >&5
+echo "configure:5169: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5182,7 +5187,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5186: checking for pthread_create in -lc_r" >&5
+echo "configure:5191: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5204,7 +5209,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5208: checking for pthread_create in -lc" >&5
+echo "configure:5213: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5222,22 +5227,24 @@ echo "
if test "$_res" = "0"; then
echo "$ac_t""yes" 1>&6
_HAVE_PTHREADS=1
-
+
else
echo "$ac_t""no" 1>&6
fi
+
+ fi
+
fi
fi
+ ;;
+esac
- fi
-
-
# Check whether --with-pthreads or --without-pthreads was given.
if test "${with_pthreads+set}" = set; then
withval="$with_pthreads"
@@ -5356,7 +5363,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5360: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5367: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5379,7 +5386,7 @@ echo "configure:5360: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5383: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5390: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
diff --git a/configure.in b/configure.in
index 1bbf2ef4..3b2d9780 100644
--- a/configure.in
+++ b/configure.in
@@ -2188,19 +2188,26 @@ echo "
fi
])
-MOZ_CHECK_PTHREADS(pthreads,
- _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
- MOZ_CHECK_PTHREADS(pthread,
- _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
- MOZ_CHECK_PTHREADS(c_r,
- _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
- MOZ_CHECK_PTHREADS(c,
- _HAVE_PTHREADS=1
+case "$target_os" in
+darwin*)
+ _HAVE_PTHREADS=1
+ ;;
+*)
+ MOZ_CHECK_PTHREADS(pthreads,
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
+ MOZ_CHECK_PTHREADS(pthread,
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
+ MOZ_CHECK_PTHREADS(c_r,
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
+ MOZ_CHECK_PTHREADS(c,
+ _HAVE_PTHREADS=1
+ )
)
)
)
-)
-
+ ;;
+esac
+
AC_ARG_WITH(pthreads,
[ --with-pthreads Use system pthreads library as thread subsystem],
[ if test "$withval" = "yes"; then