From: Malcolm Beattie Date: Wed, 1 Oct 1997 17:04:12 +0000 (+0000) Subject: Start of Configure support for -Dusethreads plus associated X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc66995c1ead9543241b576ecca9933210bf2cd5;p=p5sagit%2Fp5-mst-13.2.git Start of Configure support for -Dusethreads plus associated Linux hints. p4raw-id: //depot/perl@88 --- diff --git a/Configure b/Configure index 19a7e16..36f446b 100755 --- a/Configure +++ b/Configure @@ -209,6 +209,7 @@ tr='' troff='' uname='' uniq='' +usethreads='' uuname='' vi='' zcat='' @@ -2085,7 +2086,12 @@ case "$archname" in esac rp='What is your architecture name' . ./myread -archname="$ans" +case "$usethreads" in +$define) archname="$ans-thread" + echo "usethreads selected... architecture name is now $archname." >&4 + ;; +*) archname="$ans" ;; +esac myarchname="$tarch" : is AFS running? diff --git a/hints/linux.sh b/hints/linux.sh index d458c49..54bc122 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -182,3 +182,15 @@ then else echo 'Your csh is really tcsh. Good.' fi + +if [ "X$usethreads" != "X" ]; then + ccflags="-D_REENTRANT -DUSE_THREADS $ccflags" + cppflags="-D_REENTRANT -DUSE_THREADS $cppflags" + # -lpthread needs to come before -lc but after other libraries such + # as -lgdbm and such like. We assume here that -lc is present in + # libswanted. If that fails to be true in future, then this can be + # changed to add pthread to the very end of libswanted. + set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` + shift + libswanted="$*" +fi