summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authoraliguori2009-01-26 16:37:40 +0100
committeraliguori2009-01-26 16:37:40 +0100
commit1b0f9cc26bf2ebc13067a42a4caed84833f72a7c (patch)
treeadfdaa6543a0447ace37b9f45a9b795c0c70b8d6 /configure
parentDefine PCI vendor and device IDs in pci.h (Stuart Brady) (diff)
downloadqemu-1b0f9cc26bf2ebc13067a42a4caed84833f72a7c.tar.gz
qemu-1b0f9cc26bf2ebc13067a42a4caed84833f72a7c.tar.xz
qemu-1b0f9cc26bf2ebc13067a42a4caed84833f72a7c.zip
Enabled building of x86_64 code on Mac OS X (Alexander Graf)
Mac OS X 10.5 supports 64-bit userspace on an x86_64 kernel and by default uses 32-bit userspace applications, so the detection for the host architecture fails. This patch enabled building of x86_64 code on x86_64 capable CPUS with Mac OS X. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6443 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure b/configure
index 3c9d83233c..c3fbbbeb03 100755
--- a/configure
+++ b/configure
@@ -243,11 +243,21 @@ oss_lib="-lossaudio"
Darwin)
bsd="yes"
darwin="yes"
+# on Leopard most of the system is 32-bit, so we have to ask the kernel it if we can run 64-bit userspace code
+is_x86_64=`sysctl -n hw.optional.x86_64`
+if [ "$is_x86_64" = "1" ]; then
+ cpu=x86_64
+fi
+if [ "$cpu" = "x86_64" ] ; then
+ OS_CFLAGS="-arch x86_64"
+ LDFLAGS="-arch x86_64"
+else
+ OS_CFLAGS="-mdynamic-no-pic"
+fi
darwin_user="yes"
cocoa="yes"
audio_drv_list="coreaudio"
audio_possible_drivers="coreaudio sdl fmod"
-OS_CFLAGS="-mdynamic-no-pic"
OS_LDFLAGS="-framework CoreFoundation -framework IOKit"
;;
SunOS)