[Mplayer-cvslog] CVS: main configure,1.319,1.320

Arpi of Ize arpi at mplayer.dev.hu
Thu Dec 6 23:26:44 CET 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv15080

Modified Files:
	configure 
Log Message:
mp3lame detection separated, some unneeded -lm removed

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -r1.319 -r1.320
--- configure	5 Dec 2001 16:48:36 -0000	1.319
+++ configure	6 Dec 2001 22:26:41 -0000	1.320
@@ -640,6 +640,7 @@
 # If autodetection is available then the third state is: auto
 _libavcodec=auto
 _libavcodecso=no # changed default to no as it causes problems - atmos
+_mp3lame=auto
 _mencoder=auto
 _x11=auto
 _dga=auto	# 1 2 no auto
@@ -1552,10 +1553,10 @@
   _gl=no
   if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then
     _gl=yes
-    _ld_gl="-lGL -lm"
+    _ld_gl="-lGL"
   elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then
     _gl=yes
-    _ld_gl="-lGL -lm $_ld_pthread"
+    _ld_gl="-lGL $_ld_pthread"
   fi
 else
   _gl=no
@@ -2077,7 +2078,7 @@
 fi
 if test "$_vorbis" = yes ; then
   _def_vorbis='#define HAVE_OGGVORBIS 1'
-  _ld_vorbis='-lvorbis -logg -lm'
+  _ld_vorbis='-lvorbis -logg'
 else
   _def_vorbis='#undef HAVE_OGGVORBIS'
 fi
@@ -2312,21 +2313,38 @@
 fi
 
 
-echocheck "lame and encore (for mencoder)"
+echocheck "libmp3lame (for mencoder)"
+if test "$_mp3lame" == auto ; then
+  cat > $TMPC <<EOF
+#include <lame/lame.h>
+int main(void) { (void) lame_init(); return 0; }
+EOF
+  _mp3lame=no
+  # Note: libmp3lame usually depends on vorbis
+  if cc_check -lmp3lame $_ld_vorbis -lm ; then
+    _mp3lame=yes
+  fi
+fi
+if test "$_mp3lame" = yes ; then
+    _def_mp3lame='#define HAVE_MP3LAME 1'
+    _ld_mp3lame="-lmp3lame $_ld_vorbis"
+else
+    _def_mp3lame='#undef HAVE_MP3LAME'
+fi
+echores "$_mp3lame"
+
+
+echocheck "divx4 encore (for mencoder)"
 #mencoder requires those libs
 if test "$_mencoder" != no ; then
   cat > $TMPC <<EOF
 #include <encore2.h>
-#include <lame/lame.h>
-int main(void) { (void) lame_init(); (void) encore(0, 0, 0, 0); return 0; }
+int main(void) { (void) encore(0, 0, 0, 0); return 0; }
 EOF
   _mencoder=no
-  if cc_check -lmp3lame -ldivxencore -lm ; then
+  if cc_check -ldivxencore -lm ; then
     _mencoder=yes 
-    _ld_encore='-lmp3lame -ldivxencore -lm'
-  elif cc_check -lmp3lame $_ld_vorbis  -ldivxencore -lm ; then
-    _mencoder=yes 
-    _ld_encore="-lmp3lame -ldivxencore -lm $_ld_vorbis"
+    _ld_encore='-ldivxencore'
   fi
 fi
 if test "$_mencoder" = yes ; then
@@ -2336,7 +2354,6 @@
 fi
 echores "$_mencoder"
 
-
 echocheck "lirc"
 if test "$_lirc" = auto ; then
   _lirc=no
@@ -2640,7 +2657,7 @@
 DIVX4LINUX = $_divx4linux
 DECORE_LIB = $_ld_decore
 MENCODER = $_mencoder
-ENCORE_LIB =  $_ld_encore 
+ENCORE_LIB =  $_ld_encore $_ld_mp3lame
 DIRECTFB_LIB = $_ld_directfb
 
 # --- Some stuff for autoconfigure ----
@@ -2690,6 +2707,8 @@
 /* You have to change DECORE_LIBS in config.mak too! */
 $_def_decore
 $_def_encore
+
+$_def_mp3lame
 
 /* Define this to enable avg. byte/sec-based AVI sync method by default:
    (use -bps or -nobps commandline option for run-time method selection)




More information about the MPlayer-cvslog mailing list