From e602a125f0024e4242f9ccc6001325e4f4745174 Mon Sep 17 00:00:00 2001 From: atmos4 Date: Fri, 26 Apr 2002 17:18:02 +0000 Subject: Allow disabling of libfame and allow to enforce (not) building libavcodec. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5841 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 4 ++-- configure | 34 ++++++++++++++++++++++++++++++++++ libmpcodecs/Makefile | 6 +++++- libmpcodecs/vf.c | 4 ++++ 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2c5db53422..495a543258 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ V_LIBS = $(X_LIB) $(MP1E_LIB) $(GGI_LIB) $(MLIB_LIB) $(SDL_LIB) $(SVGA_LIB) $(AA 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 @@ all: $(ALL_PRG) .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 diff --git a/configure b/configure index 1fdcbcebeb..9d975a9720 100755 --- a/configure +++ b/configure @@ -130,6 +130,8 @@ Optional features: --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 @@ _prefix="/usr/local" # 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 @@ for ac_option do --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 @@ else _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_DEP = $_dep_dshow 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 @@ $_def_libavcodecso /* Use libavcodec's encoders */ #define CONFIG_ENCODERS 1 +/* Use libfame encoder filter */ +$_def_fame + /* XAnim DLL support */ $_def_xanim /* Default search path */ diff --git a/libmpcodecs/Makefile b/libmpcodecs/Makefile index 39dc92ecd7..90140e244e 100644 --- a/libmpcodecs/Makefile +++ b/libmpcodecs/Makefile @@ -6,10 +6,14 @@ LIBNAME2 = libmpencoders.a 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 diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index fb48e4f7b6..1a990de623 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -14,7 +14,9 @@ extern vf_info_t vf_info_crop; 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 @@ static vf_info_t* filter_list[]={ &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, -- cgit v1.2.3