diff configure @ 3079:d8d342750ed5

(on atmos's suggestions I found good :) default is autodetection (if lame and divxencore libs found then compile it) use --enable-mencoder or --disable-mencoder to alter this behavior Makefile modified accordingly (uninstall and other ifeq...) removed XMM_* since XMMP no longer there
author pl
date Fri, 23 Nov 2001 00:21:51 +0000
parents c649cfd313e1
children 79b3ce698c15
line wrap: on
line diff
--- a/configure	Thu Nov 22 21:53:25 2001 +0000
+++ b/configure	Fri Nov 23 00:21:51 2001 +0000
@@ -108,6 +108,7 @@
                          data [/usr/local/share/mplayer]
 
 Optional features:
+  --disable-mencoder     disable mencoder [autodetect]
   --enable-largefiles    enable support for files >2^32 bytes long [disable]
   --enable-termcap       use termcap database for key codes [autodetect]
   --enable-lirc          enable LIRC (remote control) support [autodetect]
@@ -629,6 +630,7 @@
 _libavcodec=auto
 _libavcodecso=auto
 
+_mencoder=auto
 _x11=auto
 _dga=auto
 _dga2=auto
@@ -691,6 +693,8 @@
 
 
   # Real 2nd pass
+  --enable-mencoder)	_mencoder=yes	;;
+  --disable-mencoder)	_mencoder=no	;;
   --enable-x11)		_x11=yes	;;
   --disable-x11)	_x11=no		;;
   --enable-dga)		_dga=yes	;;
@@ -2148,26 +2152,38 @@
   fi
   echores "$_divx4linux_decore"
   test "$_divx4linux_decore" = yes && _divx4linux=yes
-  echocheck "Divx4linux encore (for mencoder)"
-  cat > $TMPC <<EOF
-#include <encore2.h>
-int main(void) { (void) encore(0, 0, 0, 0); return 0; }
-EOF
-  _divx4linux_encore=no
-  cc_check  -ldivxencore -lm && _divx4linux_encore=yes
-  echores "$_divx4linux_encore"
 fi
 _def_decore='#undef NEW_DECORE'
 _ld_decore='-Lopendivx -ldecore'
-_def_encore='#undef NEW_ENCORE'
 if test "$_divx4linux_decore" = yes ; then
   _def_decore='#define NEW_DECORE 1'
   _ld_decore='-ldivxdecore opendivx/postprocess.o'
-  if test "$_divx4linux_encore" = yes ; then
-    _def_encore='#define NEW_ENCORE 1'
-    _ld_encore='-ldivxencore'
+fi
+
+
+echocheck "lame and 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; }
+EOF
+  _mencoder=no
+  if cc_check -lmp3lame -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"
   fi
 fi
+if test "$_mencoder" = yes ; then
+  _def_encore='#define NEW_ENCORE 1'
+else
+  _def_encore='#undef NEW_ENCORE'
+fi
+echores "$_mencoder"
 
 
 echocheck "lirc"
@@ -2411,7 +2427,8 @@
 ARCH_LIBS =  $_ld_static $_ld_arch $_ld_iconv
 DIVX4LINUX = $_ld_static  $_divx4linux
 DECORE_LIBS = $_ld_static $_ld_decore
-ENCORE_LIBS =  $_ld_static $_ld_encore
+MENCODER = $_mencoder
+ENCORE_LIBS =  $_ld_static $_ld_encore 
 HAVE_MLIB = $_mlib
 MLIB_INC = $_inc_mlib
 MLIB_LIB =  $_ld_static $_ld_mlib