mirror of https://github.com/mpv-player/mpv
Simplification of the system_name check and the PPC CPU type check.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16832 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
268c88a4fb
commit
76c7a0e9d7
|
@ -477,7 +477,7 @@ if test -z "$_target" ; then
|
||||||
# OS name
|
# OS name
|
||||||
system_name=`uname -s 2>&1`
|
system_name=`uname -s 2>&1`
|
||||||
case "$system_name" in
|
case "$system_name" in
|
||||||
Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS)
|
Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS)
|
||||||
;;
|
;;
|
||||||
IRIX*)
|
IRIX*)
|
||||||
system_name=IRIX
|
system_name=IRIX
|
||||||
|
@ -491,9 +491,6 @@ if test -z "$_target" ; then
|
||||||
MINGW32*)
|
MINGW32*)
|
||||||
system_name=MINGW32
|
system_name=MINGW32
|
||||||
;;
|
;;
|
||||||
MorphOS)
|
|
||||||
system_name=MorphOS
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
system_name="$system_name-UNKNOWN"
|
system_name="$system_name-UNKNOWN"
|
||||||
;;
|
;;
|
||||||
|
@ -1136,22 +1133,22 @@ EOF
|
||||||
_altivec=no
|
_altivec=no
|
||||||
|
|
||||||
echocheck "CPU type"
|
echocheck "CPU type"
|
||||||
if linux && test -n "$_cpuinfo"; then
|
case $system_name in
|
||||||
|
Linux)
|
||||||
proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
|
proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
|
||||||
if test -n "`$_cpuinfo | grep altivec`"; then
|
if test -n "`$_cpuinfo | grep altivec`"; then
|
||||||
_altivec=yes
|
_altivec=yes
|
||||||
fi
|
fi
|
||||||
fi
|
;;
|
||||||
if darwin ; then
|
Darwin)
|
||||||
proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
|
proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
|
||||||
if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
|
if [ `sysctl -n hw.vectorunit` -eq 1 -o
|
||||||
_altivec=yes
|
"`sysctl -n hw.optional.altivec 2>/dev/null`" -eq 1 ]; then
|
||||||
elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then
|
|
||||||
_altivec=yes
|
_altivec=yes
|
||||||
fi
|
fi
|
||||||
fi
|
;;
|
||||||
# only gcc 3.4 works reliably with altivec code under netbsd
|
NetBSD)
|
||||||
if netbsd ; then
|
# only gcc 3.4 works reliably with AltiVec code under NetBSD
|
||||||
case $cc_version in
|
case $cc_version in
|
||||||
2*|3.0*|3.1*|3.2*|3.3*)
|
2*|3.0*|3.1*|3.2*|3.3*)
|
||||||
;;
|
;;
|
||||||
|
@ -1161,7 +1158,8 @@ EOF
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
if test "$_altivec" = yes; then
|
if test "$_altivec" = yes; then
|
||||||
echores "$proc altivec"
|
echores "$proc altivec"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue