CVS change done by Diego Biurrun CVS Update of /cvsroot/mplayer/main In directory mail:/var2/tmp/cvs-serv3293 Modified Files: configure Log Message: Simplification of the system_name check and the PPC CPU type check. Index: configure =================================================================== RCS file: /cvsroot/mplayer/main/configure,v retrieving revision 1.1089 retrieving revision 1.1090 diff -u -r1.1089 -r1.1090 --- configure 23 Oct 2005 11:26:36 -0000 1.1089 +++ configure 23 Oct 2005 12:39:47 -0000 1.1090 @@ -477,7 +477,7 @@ # OS name system_name=`uname -s 2>&1` 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*) system_name=IRIX @@ -491,9 +491,6 @@ MINGW32*) system_name=MINGW32 ;; - MorphOS) - system_name=MorphOS - ;; *) system_name="$system_name-UNKNOWN" ;; @@ -1136,22 +1133,22 @@ _altivec=no 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` if test -n "`$_cpuinfo | grep altivec`"; then _altivec=yes fi - fi - if darwin ; then + ;; + Darwin) proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'` - if [ `sysctl -n hw.vectorunit` -eq 1 ]; then - _altivec=yes - elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then + if [ `sysctl -n hw.vectorunit` -eq 1 -o + "`sysctl -n hw.optional.altivec 2>/dev/null`" -eq 1 ]; then _altivec=yes fi - fi - # only gcc 3.4 works reliably with altivec code under netbsd - if netbsd ; then + ;; + NetBSD) + # only gcc 3.4 works reliably with AltiVec code under NetBSD case $cc_version in 2*|3.0*|3.1*|3.2*|3.3*) ;; @@ -1161,7 +1158,8 @@ fi ;; esac - fi + ;; + esac if test "$_altivec" = yes; then echores "$proc altivec" else
Hi,
+ ;; + Darwin) proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'` - if [ `sysctl -n hw.vectorunit` -eq 1 ]; then - _altivec=yes - elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then + if [ `sysctl -n hw.vectorunit` -eq 1 -o + "`sysctl -n hw.optional.altivec 2>/dev/null`" -eq 1 ]; then _altivec=yes fi
I'm not really familiar with shell scripting, but -o means fallback or what? Because originally it tried hw.vectorunit first, later hw.optional.altivec as this changing in some MacOSX version. Or we are not going to support old OSX releases? -- Alex Beregszaszi email: alex@fsn.hu Free Software Network cell: +36 70 3144424
On Wed, Nov 02, 2005 at 10:12:11PM +0100, Alex Beregszaszi wrote:
- if [ `sysctl -n hw.vectorunit` -eq 1 ]; then - _altivec=yes - elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then + if [ `sysctl -n hw.vectorunit` -eq 1 -o + "`sysctl -n hw.optional.altivec 2>/dev/null`" -eq 1 ]; then _altivec=yes
I'm not really familiar with shell scripting, but -o means fallback or what?
Yes. It's the same as an OR relationship in logic.
Because originally it tried hw.vectorunit first, later hw.optional.altivec as this changing in some MacOSX version.
It still does. The semantics have not changed, just the syntax.
Or we are not going to support old OSX releases?
Dunno if MPlayer compiles/runs on Mac OS X < 10.3. Diego
participants (3)
-
Alex Beregszaszi -
Diego Biurrun -
syncmail@mplayerhq.hu