summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>2005-09-02 02:41:10 +0000
committercls%seawood.org <devnull@localhost>2005-09-02 02:41:10 +0000
commit055d04f5e3b23d6c4c84a5a4e66f618dfc8b481e (patch)
treede60578861ba4946df989e3abfe20771eeedd687
parentb32c6cc8da163788cbb5b675ab86aebb8d24c580 (diff)
downloadnspr-hg-055d04f5e3b23d6c4c84a5a4e66f618dfc8b481e.tar.gz
Skip libpthread check in Darwin builds
Bug #212708 r=wtc
-rwxr-xr-xconfigure29
-rw-r--r--configure.in27
2 files changed, 35 insertions, 21 deletions
diff --git a/configure b/configure
index c0ab40d7..3e2a2e9d 100755
--- a/configure
+++ b/configure
@@ -5155,9 +5155,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:5161: checking for pthread_create in -lpthreads" >&5
+echo "configure:5166: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5179,7 +5184,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5183: checking for pthread_create in -lpthread" >&5
+echo "configure:5188: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5201,7 +5206,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5205: checking for pthread_create in -lc_r" >&5
+echo "configure:5210: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5223,7 +5228,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5227: checking for pthread_create in -lc" >&5
+echo "configure:5232: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5241,22 +5246,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"
@@ -5375,7 +5382,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:5379: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5386: 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
@@ -5398,7 +5405,7 @@ echo "configure:5379: 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:5402: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5409: 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 29529fbc..6a1a3682 100644
--- a/configure.in
+++ b/configure.in
@@ -2195,19 +2195,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