Ultimately, this should be resolved by a proper fix for this upstream bug:
726571 should use Makefile.introspection
The patch below a simpler fix that does the minimum necessary to make
introspection builds work.
--- gst-plugins-good-1.4.5/common/m4/introspection.m4 2014-10-19 04:41:57.000000000 -0700
+++ gst-plugins-good-1.4.5/common/m4/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)