From 308c212c312787855532a1a0b85f986cbb0662b0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 24 Feb 2009 14:14:40 +0000 Subject: [PATCH] Patch by Matt Madia: Added automatic detection of 32 or 64 bit mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29314 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- configure | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure b/configure index d873ee911f..ef162f52d1 100755 --- a/configure +++ b/configure @@ -238,6 +238,7 @@ cd "$currentDir" # default parameter values # platform=`uname` +platform_machine=`uname -m` haikuGCCVersion= haikuGCCMachine=i586-pc-haiku haikuStaticLibStdCxx= @@ -335,6 +336,13 @@ while [ $# -gt 0 ] ; do esac done +# check for a 64bit platform +case "${platform_machine}" in + x86_64) use_32bit=1 ;; + *) echo Assuming 32-bit machine: "$platform_machine" + use_32bit=0 ;; +esac + # detect the build platform case "${platform}" in BeOS) revision=`uname -r` @@ -348,7 +356,11 @@ case "${platform}" in esac ;; Darwin) buildPlatform=darwin ;; - FreeBSD) buildPlatform=freebsd ;; + FreeBSD) buildPlatform=freebsd + if [ "$use_32bit" = 1 ] ; then + echo Unsupported platform: FreeBSD ${platform_machine} + exit 1 + fi ;; Haiku) buildPlatform=haiku_host ;; Linux) buildPlatform=linux ;; OpenBSD) buildPlatform=openbsd ;;