diff options
author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2017-10-23 19:35:31 -0700 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-03-23 17:05:18 +0000 |
commit | 60885e38d622ae686affafe4a11eede49996aad4 (patch) | |
tree | 4e3adb0550e91d41edef28260d9ce4830ec3f02e | |
parent | 4be1a2532055f4417d89c4845e7f16f53465e163 (diff) | |
download | gst-libav-60885e38d622ae686affafe4a11eede49996aad4.tar.gz |
libav: use LIBAV_CPPFLAGS for -I include paths
Autotools automatically appends user CPPFLAGS after target
CPPFLAGS. Also, it puts all CPPFLAGS before CFLAGS in final
generated gcc compile command. The internal ffmpeg include
paths need to come before any other external include paths
to ensure we don't accidentally pickup external ffmpeg
headers first (i.e. from user CPPFLAGS include paths). Thus,
move the internal LIBAV include paths to LIBAV_CPPFLAGS so
that they come before any user defined CPPFLAGS.
This allows ffmpeg and gst-ffmpeg to coexist on users system.
https://bugzilla.gnome.org/show_bug.cgi?id=789379
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | ext/libav/Makefile.am | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index a7919b2..eaa802a 100644 --- a/configure.ac +++ b/configure.ac @@ -312,9 +312,10 @@ else fi dnl libgstlibav.la: include dirs - LIBAV_CFLAGS="-I \$(top_srcdir)/gst-libs/ext/libav \ - -I \$(top_builddir)/gst-libs/ext/libav \ - -Wno-deprecated-declarations" + LIBAV_CPPFLAGS="-I \$(top_srcdir)/gst-libs/ext/libav \ + -I \$(top_builddir)/gst-libs/ext/libav" + + LIBAV_CFLAGS="-Wno-deprecated-declarations" LIBAV_DEPS="\$(top_builddir)/gst-libs/ext/libav/libavformat/libavformat.a \ \$(top_builddir)/gst-libs/ext/libav/libavcodec/libavcodec.a \ @@ -478,6 +479,7 @@ fi AM_CONDITIONAL(HAVE_BZ2, test "x$HAVE_BZ2" = "xyes") AM_CONDITIONAL(HAVE_LZMA, test "x$HAVE_LZMA" = "xyes") +AC_SUBST(LIBAV_CPPFLAGS) AC_SUBST(LIBAV_CFLAGS) AC_SUBST(LIBAV_DEPS) AC_SUBST(LIBAV_LIBS) diff --git a/ext/libav/Makefile.am b/ext/libav/Makefile.am index 4aeff59..d769464 100644 --- a/ext/libav/Makefile.am +++ b/ext/libav/Makefile.am @@ -29,6 +29,7 @@ libgstlibav_la_SOURCES = gstav.c \ # \ # gstavscale.c +libgstlibav_la_CPPFLAGS = $(LIBAV_CPPFLAGS) $(GST_PLUGINS_BASE_CPPFLAGS) $(GST_CPPFLAGS) libgstlibav_la_CFLAGS = $(LIBAV_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) libgstlibav_la_LIBADD = $(LIBAV_LIBS) $(GST_PLUGINS_BASE_LIBS) \ -lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \ |