[MPlayer-dev-eng] [PATCH] require static libswscale for mga

Reinhard Tartler siretart at tauware.de
Thu Jun 3 20:18:24 CEST 2010


Hi,

Since I don't expect anyone to actually fix the mgadrivers to actually
avoid swscale internals and stick to the public API, this patch makes
configure require a static libswscale for the mga drivers. It is
inspired a bit by uotis mplayer-git branch, but doesn't introduce his
LIBSWSCALE_INTERNALS variable. Instead, this check just checks the
variable $_libswscale_a.

Another option would be to just remove the mga drivers, but there still
seem to be users around that actually use this.

I'm aware that this patch moves the mga check fairly to the
bottom. However, I think this clarifies the issue a bit in case this
check engages:

[...]
Checking for RTMPDump Streaming Media library ... yes 
Checking for FFmpeg libavutil ... yes (static)
Checking for FFmpeg libavcodec ... yes (static)
Checking for FFmpeg libavformat ... yes (static)
Checking for FFmpeg libpostproc ... yes (static)
Checking for FFmpeg libswscale ... yes (using libswscale.so, but static libswscale is recommended)
Checking for /dev/mga_vid ... mga requires libswscale.a 
Checking for xmga ... no 
Checking for libopencore_amr narrowband ... no 
[...]

Index: configure
===================================================================
--- configure	(revision 31303)
+++ configure	(working copy)
@@ -4782,35 +4782,7 @@
   novomodules="xvidix $novomodules"
 fi
 
-echocheck "/dev/mga_vid"
-if test "$_mga" = auto ; then
-  _mga=no
-  test -c /dev/mga_vid && _mga=yes
-fi
-if test "$_mga" = yes ; then
-  def_mga='#define CONFIG_MGA 1'
-  vomodules="mga $vomodules"
-else
-  def_mga='#undef CONFIG_MGA'
-  novomodules="mga $novomodules"
-fi
-echores "$_mga"
 
-echocheck "xmga"
-if test "$_xmga" = auto ; then
-  _xmga=no
-  test "$_x11" = yes && test "$_mga" = yes && _xmga=yes
-fi
-if test "$_xmga" = yes ; then
-  def_xmga='#define CONFIG_XMGA 1'
-  vomodules="xmga $vomodules"
-else
-  def_xmga='#undef CONFIG_XMGA'
-  novomodules="xmga $novomodules"
-fi
-echores "$_xmga"
-
-
 echocheck "GGI"
 if test "$_ggi" = auto ; then
   cat > $TMPC << EOF
@@ -7431,6 +7403,46 @@
   && def_libswscale_so='#define CONFIG_LIBSWSCALE_SO 1'
 echores "$_libswscale"
 
+echocheck "/dev/mga_vid"
+if test "$_mga" = auto ; then
+  _mga=no
+  test -c /dev/mga_vid && _mga=yes
+fi
+if test "$_mga" = yes ; then
+  if test "$_libswscale_a" = no ; then
+    _mga=no
+    echores "mga requires libswscale.a"
+  else
+    def_mga='#define CONFIG_MGA 1'
+    vomodules="mga $vomodules"
+    echores "$_mga"
+  fi
+else
+  def_mga='#undef CONFIG_MGA'
+  novomodules="mga $novomodules"
+  echores "$_mga"
+fi
+
+echocheck "xmga"
+if test "$_xmga" = auto ; then
+  _xmga=no
+  test "$_x11" = yes && test "$_mga" = yes && _xmga=yes
+fi
+if test "$_xmga" = yes ; then
+  if test "$_libswscale_a" = no ; then
+    _xmga=no
+    echores "mga requires libswscale.a"
+  else
+    def_xmga='#define CONFIG_XMGA 1'
+    vomodules="xmga $vomodules"
+    echores "$_xmga"
+  fi
+else
+  def_xmga='#undef CONFIG_XMGA'
+  novomodules="xmga $novomodules"
+  echores "$_xmga"
+fi
+
 echocheck "libopencore_amr narrowband"
 if test "$_libopencore_amrnb" = auto ; then
   _libopencore_amrnb=no

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



More information about the MPlayer-dev-eng mailing list