diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-09-13 11:10:05 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-15 16:00:03 +0200 |
commit | d3b125913f9137002d1deeca0f260dd79762729c (patch) | |
tree | 7b47292a1647c16d10bea36630532afcadf5b7d7 /configure.ac | |
parent | 1caa7d6161bf7768506c7fffd96580a793edc052 (diff) |
libav: fix static linking
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 195aaa2924..a147b5e52e 100644 --- a/configure.ac +++ b/configure.ac @@ -292,19 +292,35 @@ else -I \$(top_builddir)/gst-libs/ext/libav \ -Wno-deprecated-declarations" - dnl libgstlibav.la: libs to statically link to - LIBAV_LIBS="\$(top_builddir)/gst-libs/ext/libav/libavformat/libavformat.a \ - \$(top_builddir)/gst-libs/ext/libav/libavcodec/libavcodec.a \ - \$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a" + LIBAV_DEPS="\$(top_builddir)/gst-libs/ext/libav/libavformat/libavformat.a \ + \$(top_builddir)/gst-libs/ext/libav/libavcodec/libavcodec.a \ + \$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a" + if test "x$enable_static_plugins" = xyes; then + dnl with static linking we can't use the .a archive directly as they would + dnl be included in the final libgstlibav.a as a file and won't be usable. + dnl libav*.a must be copied to the final destination too + LIBAV_LIBS="-lavformat -lavcodec -lavutil" + else + dnl libgstlibav.la: libs to statically link to + LIBAV_LIBS="$LIBAV_DEPS" + fi dnl SWSCALE_CFLAGS="-I \$(top_srcdir)/gst-libs/ext/libav \ -I \$(top_builddir)/gst-libs/ext/libav \ -Wno-deprecated-declarations" - dnl libgstswscale.la: libs to statically link to - SWSCALE_LIBS="\$(top_builddir)/gst-libs/ext/libav/libswscale/libswscale.a \ + SWSCALE_DEPS="\$(top_builddir)/gst-libs/ext/libav/libswscale/libswscale.a \ \$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a" + if test "x$enable_static_plugins" = xyes; then + dnl with static linking we can't use the .a archive directly as they would + dnl be included in the final libgstswscale.a as a file and won't be usable. + dnl libav*.a must be copied to the final destination too + LIBAV_LIBS="-lswscale -lavutil" + else + dnl libgstswscale.la: libs to statically link to + SWSCALE_LIBS="$SWSCALE_DEPS" + fi LIBAV_SUBDIRS=gst-libs AC_DEFINE(HAVE_AVI_H) @@ -425,9 +441,11 @@ else fi AC_SUBST(LIBAV_CFLAGS) +AC_SUBST(LIBAV_DEPS) AC_SUBST(LIBAV_LIBS) AC_SUBST(LIBAV_SUBDIRS) AC_SUBST(SWSCALE_CFLAGS) +AC_SUBST(SWSCALE_DEPS) AC_SUBST(SWSCALE_LIBS) AC_SUBST(WIN32_LIBS) |