--- orig/configure Tue May 5 16:02:59 2009 +++ patched/configure Wed May 6 12:45:35 2009 @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # # Original version (C) 2000 Pontscho/fresh!mindworkz # pontscho@makacs.poliod.hu @@ -1327,7 +1327,7 @@ # Determine our OS name and CPU architecture if test -z "$_target" ; then # OS name - system_name=$(uname -s 2>&1) + system_name=`uname -s 2>&1` case "$system_name" in Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS) ;; @@ -1356,7 +1356,7 @@ # host's CPU/instruction set - host_arch=$(uname -p 2>&1) + host_arch=$`uname -p 2>&1` case "$host_arch" in i386|sparc|ppc|alpha|arm|mips|vax) ;; @@ -1370,7 +1370,7 @@ # recognize. # x86/x86pc is used by QNX - case "$(uname -m 2>&1)" in + case "`uname -m 2>&1`" in i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; ia64) host_arch=ia64 ;; x86_64|amd64) @@ -1390,7 +1390,7 @@ sh3|sh4|sh4a) host_arch=sh ;; s390) host_arch=s390 ;; s390x) host_arch=s390x ;; - mips*) host_arch=mips ;; + mips*|IP*) host_arch=mips ;; # SGI machines are IP* vax) host_arch=vax ;; xtensa*) host_arch=xtensa ;; *) host_arch=UNKNOWN ;; @@ -1555,6 +1555,17 @@ echores "$cc_version" break fi + if test "$cc_name_tmp" = "MIPSpro"; then + mipspro="true" + cc_name=$cc_name_tmp + cc_vendor=SGI + cc_version=`$_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 4` + _cc_major=$(echo $cc_version | cut -d '.' -f 1) + _cc_minor=$(echo $cc_version | cut -d '.' -f 2) + _cc_mini=$(echo $cc_version | cut -d '.' -f 3) + echores "$cc_version" + break + fi done fi # icc test "$cc_fail" = yes && die "unsupported compiler version" @@ -2240,9 +2251,9 @@ _target_arch='ARCH_SGI_MIPS = yes' iproc='sgi-mips' - if irix ; then + if irix && !($mipspro = "true") ; then # GCC on IRIX? Why? echocheck "CPU type" - proc=$(hinv -c processor | grep CPU | cut -d " " -f3) + proc=`hinv -c processor | grep CPU | cut -d " " -f3` case "$(echo $proc)" in R3000) _march='-mips1' _mcpu='-mtune=r2000' ;; R4000) _march='-mips3' _mcpu='-mtune=r4000' ;; @@ -2256,6 +2267,8 @@ _mcpu='' fi echores "$proc" + else + echo "MIPSpro C compiler detected, optimization flags left undefined." fi ;; @@ -4838,15 +4851,11 @@ fi #if darwin - +# IRIX builtin libpng is not GNU, but that was in the long long ago. +# Modern IRIX systems should have the Nekoware libpng available. echocheck "PNG support" if test "$_png" = auto ; then - _png=no - if irix ; then - # Don't check for -lpng on irix since it has its own libpng - # incompatible with the GNU libpng - _res_comment="disabled on irix (not GNU libpng)" - else +_png=no cat > $TMPC << EOF #include #include @@ -4864,7 +4873,7 @@ fi fi fi -fi + echores "$_png" if test "$_png" = yes ; then def_png='#define CONFIG_PNG 1'