aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'INSTALL')
-rwxr-xr-xINSTALL22
1 files changed, 20 insertions, 2 deletions
diff --git a/INSTALL b/INSTALL
index 5f18e28f..e9928ca9 100755
--- a/INSTALL
+++ b/INSTALL
@@ -54,14 +54,32 @@ if [ `uname` = Linux ]; then
if ./a.out >/dev/null
then
echo " NPTL found."
- echo "SYSVERSION=2.6.x" >$PLAN9/config
+ echo "SYSVERSION=2.6.x" >>$PLAN9/config
else
echo " NPTL not found."
- echo "SYSVERSION=2.4.x" >$PLAN9/config
+ echo "SYSVERSION=2.4.x" >>$PLAN9/config
fi
rm -f ./a.out
fi
+if [ `uname` = Darwin ]; then
+ # On Darwin, uname -m -p cannot be trusted.
+ echo "* Running on Darwin: checking architecture..."
+ rm -f ./a.out
+ gcc lib/darwin-main.c >/dev/null 2>&1
+ case "$(file ./a.out 2>/dev/null)" in
+ *x86_64*)
+ echo " x86-64 found."
+ echo "OBJTYPE=x86_64" >>$PLAN9/config
+ ;;
+ *i386*)
+ echo " i386 found."
+ echo "OBJTYPE=386" >>$PLAN9/config
+ ;;
+ esac
+ rm -f ./a.out
+fi
+
if [ -f LOCAL.config ]; then
echo Using LOCAL.config options:
sed 's/^/ /' LOCAL.config