[MPlayer-dev-eng] [PATCH] detection for Zoran cards

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Jan 7 12:47:28 CET 2005


Hi,
On Tue, Jan 04, 2005 at 08:50:32PM +0100, Moritz Bunkus wrote:
> > Great, and how to find it? On SuSE it is not in the path...
> 
> if type -p lspci > /dev/null 2> /dev/null ; then
>   lspci_bin=lspci
> else
>   for path in /sbin /usr/sbin /bin /usr/bin /usr/local/sbin /usr/local/bin ; do
>     if text -x $path/lspci
>       lspci_bin=$path/lspci
>       break
>     fi
>   done
> fi
> 
> if test -n $lspci_bin ; then
>   # parse lspci output
> elif test -f /proc/pci ; then
>   # parse /proc/pci contents
> fi
> 
> Or sth like that.

Hmmm. Don't like that too much.
How about the attached patch?

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.950
diff -u -r1.950 configure
--- configure	6 Jan 2005 12:06:57 -0000	1.950
+++ configure	7 Jan 2005 11:47:24 -0000
@@ -5821,11 +5821,24 @@
 fi
 echores "$_libdv"
 
+echocheck "lspci"
+for d in "$_prefix/bin" "$_prefix/sbin" /sbin /usr/sbin /bin /usr/bin /usr/local/sbin /usr/local/bin ; do
+  if test -x $d/lspci ; then
+    _lspci_bin=$d/lspci
+    break
+  fi
+done
+if test -z "$_lspci_bin" ; then
+  echores "not found"
+else
+  echores "$_lspci_bin"
+fi
+
 echocheck "zr"
 if test "$_zr" = auto ; then
   #36067's seem to identify themselves as 36057PQC's, so the line 
   #below should work for 36067's and 36057's. 
-  if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc/pci > /dev/null 2>&1; then
+  if test -n "$_lspci_bin" && test -n "`$_lspci_bin -d 11de:6057`"; then
     _zr=yes 
   else
     _zr=no


More information about the MPlayer-dev-eng mailing list