[Mplayer-cvslog] CVS: main Makefile,1.275,1.276 configure,1.777,1.778

Dmitry Baryshkov CVS lumag at mplayerhq.hu
Sun Oct 5 00:00:55 CEST 2003


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

Modified Files:
	Makefile configure 
Log Message:
FLAC decoding support via imported libmpflac.
TODO: fix FLAC-in-ogg decoding.



Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -r1.275 -r1.276
--- Makefile	21 Sep 2003 17:05:28 -0000	1.275
+++ Makefile	4 Oct 2003 22:00:01 -0000	1.276
@@ -36,7 +36,7 @@
 VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) 
 AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(NAS_LIB) $(SGIAUDIO_LIB)
 CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB) 
-COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB)
+COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB) $(FLAC_LIB)
 
 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(X11_INC) $(FRIBIDI_INC) $(DVB_INC) # -Wall
 
@@ -67,6 +67,9 @@
 ifeq ($(LIBMENU),yes)
 PARTS += libmenu
 endif
+ifneq ($(MPFLAC),none)
+PARTS += libmpflac
+endif
 
 ALL_PRG = $(PRG)
 ifeq ($(MENCODER),yes)
@@ -105,6 +108,10 @@
 GUI_LIBS = Gui/libgui.a
 endif
 
+ifneq ($(MPFLAC),none)
+COMMON_DEPS += libmpflac/libmpflac.a
+endif
+
 .SUFFIXES: .cc .c .o
 
 # .PHONY: $(COMMON_DEPS)
@@ -185,6 +192,9 @@
 
 libavcodec/libpostproc/libpostproc.so:
 	$(MAKE) -C libavcodec/libpostproc
+
+libmpflac/libmpflac.a:
+	$(MAKE) -C libmpflac
 
 MPLAYER_DEP = $(OBJS_MPLAYER) $(COMMON_DEPS)
 

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.777
retrieving revision 1.778
diff -u -r1.777 -r1.778
--- configure	4 Oct 2003 17:28:30 -0000	1.777
+++ configure	4 Oct 2003 22:00:01 -0000	1.778
@@ -198,6 +198,8 @@
   --disable-mad          disable libmad (mpeg audio) support [autodetect]
   --enable-xmms          build with XMMS inputplugin support [disabled]
   --enable-externalfaad  use external faad library if available [disabled]
+  --enable-flac          build with FLAC support [autodetect]
+  --enable-external-flac build with external libFLAC [disable]
   
 Video output:
   --disable-vidix        disable VIDIX stuff [enable on x86 *nix]
@@ -1087,6 +1089,8 @@
 _faad=auto
 _faad_local=yes
 _xmms=no
+_flac=auto
+_external_flac=no
 _css=auto
 # dvdnav disabled, it does not work
 #_dvdnav=no
@@ -1252,6 +1256,10 @@
   --enable-externalfaad) _faad_local=no ;;
   --disable-externalfaad) _faad_local=yes ;;
   --enable-xmms)	_xmms=yes	;;
+  --enable-flac)	_flac=yes	;;
+  --disable-flac)	_flac=no	;;
+  --enable-external-flac)	_external_flac=yes	;;
+  --disable-external-flac)	_external_flac=no	;;
   --enable-css)		_css=yes	;;
   --disable-css)	_css=no		;;
   --enable-dvdread)	_dvdread=yes	;;
@@ -5168,6 +5176,55 @@
 fi
 echores "$_xmms"
 
+echocheck "FLAC support"
+if test "$_flac" = auto ; then
+  if test "$_external_flac" = yes ; then
+    cat > $TMPC << EOF
+#include <FLAC/stream_decoder.h>
+#include <stdlib.h>
+
+int main()
+{
+  FLAC__StreamDecoder *fdec = FLAC__stream_decoder_new();
+  return fdec != NULL;
+}
+EOF
+    _flac=no
+    if cc_check -lFLAC ; then
+      _flac=external
+    fi
+  else
+    _flac=yes
+  fi
+fi
+
+if test "$_flac" = external ; then
+  _def_flac='#define HAVE_FLAC 1'
+  #Still use dither.c & replay_gain from libmpflac
+  _def_mpflac='#undef USE_MPFLAC_DECODER'
+  _mpflac='process'
+  _ld_flac='-lFLAC -Llibmpflac -lmpflac'
+  _codecmodules="flac(external) $_codecmodules"
+  echores "yes (using external libFLAC)"
+else
+  if test "$_flac" = yes ; then
+    _def_flac='#define HAVE_FLAC 1'
+    #use decoder, dither.c & replay_gain from libmpflac
+    _def_mpflac='#define USE_MPFLAC_DECODER 1'
+    _mpflac='full'
+    _ld_flac='-Llibmpflac -lmpflac'
+    _codecmodules="flac(internal) $_codecmodules"
+    echores "yes (using internal libmpflac)"
+  else
+    _def_flac='#undef HAVE_FLAC'
+    _def_mpflac='#undef USE_MPFLAC_DECODER'
+    _mpflac='none'
+    _ld_flac=''
+    _nocodecmodules="flac $_nocodecmodules"
+    echores "no"
+  fi
+fi
+echores "$_flac"
 
 echocheck "inet6"
 if test "$_inet6" = auto ; then
@@ -5615,6 +5672,8 @@
 XMMS_LIB = $_xmms_lib
 MACOSX = $_macosx
 MACOSX_FRAMEWORKS = $_macosx_frameworks
+FLAC_LIB = $_ld_flac
+MPFLAC = $_mpflac
 
 # --- Some stuff for autoconfigure ----
 $_target_arch
@@ -5832,6 +5891,12 @@
  * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
  */
 $_def_lircc
+
+/*
+ * FLAC decoding
+ */
+$_def_flac
+$_def_mpflac
 
 /* DeCSS support using libcss */
 $_def_css



More information about the MPlayer-cvslog mailing list