Ultimately, this should be resolved by using Makefile.introspection.
The patch below a simpler fix that does the minimum necessary to make
introspection builds work.
XXX file upstream bug
--- clutter-gst-2.0.14/build/autotools/introspection.m4 2014-10-19 04:41:57.000000000 -0700
+++ clutter-gst-2.0.14/build/autotools/introspection.m4 2015-06-02 12:37:14.807600738 -0700
@@ -49,12 +49,14 @@
AC_MSG_RESULT([$found_introspection])
INTROSPECTION_SCANNER=
+ INTROSPECTION_SCANNER_ENV=
INTROSPECTION_COMPILER=
INTROSPECTION_GENERATE=
INTROSPECTION_GIRDIR=
INTROSPECTION_TYPELIBDIR=
if test "x$found_introspection" = "xyes"; then
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+ INTROSPECTION_SCANNER_ENV='CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)"'
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
@@ -64,6 +66,7 @@
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
fi
AC_SUBST(INTROSPECTION_SCANNER)
+ AC_SUBST(INTROSPECTION_SCANNER_ENV)
AC_SUBST(INTROSPECTION_COMPILER)
AC_SUBST(INTROSPECTION_GENERATE)
AC_SUBST(INTROSPECTION_GIRDIR)
--- clutter-gst-2.0.14/clutter-gst/Makefile.am 2015-01-25 07:02:49.000000000 -0800
+++ clutter-gst-2.0.14/clutter-gst/Makefile.am 2015-06-26 13:57:36.932028090 -0700
@@ -124,6 +124,7 @@
ClutterGst-@CLUTTER_GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-gst-@CLUTTER_GST_API_VERSION@.la
$(QUIET_GEN) \
GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no DISPLAY="" \
+ $(INTROSPECTION_SCANNER_ENV) \
$(INTROSPECTION_SCANNER) -v \
--namespace ClutterGst --nsversion=@CLUTTER_GST_API_VERSION@ \
$(INCLUDES) \