allow config to override kernel version

This commit is contained in:
rsc 2005-01-17 21:30:05 +00:00
parent 38c10d1abc
commit 7a2c88509b
5 changed files with 39 additions and 3 deletions

18
INSTALL
View file

@ -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