[MPlayer-dev-eng] [PATCH] allow disabling mplayer mp3lame linking

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Fri Oct 6 01:46:40 CEST 2006


On Friday, 06 October 2006 at 01:45, Dominik 'Rathann' Mierzejewski wrote:
> If libmp3lame is detected and mencoder is built with it, it also gets
> automatically enabled in libavcodec and mplayer gets linked with
> libmp3lame. There is currently no way to prevent that. The attached patch
> disables linking mplayer with mp3lame when --disable-encoder=mp3lame is
> passed to configure.

... this patch:

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
--- MPlayer-20075/Makefile.nolame	2006-10-05 22:22:24.000000000 +0200
+++ MPlayer-20075/Makefile	2006-10-06 00:56:22.000000000 +0200
@@ -99,7 +99,6 @@
              $(THEORA_LIB) \
              $(FAAD_LIB) \
              $(LIBLZO_LIB) \
-             $(DECORE_LIB) \
              $(XVID_LIB) \
              $(DTS_LIB) \
              $(PNG_LIB) \
@@ -112,6 +111,10 @@
              $(SPEEX_LIB) \
              $(NUT_LIB) \
 
+ifeq ($(LAVC_MP3LAME),yes)
+CODEC_LIBS += $(MP3LAME_LIB)
+endif
+
 ifeq ($(TOOLAME),yes)
 CODEC_LIBS += $(TOOLAME_LIB)
 endif
@@ -388,7 +391,7 @@
 
 ifeq ($(MENCODER),yes)
 LIBS_MENCODER = libmpcodecs/libmpencoders.a \
-                $(ENCORE_LIB) \
+                $(MP3LAME_LIB) \
                 $(COMMON_LIBS) \
 
 $(PRG_MENCODER): $(MENCODER_DEP)
--- MPlayer-20075/configure.nolame	2006-10-05 22:39:30.000000000 +0200
+++ MPlayer-20075/configure	2006-10-06 00:55:54.000000000 +0200
@@ -6591,6 +6591,7 @@
 int main(void) { int p = MEDIUM_FAST; return 0; }
 EOF
     cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium="#define HAVE_MP3LAME_PRESET_MEDIUM"
+    echo $_libavencoders | grep -q mp3lame && _lavc_mp3lame=yes || _lavc_mp3lame=no
   else
     _def_mp3lame='#undef HAVE_MP3LAME'
   fi
@@ -7525,9 +7526,9 @@
 NUT_LIB = $_ld_nut
 CONFIG_DTS = $_libdts
 DTS_LIB = $_ld_libdts
-DECORE_LIB = $_ld_mp3lame
 MENCODER = $_mencoder
-ENCORE_LIB = $_ld_mp3lame
+MP3LAME_LIB = $_ld_mp3lame
+LAVC_MP3LAME = $_lavc_mp3lame
 DIRECTFB_LIB = $_ld_directfb
 CDDA = $_cdda
 CDPARANOIA_LIB = $_ld_cdparanoia


More information about the MPlayer-dev-eng mailing list