changeset 5840:4e3cf9473628

Allow disabling of libfame and allow to enforce (not) building libavcodec.
author atmos4
date Fri, 26 Apr 2002 17:18:02 +0000
parents 80af8b0589e1
children 9cc33be028bb
files Makefile configure libmpcodecs/Makefile libmpcodecs/vf.c
diffstat 4 files changed, 45 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Apr 26 15:48:18 2002 +0000
+++ b/Makefile	Fri Apr 26 17:18:02 2002 +0000
@@ -44,7 +44,7 @@
 AO_LIBS = -Llibao2 -lao2
 A_LIBS = $(ALSA_LIB) $(NAS_LIB) $(MAD_LIB) $(VORBIS_LIB) $(FAAD_LIB) $(SGIAUDIO_LIB)
 
-CODEC_LIBS = -Llibmpcodecs -lmpcodecs -Lmp3lib -lMP3 -Lliba52 -la52 -Llibmpeg2 -lmpeg2 $(AV_LIB) -Llibfame -lfame
+CODEC_LIBS = -Llibmpcodecs -lmpcodecs -Lmp3lib -lMP3 -Lliba52 -la52 -Llibmpeg2 -lmpeg2 $(AV_LIB) $(FAME_LIB)
 COMMON_LIBS = $(CODEC_LIBS) -Llibmpdemux -lmpdemux  $(NEW_INPUT_LIB)  $(LIB_LOADER) $(A_LIBS) $(CSS_LIB) $(ARCH_LIB) -Lpostproc -lpostproc $(DECORE_LIB) -Llinux -losdep $(TERMCAP_LIB)  $(STREAMING_LIB) $(Z_LIB) $(GTK_LIBS) $(PNG_LIB) $(JPEG_LIB) -lm
 ifeq ($(VIDIX),yes)
 MISC_LIBS += -Llibdha -ldha -Lvidix -lvidix
@@ -91,7 +91,7 @@
 .c.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-COMMON_DEPS = libfame/libfame.a libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a linux/libosdep.a postproc/libpostproc.a input/libinput.a
+COMMON_DEPS = $(FAME_DEP) libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a linux/libosdep.a postproc/libpostproc.a input/libinput.a
 
 ifeq ($(VIDIX),yes)
 COMMON_DEPS += libdha/libdha.so vidix/libvidix.a
--- a/configure	Fri Apr 26 15:48:18 2002 +0000
+++ b/configure	Fri Apr 26 17:18:02 2002 +0000
@@ -130,6 +130,8 @@
   --disable-xvid         disable XviD codec [autodetect]
   --disable-divx4linux   disable DivX4linux codec [autodetect]
   --enable-opendivx      enable _old_ OpenDivx codec [disable]
+  --disable-libavcodec   disable libavcodec [autodetect]
+  --disable-libfame      disable libfame realtime-encoder [autodetect]
   --enable-vorbis        build with OggVorbis support [autodetect]
   --enable-faad          build with FAAD (AAC) support [autodetect]
   --disable-iconv        do not use iconv(3) function [autodetect]
@@ -765,6 +767,7 @@
 # If autodetection is available then the third state is: auto
 _libavcodec=auto
 _libavcodecso=no # changed default to no as it causes problems - atmos
+_fame=auto
 _mp1e=no
 _mencoder=yes
 _x11=auto
@@ -946,6 +949,10 @@
   --disable-divx4linux)	_divx4linux=no	;;
   --enable-opendivx)	_opendivx=yes	;;
   --disable-opendivx)	_opendivx=no	;;
+  --enable-libavcodec)	_libavcodec=yes	;;
+  --disable-libavcodec)	_libavcodec=no	;;
+  --enable-libfame)	_fame=yes	;;
+  --disable-libfame)	_fame=no	;;
   --enable-lirc)	_lirc=yes	;;
   --disable-lirc)	_lirc=no	;;
   --enable-gui)		_gui=yes	;;
@@ -3021,6 +3028,27 @@
   _nocodecmodules="libavcodec $_nocodecmodules"
 fi
 
+echocheck "libfame"
+if test "$_fame" = auto ; then
+  _fame=no
+  if test -d libfame && test -f libfame/fame.h ; then
+    # disable fame on cygwin as no sense to port - atmos	  
+    cygwin || _fame=yes
+    echores $_fame
+  else
+    echores "no (no fame dir)"
+  fi
+else
+  echores "$_fame"
+fi
+
+_def_fame='#undef USE_LIBFAME'
+if test "$_fame" = yes ; then
+  _def_fame='#define USE_LIBFAME 1'	
+  _ld_fame='-Llibfame -lfame'	
+  _dep_fame='libfame/libfame.a'
+fi  
+
 echocheck "libdv-0.9.5 (for mencoder)"
 if test "$_libdv" = auto ; then
   _libdv=no
@@ -3581,6 +3609,9 @@
 DS_LIB = $_ld_dshow
 AV_DEP = $_dep_libavcodec
 AV_LIB = $_ld_libavcodec
+FAME = $_fame
+FAME_LIB = $_ld_fame
+FAME_DEB = $_dep_fame
 MP1E_DEP = $_dep_mp1e
 MP1E_LIB = $_ld_mp1e
 ARCH_LIB =  $_ld_arch $_ld_iconv
@@ -3795,6 +3826,9 @@
 /* Use libavcodec's encoders */
 #define CONFIG_ENCODERS 1
 
+/* Use libfame encoder filter */
+$_def_fame
+
 /* XAnim DLL support */
 $_def_xanim
 /* Default search path */
--- a/libmpcodecs/Makefile	Fri Apr 26 15:48:18 2002 +0000
+++ b/libmpcodecs/Makefile	Fri Apr 26 17:18:02 2002 +0000
@@ -6,10 +6,14 @@
 
 AUDIO_SRCS=dec_audio.c ad.c ad_a52.c ad_acm.c ad_alaw.c ad_dk3adpcm.c ad_dk4adpcm.c ad_dshow.c ad_dvdpcm.c ad_ffmpeg.c ad_hwac3.c ad_imaadpcm.c ad_mp3.c ad_msadpcm.c ad_pcm.c ad_roqaudio.c ad_msgsm.c ad_faad.c ad_vorbis.c ad_libmad.c
 VIDEO_SRCS=dec_video.c vd.c vd_null.c vd_cinepak.c vd_qtrpza.c vd_ffmpeg.c vd_dshow.c vd_vfw.c vd_odivx.c vd_divx4.c vd_raw.c vd_xanim.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c vd_libmpeg2.c vd_msrle.c vd_huffyuv.c vd_zlib.c vd_mpegpes.c
-VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_fame.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c
+VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c
 ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c
 NATIVE_SRCS=native/RTjpegN.c native/cinepak.c native/cyuv.c native/fli.c native/minilzo.c native/msvidc.c native/nuppelvideo.c native/qtrle.c native/qtrpza.c native/qtsmc.c native/roqav.c native/xa_gsm.c
 
+ifeq ($(FAME),yes)
+VFILTER_SRCS += vf_fame.c
+endif
+
 ifeq ($(PNG),yes)
 VIDEO_SRCS += vd_mpng.c
 endif
--- a/libmpcodecs/vf.c	Fri Apr 26 15:48:18 2002 +0000
+++ b/libmpcodecs/vf.c	Fri Apr 26 17:18:02 2002 +0000
@@ -14,7 +14,9 @@
 extern vf_info_t vf_info_expand;
 extern vf_info_t vf_info_pp;
 extern vf_info_t vf_info_scale;
+#ifdef USE_LIBFAME
 extern vf_info_t vf_info_fame;
+#endif
 extern vf_info_t vf_info_format;
 extern vf_info_t vf_info_yuy2;
 extern vf_info_t vf_info_flip;
@@ -33,7 +35,9 @@
     &vf_info_scale,
 //    &vf_info_osd,
     &vf_info_vo,
+#ifdef USE_LIBFAME
     &vf_info_fame,
+#endif
     &vf_info_format,
     &vf_info_yuy2,
     &vf_info_flip,