Skip to content
Snippets Groups Projects
Commit d3b12591 authored by Andoni Morales Alastruey's avatar Andoni Morales Alastruey Committed by Sebastian Dröge
Browse files

libav: fix static linking

parent 1caa7d61
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -32,7 +32,7 @@ libgstlibav_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
libgstlibav_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
if HAVE_LIBAV_UNINSTALLED
libgstlibav_la_DEPENDENCIES = $(LIBAV_LIBS)
libgstlibav_la_DEPENDENCIES = $(LIBAV_DEPS)
endif
......
......@@ -11,5 +11,5 @@ libgstavscale_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
libgstavscale_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
if HAVE_LIBAV_UNINSTALLED
libgstavscale_la_DEPENDENCIES = $(SWSCALE_LIBS)
libgstavscale_la_DEPENDENCIES = $(SWSCALE_DEPS)
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment