[Mplayer-users] Bug in configure script for SMP machines

Kees Cook kees at outflux.net
Fri Jul 20 08:15:43 CEST 2001


Could you please incorporate this patch to your "configure" script?  
"configure" fails to detect my CPU because it doesn't expect two CPUs 
listed in /proc/cpuinfo.

Thanks!



-- 
Kees Cook                                            @outflux.net
-------------- next part --------------
--- MPlayer-0.18pre5/configure	Fri Jul  6 15:00:22 2001
+++ MPlayer-0.18pre5-kees/configure	Fri Jul 20 01:13:31 2001
@@ -338,15 +338,15 @@
 	_cpuinfo="TOOLS/cpuinfo"
 fi
 
-pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2`
-pparam=`$_cpuinfo | grep 'features' | cut -d ':' -f 2`
+pname=`$_cpuinfo | grep 'model name' | head -1 | cut -d ':' -f 2`
+pparam=`$_cpuinfo | grep 'features' | head -1 | cut -d ':' -f 2`
 if [ -z "$pparam" ]; then
-  pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2`
+  pparam=`$_cpuinfo | grep 'flags' | head -1 | cut -d ':' -f 2`
 fi
-pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2  | cut -d ' ' -f 2`
-pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2`
-pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2`
-pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2`
+pvendor=`$_cpuinfo | grep 'vendor_id' | head -1 | cut -d ':' -f 2  | cut -d ' ' -f 2`
+pfamily=`$_cpuinfo | grep 'cpu family' | head -1 | cut -d ':' -f 2 | cut -d ' ' -f 2`
+pmodel=`$_cpuinfo | grep -v 'model name' | head -1 | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2`
+pstepping=`$_cpuinfo | grep 'stepping' | head -1 | cut -d ':' -f 2 | cut -d ' ' -f 2`
 
 _mmx=no
 _mmx2=no


More information about the MPlayer-users mailing list