changeset 34833:1e764ecad726

More robust detection of SPARC CPUs. Should also make it possible to cross-compile e.g. a 32-bit SPARC build on SPARC64 by using -m32.
author reimar
date Fri, 18 May 2012 18:30:35 +0000
parents 010b217fb8cd
children 2292b00862af
files configure
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Fri May 18 17:26:05 2012 +0000
+++ b/configure	Fri May 18 18:30:35 2012 +0000
@@ -270,6 +270,13 @@
   esac
 }
 
+sparc() {
+  case "$host_arch" in
+    sparc*) return 0;;
+    *) return 1;;
+  esac
+}
+
 alpha() {
   case "$host_arch" in
     alpha*) return 0;;
@@ -1510,8 +1517,7 @@
       ia64) host_arch=ia64 ;;
       macppc|ppc*|Power*) host_arch=ppc ;;
       alpha) host_arch=alpha ;;
-      sparc) host_arch=sparc ;;
-      sparc64) host_arch=sparc64 ;;
+      sun4*|sparc*) host_arch=sparc ;;
       parisc*|hppa*|9000*) host_arch=hppa ;;
       arm*|zaurus|cats) host_arch=arm ;;
       sh3|sh4|sh4a) host_arch=sh ;;
@@ -1720,6 +1726,9 @@
 if ppc ; then
   cc_check && host_arch=ppc64 || host_arch=ppc
 fi
+if sparc ; then
+  cc_check && host_arch=sparc64 || host_arch=sparc
+fi
 fi
 
 echo "Detected operating system: $system_name"