# HG changeset patch # User reimar # Date 1337365835 0 # Node ID 1e764ecad726f3d55c9e786b77a589e54cf4a740 # Parent 010b217fb8cde403ef6fe4cd3a0901cb237526ee 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. diff -r 010b217fb8cd -r 1e764ecad726 configure --- 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"