summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure8
-rw-r--r--hints/linux.sh12
2 files changed, 19 insertions, 1 deletions
diff --git a/Configure b/Configure
index 19a7e169a2..36f446b611 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 d458c49f80..54bc12295c 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