aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-17 21:30:05 +0000
committerrsc <devnull@localhost>2005-01-17 21:30:05 +0000
commit7a2c88509bea849196ed4b77cf10512c4ff40cce (patch)
tree99f5c61c58ae8193173941e107c2f93351795702 /INSTALL
parent38c10d1abcab399ce3735ccf54672a5b6787165e (diff)
downloadplan9port-7a2c88509bea849196ed4b77cf10512c4ff40cce.tar.gz
plan9port-7a2c88509bea849196ed4b77cf10512c4ff40cce.tar.bz2
plan9port-7a2c88509bea849196ed4b77cf10512c4ff40cce.zip
allow config to override kernel version
Diffstat (limited to 'INSTALL')
-rwxr-xr-xINSTALL18
1 files changed, 18 insertions, 0 deletions
diff --git a/INSTALL b/INSTALL
index 209436a8..9a641aef 100755
--- a/INSTALL
+++ b/INSTALL
@@ -3,7 +3,25 @@
PLAN9=`pwd` export PLAN9
PATH=$PLAN9/bin:$PATH export PATH
+echo "Resetting $PLAN9/config"
+rm -f $PLAN9/config
+
(
+if [ `uname` = Linux ]; then
+ # On Linux, we use the kernel version to decide whether
+ # to use pthreads or not. On 2.6 versions that aren't
+ # linking with NPTL by default, pretend to be an older kernel.
+ echo "Running on Linux: checking for NPTL..."
+ gcc lib/linux-isnptl.c
+ if ./a.out
+ then
+ echo " NPTL found."
+ echo "SYSVERSION=2.6" >$PLAN9/config
+ else
+ echo " NPTL not found."
+ echo "SYSVERSION=2.4" >$PLAN9/config
+ fi
+fi
echo "Building mk..."
cd src
make