summaryrefslogtreecommitdiff
path: root/src/libffmpeg/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/Makefile.am')
-rw-r--r--src/libffmpeg/Makefile.am18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am
index afe9fe713..0599d5890 100644
--- a/src/libffmpeg/Makefile.am
+++ b/src/libffmpeg/Makefile.am
@@ -1,6 +1,17 @@
include $(top_srcdir)/misc/Makefile.common
-SUBDIRS = libavcodec
+if HAVE_FFMPEG
+FF_CFLAGS = $(FFMPEG_CFLAGS)
+link_ffmpeg = $(FFMPEG_LIBS)
+else
+FF_CFLAGS = -I$(srcdir)/libavcodec -I$(srcdir)/libavcodec/libpostproc
+link_ffmpeg = \
+ $(top_builddir)/src/libffmpeg/libavcodec/libavcodec.la \
+ $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
+subdir_ffmpeg = libavcodec
+endif
+
+SUBDIRS = $(subdir_ffmpeg)
# this must always be included, even if the current machine has no DXR3...
EXTRA_DIST = xine_encoder.c diff_to_ffmpeg_cvs.txt
@@ -12,7 +23,7 @@ libdir = $(XINE_PLUGINDIR)
lib_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la
if HAVE_DXR3
-AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(FF_CFLAGS)
xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \
xine_encoder.c mpeg_parser.c
# The dxr3 uses ffmpegs MPEG encoder by dlopen()ing the ffmpeg plugin and
@@ -25,8 +36,7 @@ xineplug_decode_ff_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
endif
xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \
- $(top_builddir)/src/libffmpeg/libavcodec/libavcodec.la \
- $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
+ $(link_ffmpeg)
xineplug_decode_dvaudio_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
xineplug_decode_dvaudio_la_SOURCES = dvaudio_decoder.c