Mercurial > mplayer.hg
comparison configure @ 24330:7fc72cf7f790
Fix AltiVec autodetection: The autodetection was overriding configure
command line options.
author | diego |
---|---|
date | Thu, 06 Sep 2007 09:36:01 +0000 |
parents | b4e723b181b7 |
children | c86529c4c63a |
comparison
equal
deleted
inserted
replaced
24329:9ecc80a7e56f | 24330:7fc72cf7f790 |
---|---|
480 _fast_cmov=auto | 480 _fast_cmov=auto |
481 _armv5te=auto | 481 _armv5te=auto |
482 _armv6=auto | 482 _armv6=auto |
483 _iwmmxt=auto | 483 _iwmmxt=auto |
484 _mtrr=auto | 484 _mtrr=auto |
485 _altivec=auto | |
485 _install=install | 486 _install=install |
486 _ranlib=ranlib | 487 _ranlib=ranlib |
487 _ldconfig=ldconfig | 488 _ldconfig=ldconfig |
488 _cc=cc | 489 _cc=cc |
489 _ar=ar | 490 _ar=ar |
2019 iproc='ppc' | 2020 iproc='ppc' |
2020 proc='' | 2021 proc='' |
2021 _march='' | 2022 _march='' |
2022 _mcpu='' | 2023 _mcpu='' |
2023 _optimizing='' | 2024 _optimizing='' |
2024 _altivec=no | |
2025 | 2025 |
2026 echocheck "CPU type" | 2026 echocheck "CPU type" |
2027 case $system_name in | 2027 case $system_name in |
2028 Linux) | 2028 Linux) |
2029 proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1` | 2029 proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1` |
2030 if test -n "`$_cpuinfo | grep altivec`"; then | 2030 if test -n "`$_cpuinfo | grep altivec`"; then |
2031 _altivec=yes | 2031 test $_altivec = auto && _altivec=yes |
2032 fi | 2032 fi |
2033 ;; | 2033 ;; |
2034 Darwin) | 2034 Darwin) |
2035 proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'` | 2035 proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'` |
2036 if [ `sysctl -n hw.vectorunit` -eq 1 -o \ | 2036 if [ `sysctl -n hw.vectorunit` -eq 1 -o \ |
2037 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then | 2037 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then |
2038 _altivec=yes | 2038 test $_altivec = auto && _altivec=yes |
2039 fi | 2039 fi |
2040 ;; | 2040 ;; |
2041 NetBSD) | 2041 NetBSD) |
2042 # only gcc 3.4 works reliably with AltiVec code under NetBSD | 2042 # only gcc 3.4 works reliably with AltiVec code under NetBSD |
2043 case $cc_version in | 2043 case $cc_version in |
2044 2*|3.0*|3.1*|3.2*|3.3*) | 2044 2*|3.0*|3.1*|3.2*|3.3*) |
2045 ;; | 2045 ;; |
2046 *) | 2046 *) |
2047 if [ `sysctl -n machdep.altivec` -eq 1 ]; then | 2047 if [ `sysctl -n machdep.altivec` -eq 1 ]; then |
2048 _altivec=yes | 2048 test $_altivec = auto && _altivec=yes |
2049 fi | 2049 fi |
2050 ;; | 2050 ;; |
2051 esac | 2051 esac |
2052 ;; | 2052 ;; |
2053 AIX) | 2053 AIX) |
2055 ;; | 2055 ;; |
2056 esac | 2056 esac |
2057 if test "$_altivec" = yes; then | 2057 if test "$_altivec" = yes; then |
2058 echores "$proc altivec" | 2058 echores "$proc altivec" |
2059 else | 2059 else |
2060 _altivec=no | |
2060 echores "$proc" | 2061 echores "$proc" |
2061 fi | 2062 fi |
2062 | 2063 |
2063 echocheck "GCC & CPU optimization abilities" | 2064 echocheck "GCC & CPU optimization abilities" |
2064 | 2065 |