If HOSTTYPE is not set, try to use uname -m to detect architecture

This was SVN commit r7010.
This commit is contained in:
Simon Brenner 2009-07-17 21:28:03 +00:00
parent 10fb4c12e7
commit 16d843a001

View File

@ -18,7 +18,14 @@ if OS == "windows" then
arch = "amd64"
end
else
if os.getenv("HOSTTYPE") == "x86_64" then
arch = os.getenv("HOSTTYPE")
if not arch then
os.execute("uname -m > .hosttype.tmp")
local f = io.open(".hosttype.tmp","r")
arch = f:read("*line")
f:close()
end
if arch == "x86_64" then
arch = "amd64"
end
end