From ecae4fad45828e55e042e1c330a938f094a7bfe4 Mon Sep 17 00:00:00 2001 From: ddennedy Date: Sat, 9 Jun 2007 01:39:47 +0000 Subject: [PATCH] change --avformat-svn configure option to do a static build of ffmpeg libs only and statically link to mlt module. Also, make --avformat-svn aware of --avformat-swscale and --enable-gpl git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@978 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/modules/avformat/Makefile | 12 ++---------- src/modules/avformat/configure | 13 +++++++++++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/modules/avformat/Makefile b/src/modules/avformat/Makefile index 5dc00ba..c3031ef 100644 --- a/src/modules/avformat/Makefile +++ b/src/modules/avformat/Makefile @@ -30,10 +30,7 @@ all: $(TARGET) $(TARGET): $(OBJS) if [ $(LOCAL_FFMPEG) ] ; then \ - $(MAKE) -C ffmpeg all ; \ - cp -f ffmpeg/libavcodec/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ; \ - cp -f ffmpeg/libavformat/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) ; \ - cp -f ffmpeg/libavutil/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) ; \ + $(MAKE) -C ffmpeg lib ; \ fi $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS) @@ -47,15 +44,10 @@ distclean: clean clean: #if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg clean ; fi - rm -f ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) $(OBJS) $(TARGET) + rm -f $(OBJS) $(TARGET) install: all install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" - if [ $(LOCAL_FFMPEG) ] ; then \ - install -m 755 ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(libdir)" ; \ - install -m 755 ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(libdir)" ; \ - install -m 755 ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(libdir)" ; \ - fi ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/avformat/configure b/src/modules/avformat/configure index eb8670d..210be53 100755 --- a/src/modules/avformat/configure +++ b/src/modules/avformat/configure @@ -76,9 +76,18 @@ else echo svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg ) - [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure --enable-shared --build-suffix="$avformat_suffix" ) + enable_gpl=`[ "$gpl" = "true" ] && echo "--enable-gpl"` + if [ "$swscale" != "" ] + then + enable_swscale="--enable-swscaler" + echo "SWSCALE=1" >> config.mak + fi + [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure $enable_gpl $enable_swscale ) #[ ! -f "ffmpeg/ffmpeg.patch" ] && ( cd ffmpeg ; cp ../ffmpeg.patch . ; patch -p0 < ffmpeg.patch ) - echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec -I`pwd`/ffmpeg/libavutil" >> config.mak + echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec -I`pwd`/ffmpeg/libavutil -I`pwd`/ffmpeg/libswscale" >> config.mak + echo "LDFLAGS+=-L`pwd`/ffmpeg/libavformat -L`pwd`/ffmpeg/libavcodec -L`pwd`/ffmpeg/libavutil -L`pwd`/ffmpeg/libswscale" >> config.mak + [ $targetos = "Darwin" ] && + echo "LDFLAGS+=-single_module" >> config.mak echo "LOCAL_FFMPEG=1" >> config.mak extra_libs="$extra_libs -lz" elif [ "$static_ffmpeg" != "" ] -- 1.7.4.4