comparison configure @ 16831:14185247b041

Simplification of the system_name check and the PPC CPU type check.
author diego
date Sun, 23 Oct 2005 12:39:47 +0000
parents 626e5ea95907
children 6196b2d0448a
comparison
equal deleted inserted replaced
16830:626e5ea95907 16831:14185247b041
475 # Determine our OS name and CPU architecture 475 # Determine our OS name and CPU architecture
476 if test -z "$_target" ; then 476 if test -z "$_target" ; then
477 # OS name 477 # OS name
478 system_name=`uname -s 2>&1` 478 system_name=`uname -s 2>&1`
479 case "$system_name" in 479 case "$system_name" in
480 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS) 480 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS)
481 ;; 481 ;;
482 IRIX*) 482 IRIX*)
483 system_name=IRIX 483 system_name=IRIX
484 ;; 484 ;;
485 HP-UX*) 485 HP-UX*)
488 [cC][yY][gG][wW][iI][nN]*) 488 [cC][yY][gG][wW][iI][nN]*)
489 system_name=CYGWIN 489 system_name=CYGWIN
490 ;; 490 ;;
491 MINGW32*) 491 MINGW32*)
492 system_name=MINGW32 492 system_name=MINGW32
493 ;;
494 MorphOS)
495 system_name=MorphOS
496 ;; 493 ;;
497 *) 494 *)
498 system_name="$system_name-UNKNOWN" 495 system_name="$system_name-UNKNOWN"
499 ;; 496 ;;
500 esac 497 esac
1134 _mcpu='' 1131 _mcpu=''
1135 _optimizing='' 1132 _optimizing=''
1136 _altivec=no 1133 _altivec=no
1137 1134
1138 echocheck "CPU type" 1135 echocheck "CPU type"
1139 if linux && test -n "$_cpuinfo"; then 1136 case $system_name in
1137 Linux)
1140 proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1` 1138 proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1141 if test -n "`$_cpuinfo | grep altivec`"; then 1139 if test -n "`$_cpuinfo | grep altivec`"; then
1142 _altivec=yes 1140 _altivec=yes
1143 fi 1141 fi
1144 fi 1142 ;;
1145 if darwin ; then 1143 Darwin)
1146 proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'` 1144 proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1147 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then 1145 if [ `sysctl -n hw.vectorunit` -eq 1 -o
1148 _altivec=yes 1146 "`sysctl -n hw.optional.altivec 2>/dev/null`" -eq 1 ]; then
1149 elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then
1150 _altivec=yes 1147 _altivec=yes
1151 fi 1148 fi
1152 fi 1149 ;;
1153 # only gcc 3.4 works reliably with altivec code under netbsd 1150 NetBSD)
1154 if netbsd ; then 1151 # only gcc 3.4 works reliably with AltiVec code under NetBSD
1155 case $cc_version in 1152 case $cc_version in
1156 2*|3.0*|3.1*|3.2*|3.3*) 1153 2*|3.0*|3.1*|3.2*|3.3*)
1157 ;; 1154 ;;
1158 *) 1155 *)
1159 if [ `sysctl -n machdep.altivec` -eq 1 ]; then 1156 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1160 _altivec=yes 1157 _altivec=yes
1161 fi 1158 fi
1162 ;; 1159 ;;
1163 esac 1160 esac
1164 fi 1161 ;;
1162 esac
1165 if test "$_altivec" = yes; then 1163 if test "$_altivec" = yes; then
1166 echores "$proc altivec" 1164 echores "$proc altivec"
1167 else 1165 else
1168 echores "$proc" 1166 echores "$proc"
1169 fi 1167 fi