[MPlayer-dev-eng] [PATCH] make mplayer's liblzo support compile with lzo 2.x

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Jan 26 17:08:20 CET 2007


Hi Bernhard!

On 2007-01-17 14:29, Bernhard Rosenkraenzer wrote:
> SSIA -- the patch is about as simple as it can get, given the API is almost 
> unchanged.

Unfortunately, Oberhumer decided to change the installation directory for 
lzo1x.h to .../include/lzo for version 2:  
http://www.oberhumer.com/opensource/lzo/lzonews.php (Misc), so I don't think 
your patch will help for typical(?) installations.

But why keep support for liblzo1? Most libraries are only supported by mplayer 
if their newest versions are used. What about the attached patch?

Carl Eugen
-------------- next part --------------
Index: configure
===================================================================
--- configure	(Revision 22020)
+++ configure	(Arbeitskopie)
@@ -5609,14 +5609,14 @@
 if test "$_liblzo" = auto ; then
   _liblzo=no
   cat > $TMPC << EOF
-#include <lzo1x.h>
+#include <lzo/lzo1x.h>
 int main(void) { lzo_init();return 0; }
 EOF
-  cc_check -llzo && _liblzo=yes
+  cc_check -llzo2 && _liblzo=yes
 fi
 if test "$_liblzo" = yes ; then
   _def_liblzo='#define USE_LIBLZO 1'
-  _ld_extra="$_ld_extra -llzo"
+  _ld_extra="$_ld_extra -llzo2"
   _codecmodules="liblzo $_codecmodules"
 else
   _def_liblzo='#undef USE_LIBLZO'
Index: libmpcodecs/vd_lzo.c
===================================================================
--- libmpcodecs/vd_lzo.c	(Revision 22020)
+++ libmpcodecs/vd_lzo.c	(Arbeitskopie)
@@ -7,12 +7,12 @@
 #include "vd_internal.h"
 
 #ifdef USE_LIBLZO
-#include <lzo1x.h>
+#include <lzo/lzo1x.h>
 #else
 #include "native/minilzo.h"
+#endif
 #define lzo_malloc malloc
 #define lzo_free free
-#endif
 
 #define MOD_NAME "DecLZO"
 
Index: libmpdemux/demux_mkv.c
===================================================================
--- libmpdemux/demux_mkv.c	(Revision 22020)
+++ libmpdemux/demux_mkv.c	(Arbeitskopie)
@@ -37,7 +37,7 @@
 #endif
 
 #ifdef USE_LIBLZO
-#include <lzo1x.h>
+#include <lzo/lzo1x.h>
 #else
 #include "libmpcodecs/native/minilzo.h"
 #endif


More information about the MPlayer-dev-eng mailing list