summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1998-11-02 12:03:08 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1998-11-02 12:03:08 +0000
commit136666271df3fddb92143e6fabf3bda463294b22 (patch)
treed69fb4f92512aab015299f2dc0c4f64dc6f0177f /Configure
parentbc7f168bb73cba32db370bbcde1be14a357b5bd8 (diff)
downloadperl-136666271df3fddb92143e6fabf3bda463294b22.tar.gz
Replace ATTR_JOINABLE with true Configure probe
for PTHREAD_CREATE_JOINABLE (or equivalent: PTHREAD_CREATE_UNDETACHED or __UNDETACHED). Remove ATTR_JOINABLE itself: Thread.xs uses PTHREAD_CREATE_JOINABLE (or equivalent) directly. Really scan for <mach/cthreads.h> only if usethreads. p4raw-id: //depot/cfgperl@2181
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure72
1 files changed, 69 insertions, 3 deletions
diff --git a/Configure b/Configure
index f0c31da387..d6e95555ff 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed Oct 28 11:58:44 EET 1998 [metaconfig 3.0 PL70]
+# Generated on Mon Nov 2 13:57:54 EET 1998 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by jhi@iki.fi)
cat >/tmp/c1$$ <<EOF
@@ -409,6 +409,8 @@ d_pause=''
d_pipe=''
d_poll=''
d_portable=''
+d_pthread_create_joinable=''
+pthread_create_joinable=''
d_pthread_yield=''
d_sched_yield=''
sched_yield=''
@@ -8176,6 +8178,62 @@ eval $inlibc
set poll d_poll
eval $inlibc
+: how to create joinable pthreads
+if test "X$usethreads" = "X$define"; then
+ echo " "
+ echo "Checking what constant to use for creating joinable pthreads..." >&4
+ $cat >try.c <<'EOCP'
+#include <pthread.h>
+int main() {
+ int detachstate = JOINABLE;
+}
+EOCP
+ set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
+ if eval $compile; then
+ echo "You seem to use PTHREAD_CREATE_JOINABLE." >&2
+ val="$undef"
+ set d_pthread_create_joinable
+ eval $setvar
+ val=0
+ set pthread_create_joinable
+ eval $setvar
+ else
+ set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
+ if eval $compile; then
+ echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&2
+ val="$define"
+ set d_pthread_create_joinable
+ eval $setvar
+ val=PTHREAD_CREATE_UNDETACHED
+ set pthread_create_joinable
+ eval $setvar
+ else
+ set try -DJOINABLE=__UNDETACHED
+ if eval $compile; then
+ echo "You seem to use __UNDETACHED." >&2
+ val="$define"
+ set d_pthread_create_joinable
+ eval $setvar
+ val=__UNDETACHED
+ set pthread_create_joinable
+ eval $setvar
+ else
+ echo "Egads, nothing obvious found. Guessing that you use 0." >&2
+ val="$define"
+ set d_pthread_create_joinable
+ eval $setvar
+ val=0
+ set pthread_create_joinable
+ eval $setvar
+ fi
+ fi
+ fi
+ $rm -f try try.*
+else
+ d_pthread_create_joinable="$undef"
+ pthread_create_joinable=0
+fi
+
: see whether the various POSIXish _yields exist
$cat >try.c <<EOP
@@ -11382,8 +11440,14 @@ set locale.h i_locale
eval $inhdr
: see if mach cthreads are available
-set mach/cthreads.h i_machcthr
-eval $inhdr
+if test "X$usethreads" = "X$define"; then
+ set mach/cthreads.h i_machcthr
+ eval $inhdr
+else
+ i_machcthr="$undef"
+fi
+
+
: see if this is a math.h system
set math.h i_math
@@ -12299,6 +12363,7 @@ d_phostname='$d_phostname'
d_pipe='$d_pipe'
d_poll='$d_poll'
d_portable='$d_portable'
+d_pthread_create_joinable='$d_pthread_create_joinable'
d_pthread_yield='$d_pthread_yield'
d_pwage='$d_pwage'
d_pwchange='$d_pwchange'
@@ -12604,6 +12669,7 @@ prefixexp='$prefixexp'
privlib='$privlib'
privlibexp='$privlibexp'
prototype='$prototype'
+pthread_create_joinable='$pthread_create_joinable'
ptrsize='$ptrsize'
randbits='$randbits'
randfunc='$randfunc'