]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Solaris x86_64 configure patch, by Ben Taylor.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 16 Sep 2007 22:12:39 +0000 (22:12 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 16 Sep 2007 22:12:39 +0000 (22:12 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3176 c046a42c-6fe2-441c-8c8c-71466251a162

configure

index 49bf8b6fcf8c01a7d202d0d75b14c1a28dddbc2f..7b8ac31dcb1963121ec7c0856d8155bab2b81267 100755 (executable)
--- a/configure
+++ b/configure
@@ -155,6 +155,12 @@ SunOS)
     install="ginstall"
     needs_libsunmath="no"
     solarisrev=`uname -r | cut -f2 -d.`
+    # have to select again, because `uname -m` returns i86pc
+    # even on an x86_64 box.
+    solariscpu=`isainfo -k`
+    if test "${solariscpu}" = "amd64" ; then
+        cpu="x86_64"
+    fi
     if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
         if test "$solarisrev" -le 9 ; then
             if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then
@@ -333,6 +339,16 @@ case $cpu in
            ;;
 esac
 
+if [ "$solaris" = "yes" -a  "$cpu" = "x86_64" ] ; then
+    CFLAGS="${CFLAGS} -m64"
+    OS_CFLAGS="${OS_CFLAGS} -m64"
+fi
+
+if [ "$solaris" = "yes" -a  "$cpu" = "i386" ] ; then
+    CFLAGS="${CFLAGS} -m32"
+    OS_CFLAGS="${OS_CFLAGS} -m32"
+fi
+
 if test x"$show_help" = x"yes" ; then
 cat << EOF