use GOBJECT_INTROSPECTION_CHECK from
PATCH 1/1 use GOBJECT_INTROSPECTION_CHECK from
instead of own autoconf code doing the same
Behavior change:
introspection now defaults to "auto" instead of "yes".
--- Makefile.am | 14 ++++---- configure.ac | 16 +------- m4/introspection.m4 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 21 deletions(-) create mode 100644 m4/introspection.m4
Makefile.am +7 -7
@@ -369,11 +369,11 @@ extras/gudev/gudevenumtypes.c: extras/gudev/gudevenumtypes.c.template extras/gud $(AM_V_GEN)glib-mkenums --template $^ > \ [email protected] && mv [email protected] $@ -if ENABLE_INTROSPECTION -extras/gudev/GUdev-1.0.gir: extras/gudev/libgudev-1.0.la $(G_IR_SCANNER) Makefile.am +if HAVE_INTROSPECTION +extras/gudev/GUdev-1.0.gir: extras/gudev/libgudev-1.0.la $(INTROSPECTION_SCANNER) Makefile.am $(AM_V_GEN)PKG_CONFIG_PATH=$(top_builddir)/data:$$PKG_CONFIG_PATH \ LD_LIBRARY_PATH=$(top_builddir)/extras/gudev \ - $(G_IR_SCANNER) -v \ + $(INTROSPECTION_SCANNER) -v \ --namespace GUdev \ --nsversion=1.0 \ --include=GObject-2.0 \
@@ -395,17 +395,17 @@ extras/gudev/GUdev-1.0.gir: extras/gudev/libgudev-1.0.la $(G_IR_SCANNER) Makefil $(top_srcdir)/extras/gudev/gudevclient.c \ $(top_srcdir)/extras/gudev/gudevdevice.c -extras/gudev/GUdev-1.0.typelib: extras/gudev/GUdev-1.0.gir $(G_IR_COMPILER) +extras/gudev/GUdev-1.0.typelib: extras/gudev/GUdev-1.0.gir $(INTROSPECTION_COMPILER) $(AM_V_GEN)g-ir-compiler $< -o $@ -girdir = $(GIRDIR) +girdir = $(INTROSPECTION_GIRDIR) gir_DATA = extras/gudev/GUdev-1.0.gir -typelibsdir = $(GIRTYPELIBDIR) +typelibsdir = $(INTROSPECTION_TYPELIBDIR) typelibs_DATA = extras/gudev/GUdev-1.0.typelib CLEANFILES += $(gir_DATA) $(typelibs_DATA) -endif # ENABLE_INTROSPECTION +endif # HAVE_INTROSPECTION # ------------------------------------------------------------------------------ # Bluetooth HID devices with special magic to switch the device
configure.ac +2 -14
@@ -87,19 +87,7 @@ if test "x$enable_extras" = xyes; then fi AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes]) -AC_ARG_ENABLE([introspection], - AS_HELP_STRING([--disable-introspection], [disable GObject introspection]), - [], [enable_introspection=yes]) -if test "x$enable_introspection" = xyes; then - PKG_CHECK_MODULES([INTROSPECTION], [gobject-introspection-1.0 >= 0.6.2]) - AC_DEFINE([ENABLE_INTROSPECTION], [1], [enable GObject introspection support]) - AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)]) - AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)]) - AC_SUBST([G_IR_GENERATE], [$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)]) - AC_SUBST([GIRDIR], [$($PKG_CONFIG --define-variableÚtadir=${datadir} --variable=girdir gobject-introspection-1.0)]) - AC_SUBST([GIRTYPELIBDIR], [$($PKG_CONFIG --define-variable=libdir=${libdir} --variable=typelibdir gobject-introspection-1.0)]) -fi -AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes]) +GOBJECT_INTROSPECTION_CHECK([0.6.2]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([
@@ -140,7 +128,7 @@ AC_MSG_RESULT([ ldflags: ${LDFLAGS} extras: ${enable_extras} - gintrospection: ${enable_introspection} + gintrospection: ${found_introspection} usb.ids: ${USB_DATABASE} pci.ids: ${PCI_DATABASE}
m4/introspection.m4 new file +89 -0
89 lines not on this page · raw message
Signature · 1 line
1.5.6.1