Improve architecture auto-detection.

This commit is contained in:
Chris Lamb 2008-08-31 23:46:38 +01:00 committed by Daniel Baumann
parent 2cf18ef7f3
commit 5a4b8ca4f9
1 changed files with 12 additions and 2 deletions

View File

@ -237,8 +237,18 @@ Set_defaults ()
then
LH_ARCHITECTURE="$(dpkg --print-architecture)"
else
Echo_warning "Can't process file /usr/bin/dpkg, setting architecture to i386"
LH_ARCHITECTURE="i386"
case "$(uname -m)" in
sparc|powerpc)
LH_ARCHITECTURE="$(uname -m)"
;;
x86_64)
LH_ARCHITECTURE="amd64"
;;
*)
Echo_warning "Can't determine architecture, assuming i386"
LH_ARCHITECTURE="i386"
;;
esac
fi
fi