From c3d497776187243ffe96d36f7632817dfaf7e852 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 19 May 2010 17:12:55 -0700 Subject: [PATCH] Split out GST_PLUGINS_BAD_CFLAGS from GST_CFLAGS Move include directives for gst-libs into GST_PLUGINS_BAD_CFLAGS, and fix all the Makefiles that use it. This is so that all the include directories are added in the proper order: first the directories in srcdir/builddir, then gst-plugins-base dirs, then gstreamer dirs. If the order is wrong, installed headers may be used instead of local headers and/or uninstalled headers from -base. --- configure.ac | 8 ++++++-- ext/audiofile/Makefile.am | 2 +- ext/dirac/Makefile.am | 4 +++- ext/resindvd/Makefile.am | 3 ++- ext/schroedinger/Makefile.am | 3 ++- ext/sndfile/Makefile.am | 2 +- gst-libs/gst/app/Makefile.am | 7 +++++-- gst-libs/gst/interfaces/Makefile.am | 5 ++++- gst-libs/gst/signalprocessor/Makefile.am | 1 + gst-libs/gst/video/Makefile.am | 5 ++++- gst/aiff/Makefile.am | 1 + gst/asfmux/Makefile.am | 2 +- gst/audiobuffer/Makefile.am | 2 +- gst/camerabin/Makefile.am | 2 +- gst/dvdspu/Makefile.am | 2 +- gst/nuvdemux/Makefile.am | 4 ++-- gst/videomeasure/Makefile.am | 6 ++++-- sys/dvb/Makefile.am | 2 +- sys/dxr3/Makefile.am | 2 +- tests/examples/camerabin/Makefile.am | 2 +- 20 files changed, 43 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 552980736d..d03c40d74b 100644 --- a/configure.ac +++ b/configure.ac @@ -1587,11 +1587,15 @@ dnl FIXME: do we want to rename to GST_ALL_* ? dnl prefer internal headers to already installed ones dnl also add builddir include for enumtypes and marshal dnl add GST_OPTION_CFLAGS, but overridable -GST_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CXXFLAGS)" -GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)" +GST_CXXFLAGS="$GST_CFLAGS \$(GST_OPTION_CXXFLAGS)" +GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)" AC_SUBST(GST_CFLAGS) AC_SUBST(GST_CXXFLAGS) AC_SUBST(GST_LIBS) +GST_PLUGINS_BAD_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs" +GST_PLUGINS_BAD_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs" +AC_SUBST(GST_PLUGINS_BAD_CFLAGS) +AC_SUBST(GST_PLUGINS_BAD_CXXFLAGS) dnl LDFLAGS really should only contain flags, not libs - they get added before dnl whatevertarget_LIBS and -L flags here affect the rest of the linking diff --git a/ext/audiofile/Makefile.am b/ext/audiofile/Makefile.am index ac53297f54..260b4cecf7 100644 --- a/ext/audiofile/Makefile.am +++ b/ext/audiofile/Makefile.am @@ -2,7 +2,7 @@ plugin_LTLIBRARIES = libgstaudiofile.la libgstaudiofile_la_SOURCES = gstaf.c gstafsink.c gstafsrc.c gstafparse.c -libgstaudiofile_la_CFLAGS = $(GST_CFLAGS) $(AUDIOFILE_CFLAGS) +libgstaudiofile_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) $(AUDIOFILE_CFLAGS) libgstaudiofile_la_LIBADD = $(AUDIOFILE_LIBS) libgstaudiofile_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstaudiofile_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/ext/dirac/Makefile.am b/ext/dirac/Makefile.am index a99181a0b5..c93a3d4775 100644 --- a/ext/dirac/Makefile.am +++ b/ext/dirac/Makefile.am @@ -5,8 +5,10 @@ libgstdirac_la_SOURCES = \ gstdiracenc.cc libgstdirac_la_CXXFLAGS = \ + $(GST_PLUGINS_BAD_CXXFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CXXFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) $(DIRAC_CFLAGS) \ + $(DIRAC_CFLAGS) \ -DGST_USE_UNSTABLE_API libgstdirac_la_LIBADD = \ $(top_builddir)/gst-libs/gst/video/libgstbasevideo-@GST_MAJORMINOR@.la \ diff --git a/ext/resindvd/Makefile.am b/ext/resindvd/Makefile.am index 7ea8bcf982..e9ef5abb08 100644 --- a/ext/resindvd/Makefile.am +++ b/ext/resindvd/Makefile.am @@ -15,7 +15,8 @@ libresindvd_la_SOURCES = \ rsnparsetter.c \ rsnwrappedbuffer.c -libresindvd_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ +libresindvd_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \ +$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) $(DVDNAV_CFLAGS) libresindvd_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \ -lgstinterfaces-$(GST_MAJORMINOR) -lgstvideo-$(GST_MAJORMINOR) \ diff --git a/ext/schroedinger/Makefile.am b/ext/schroedinger/Makefile.am index 8b2110cfb7..fdedd67f06 100644 --- a/ext/schroedinger/Makefile.am +++ b/ext/schroedinger/Makefile.am @@ -11,9 +11,10 @@ libgstschro_la_SOURCES = \ gstschroparse.c \ gstschroutils.c libgstschro_la_CFLAGS = \ - $(GST_CFLAGS) \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) \ -DGST_USE_UNSTABLE_API \ $(SCHRO_CFLAGS) libgstschro_la_LIBADD = \ diff --git a/ext/sndfile/Makefile.am b/ext/sndfile/Makefile.am index 6312b7ecd4..4c07670416 100644 --- a/ext/sndfile/Makefile.am +++ b/ext/sndfile/Makefile.am @@ -2,7 +2,7 @@ plugin_LTLIBRARIES = libgstsndfile.la libgstsndfile_la_SOURCES = gstsf.c gstsfsrc.c gstsfsink.c -libgstsndfile_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SNDFILE_CFLAGS) +libgstsndfile_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SNDFILE_CFLAGS) libgstsndfile_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(SNDFILE_LIBS) libgstsndfile_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstsndfile_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am index bb4686d213..af10a4ae58 100644 --- a/gst-libs/gst/app/Makefile.am +++ b/gst-libs/gst/app/Makefile.am @@ -14,8 +14,11 @@ nodist_libgstapp_@GST_MAJORMINOR@_la_SOURCES = \ $(built_sources) libgstapp_@GST_MAJORMINOR@_la_SOURCES = gstappsrc.c gstappbuffer.c gstappsink.c -libgstapp_@GST_MAJORMINOR@_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) +libgstapp_@GST_MAJORMINOR@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) libgstapp_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) libgstapp_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_ALL_LDFLAGS) libgstapp_@GST_MAJORMINOR@_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/gst-libs/gst/interfaces/Makefile.am b/gst-libs/gst/interfaces/Makefile.am index 33ff81d793..a4cf979a62 100644 --- a/gst-libs/gst/interfaces/Makefile.am +++ b/gst-libs/gst/interfaces/Makefile.am @@ -29,7 +29,10 @@ libgstphotography_@GST_MAJORMINOR@_la_SOURCES = \ nodist_libgstphotography_@GST_MAJORMINOR@_la_SOURCES = \ $(built_sources) -libgstphotography_@GST_MAJORMINOR@_la_CFLAGS = $(GST_CFLAGS) -DGST_USE_UNSTABLE_API +libgstphotography_@GST_MAJORMINOR@_la_CFLAGS = \ + -DGST_USE_UNSTABLE_API \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_CFLAGS) libgstphotography_@GST_MAJORMINOR@_la_LIBADD = $(GST_LIBS) libgstphotography_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) diff --git a/gst-libs/gst/signalprocessor/Makefile.am b/gst-libs/gst/signalprocessor/Makefile.am index a9f2f70ec8..f7e5f65207 100644 --- a/gst-libs/gst/signalprocessor/Makefile.am +++ b/gst-libs/gst/signalprocessor/Makefile.am @@ -5,6 +5,7 @@ libgstsignalprocessor_@GST_MAJORMINOR@include_HEADERS = gstsignalprocessor.h libgstsignalprocessor_@GST_MAJORMINOR@_la_SOURCES = gstsignalprocessor.c libgstsignalprocessor_@GST_MAJORMINOR@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS) libgstsignalprocessor_@GST_MAJORMINOR@_la_LIBADD = \ diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am index ab85d00f91..baf42094d4 100644 --- a/gst-libs/gst/video/Makefile.am +++ b/gst-libs/gst/video/Makefile.am @@ -18,7 +18,10 @@ libgstbasevideo_@GST_MAJORMINOR@include_HEADERS = \ gstbasevideoencoder.h \ gstbasevideoparse.h -libgstbasevideo_@GST_MAJORMINOR@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) -DGST_USE_UNSTABLE_API +libgstbasevideo_@GST_MAJORMINOR@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) -DGST_USE_UNSTABLE_API \ + $(GST_CFLAGS) libgstbasevideo_@GST_MAJORMINOR@_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstvideo-@GST_MAJORMINOR@ libgstbasevideo_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) diff --git a/gst/aiff/Makefile.am b/gst/aiff/Makefile.am index 5a693d4b5d..2cdbc889a1 100644 --- a/gst/aiff/Makefile.am +++ b/gst/aiff/Makefile.am @@ -2,6 +2,7 @@ plugin_LTLIBRARIES = libgstaiff.la libgstaiff_la_SOURCES = aiff.c aiffmux.c aiffparse.c libgstaiff_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) diff --git a/gst/asfmux/Makefile.am b/gst/asfmux/Makefile.am index 44526f1436..5c6991f9df 100644 --- a/gst/asfmux/Makefile.am +++ b/gst/asfmux/Makefile.am @@ -11,7 +11,7 @@ libgstasfmux_la_SOURCES = gstasfmux.c \ # flags used to compile this plugin # add other _CFLAGS and _LIBS as needed -libgstasfmux_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) +libgstasfmux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) libgstasfmux_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) \ -lgstrtp-@GST_MAJORMINOR@ libgstasfmux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/gst/audiobuffer/Makefile.am b/gst/audiobuffer/Makefile.am index 190db7e81a..96df1c68f8 100644 --- a/gst/audiobuffer/Makefile.am +++ b/gst/audiobuffer/Makefile.am @@ -1,7 +1,7 @@ plugin_LTLIBRARIES = libgstaudiobuffer.la libgstaudiobuffer_la_SOURCES = gstaudioringbuffer.c -libgstaudiobuffer_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ +libgstaudiobuffer_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) libgstaudiobuffer_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) \ -lgstaudio-$(GST_MAJORMINOR) diff --git a/gst/camerabin/Makefile.am b/gst/camerabin/Makefile.am index d46b6441bc..fb21a67125 100644 --- a/gst/camerabin/Makefile.am +++ b/gst/camerabin/Makefile.am @@ -25,7 +25,7 @@ libgstcamerabin_la_SOURCES = gstcamerabin.c \ nodist_libgstcamerabin_la_SOURCES = $(built_sources) libgstcamerabin_la_CFLAGS = \ - -I$(top_builddir)/gst-libs \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \ -DGST_USE_UNSTABLE_API libgstcamerabin_la_LIBADD = \ diff --git a/gst/dvdspu/Makefile.am b/gst/dvdspu/Makefile.am index 90e8ddd5e5..28fbc1bb4c 100644 --- a/gst/dvdspu/Makefile.am +++ b/gst/dvdspu/Makefile.am @@ -3,7 +3,7 @@ plugin_LTLIBRARIES = libgstdvdspu.la libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c gstspu-vobsub.c gstspu-vobsub-render.c gstspu-pgs.c -libgstdvdspu_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) +libgstdvdspu_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) libgstdvdspu_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ $(GST_LIBS) libgstdvdspu_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/gst/nuvdemux/Makefile.am b/gst/nuvdemux/Makefile.am index ef19fb63a1..e51156858a 100644 --- a/gst/nuvdemux/Makefile.am +++ b/gst/nuvdemux/Makefile.am @@ -1,9 +1,9 @@ plugin_LTLIBRARIES = libgstnuvdemux.la -libgstnuvdemux_la_CFLAGS = ${GST_CFLAGS} +libgstnuvdemux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) libgstnuvdemux_la_LIBADD = $(GST_BASE_LIBS) -libgstnuvdemux_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} +libgstnuvdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstnuvdemux_la_SOURCES = gstnuvdemux.c libgstnuvdemux_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/gst/videomeasure/Makefile.am b/gst/videomeasure/Makefile.am index 2e0b9ce5f1..9129d16129 100644 --- a/gst/videomeasure/Makefile.am +++ b/gst/videomeasure/Makefile.am @@ -8,8 +8,10 @@ libgstvideomeasure_la_SOURCES = \ gstvideomeasure_ssim.c \ gstvideomeasure_collector.c -libgstvideomeasure_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) +libgstvideomeasure_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) libgstvideomeasure_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \ -lgstvideo-@GST_MAJORMINOR@ $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) libgstvideomeasure_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/sys/dvb/Makefile.am b/sys/dvb/Makefile.am index 29c07330a8..bceca29197 100644 --- a/sys/dvb/Makefile.am +++ b/sys/dvb/Makefile.am @@ -17,7 +17,7 @@ libgstdvb_la_SOURCES = \ camconditionalaccess.c \ parsechannels.c -libgstdvb_la_CFLAGS = $(GST_CFLAGS) +libgstdvb_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) libgstdvb_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) libgstdvb_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdvb_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/sys/dxr3/Makefile.am b/sys/dxr3/Makefile.am index ae1ad50089..44d217ad27 100644 --- a/sys/dxr3/Makefile.am +++ b/sys/dxr3/Makefile.am @@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstdxr3.la libgstdxr3_la_SOURCES = dxr3videosink.c dxr3audiosink.c dxr3spusink.c \ dxr3init.c ac3_padder.c nodist_libgstdxr3_la_SOURCES = dxr3marshal.c -libgstdxr3_la_CFLAGS = $(GST_CFLAGS) +libgstdxr3_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) libgstdxr3_la_LIBADD = libgstdxr3_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdxr3_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/tests/examples/camerabin/Makefile.am b/tests/examples/camerabin/Makefile.am index 0dc653725e..d1e104140f 100644 --- a/tests/examples/camerabin/Makefile.am +++ b/tests/examples/camerabin/Makefile.am @@ -6,7 +6,7 @@ GST_CAMERABIN_GTK_EXAMPLES = gst-camera gst_camera_SOURCES = gst-camera.h gst-camera.c gst_camera_CFLAGS = \ - -I$(top_builddir)/gst-libs \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ $(GTK_CFLAGS) \ $(GMODULE_EXPORT_CFLAGS) \