[vlc-commits] avformat: avoid genmf

Rémi Denis-Courmont git at videolan.org
Sat Sep 14 18:02:52 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Sep 14 17:22:40 2013 +0300| [773c26ea985deba4f480c155d04d80132b1dfd1d] | committer: Rémi Denis-Courmont

avformat: avoid genmf

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=773c26ea985deba4f480c155d04d80132b1dfd1d
---

 configure.ac              |   20 ++++++++------------
 modules/access/Modules.am |    9 ++++++++-
 modules/demux/Modules.am  |    8 ++++----
 3 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index fcd1fbd..95f7c52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -655,7 +655,7 @@ AC_CHECK_FUNC(getopt_long,, [
 AC_SUBST(GNUGETOPT_LIBS)
 
 AC_CHECK_LIB(m,cos,[
-  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom rotate noise grain scene kate lua chorus_flanger freetype avcodec access_avio swscale postproc faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v speex opus mono colorthres extract ball access_imem hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum],[-lm])
+  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom rotate noise grain scene kate lua chorus_flanger freetype avcodec swscale postproc faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v speex opus mono colorthres extract ball access_imem hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum],[-lm])
   LIBM="-lm"
 ], [
   LIBM=""
@@ -2429,22 +2429,17 @@ AC_ARG_ENABLE(avformat,
 [  --enable-avformat       libavformat containers (default enabled)],, [
   enable_avformat="${have_avcodec}"
 ])
-if test "${enable_avformat}" != "no"
-then
-  PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil],
-    [
+have_avformat="no"
+AS_IF([test "${enable_avformat}" != "no"], [
+  PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil], [
+      have_avformat="yes"
       VLC_SAVE_FLAGS
       CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
       CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
       AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h)
       AC_CHECK_HEADERS(libavutil/avutil.h)
       AS_IF([test "$enable_merge_ffmpeg" = "no"], [
-        VLC_ADD_PLUGIN([avformat access_avio])
-        VLC_ADD_LIBS([access_avio],[$AVFORMAT_LIBS $AVUTIL_LIBS])
-        VLC_ADD_CFLAGS([access_avio],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
-        AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
-          VLC_ADD_LDFLAGS([avformat access_avio],[${ac_cv_ld_bsymbolic}])
-        ])
+        have_avformat="no"
       ], [
         VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS])
         VLC_ADD_CFLAGS([avcodec],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
@@ -2453,7 +2448,8 @@ then
     ],[
       AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
   ])
-fi
+])
+AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"])
 
 dnl
 dnl  swscale image scaling and conversion plugin
diff --git a/modules/access/Modules.am b/modules/access/Modules.am
index 5b81e14..3ac4ccd 100644
--- a/modules/access/Modules.am
+++ b/modules/access/Modules.am
@@ -70,7 +70,6 @@ SOURCES_linsys_hdsdi = \
 SOURCES_access_jack = jack.c
 SOURCES_access_mtp = mtp.c
 SOURCES_access_imem = imem.c
-SOURCES_access_avio = avio.c avio.h ../codec/avcodec/cpu.c
 SOURCES_access_attachment = attachment.c
 SOURCES_access_vdr = vdr.c
 SOURCES_libbluray = bluray.c
@@ -357,3 +356,11 @@ libaccess_realrtsp_plugin_la_DEPENDENCIES = libaccess_realrtsp_plugin.rc.o
 endif
 libvlc_LTLIBRARIES += $(LTLIBaccess_realrtsp)
 EXTRA_LTLIBRARIES += libaccess_realrtsp_plugin.la
+
+libavio_plugin_la_SOURCES = avio.c avio.h ../codec/avcodec/cpu.c
+libavio_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS)
+libavio_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS)
+libavio_plugin_la_LIBADD = $(AM_LIBADD) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(LIBM)
+if HAVE_AVFORMAT
+libvlc_LTLIBRARIES += libavio_plugin.la
+endif
diff --git a/modules/demux/Modules.am b/modules/demux/Modules.am
index f842a41..4259231 100644
--- a/modules/demux/Modules.am
+++ b/modules/demux/Modules.am
@@ -61,7 +61,7 @@ endif
 libavformat_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS)
 libavformat_plugin_la_LIBADD = $(AM_LIBADD) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) \
 				$(LIBM)
-libavformat_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_avformat)
+libavformat_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS)
 if HAVE_ZLIB
 libavformat_plugin_la_LIBADD += -lz
 endif
@@ -71,9 +71,9 @@ endif
 if HAVE_WIN32
 libavformat_plugin_la_DEPENDENCIES = libavformat_plugin.rc.o
 endif
-
-libvlc_LTLIBRARIES += $(LTLIBavformat)
-EXTRA_LTLIBRARIES += libavformat_plugin.la
+if HAVE_AVFORMAT
+libvlc_LTLIBRARIES += libavformat_plugin.la
+endif
 
 libes_plugin_la_SOURCES  = mpeg/es.c ../codec/dts_header.c ../codec/dts_header.h ../codec/a52.h
 libes_plugin_la_CFLAGS = $(AM_CFLAGS)



More information about the vlc-commits mailing list