[gir-repository] Add --with-skipped-gir-modules
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gir-repository] Add --with-skipped-gir-modules
- Date: Thu, 14 Jan 2010 01:14:30 +0000 (UTC)
commit 5d0c6c8c8d5a182557de5b0a2ca59bf9f2a177eb
Author: Colin Walters <walters verbum org>
Date: Tue Jan 12 16:07:03 2010 -0500
Add --with-skipped-gir-modules
Commit 7e443e50012004a2fafb caused us to skip building a .gir if
the relevant module was new enough to have introspection support;
however, this doesn't work if the module wasn't built with introspection.
As a stopgap, revert to building all .girs, but introduce a new
configure switch to skip building a list of given .girs. This
is more suitable for OS builders who are in control of the compilation
of both modules.
To implement this, create a new M4 macro GIR_CHECK to avoid a lot
of copy&paste.
https://bugzilla.gnome.org/show_bug.cgi?id=605724
configure.ac | 117 ++++++++++++++++++++++------------------------------------
1 files changed, 44 insertions(+), 73 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0f50b9e..44be9db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,34 +20,39 @@ AC_CONFIG_MACRO_DIR([m4])
# GObject Introspection
GOBJECT_INTROSPECTION_REQUIRE(0.6.7)
+AC_ARG_WITH([skipped-gir-modules], [AS_HELP_STRING([--with-skipped-gir-modules], [Comma-separated list of namespaces to skip building (e.g. "Pango,Gst")])], [], [])
+# This way we can grep for ,foo,
+with_skipped_gir_modules=,$with_skipped_gir_modules,
+
+m4_define([GIR_CHECK], [
+ m4_define([modname], m4_if([$3], [],
+ translit($1, 'a-z', 'A-Z'),
+ [$3]))
+ if echo $with_skipped_gir_modules | grep -q ,$1,; then
+ echo "Checking for $1...skipped"
+ have_$1=false
+ else
+ PKG_CHECK_MODULES(modname, $2, have_$1=true, have_$1=false)
+ fi
+ AM_CONDITIONAL([BUILD_]modname, $have_$1)
+])
+
dnl dbus
-PKG_CHECK_MODULES(DBUS, dbus-glib-1,
- have_dbus=true, have_dbus=false)
-AM_CONDITIONAL(BUILD_DBUS, $have_dbus)
+GIR_CHECK(DBus, dbus-glib-1)
dnl atk - has upstream support since 1.29.4
-PKG_CHECK_MODULES(ATK, atk >= 1.12.0 atk < 1.29.4,
- have_atk=true, have_atk=false)
-AM_CONDITIONAL(BUILD_ATK, $have_atk)
+GIR_CHECK(Atk, atk >= 1.12.0)
dnl pango - has upstream support since 1.25.4
-PKG_CHECK_MODULES(PANGO, pango >= 1.16.0 pango < 1.25.4,
- have_pango=true, have_pango=false)
-AM_CONDITIONAL(BUILD_PANGO, $have_pango)
+GIR_CHECK(Pango, pango >= 1.16.0)
-PKG_CHECK_MODULES(PANGOXFT, pangoxft >= 1.16.0 pangoxft < 1.25.4,
- have_pangoxft=true, have_pangoxft=false)
-AM_CONDITIONAL(BUILD_PANGOXFT, $have_pangoxft)
+GIR_CHECK(PangoXft, pangoxft >= 1.16.0)
dnl poppler
-PKG_CHECK_MODULES(POPPLER, poppler-glib >= 0.8,
- have_poppler=true, have_poppler=false)
-AM_CONDITIONAL(BUILD_POPPLER, $have_poppler)
+GIR_CHECK(Poppler, poppler-glib >= 0.8)
dnl gtk+ - has upstream support since 2.19.2
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 1.12.0 gtk+-2.0 < 2.19.2,
- have_gtk=true, have_gtk=false)
-AM_CONDITIONAL(BUILD_GTK, $have_gtk)
+GIR_CHECK(Gtk, gtk+-2.0 >= 1.12.0)
GDK_TARGET=
GDK_TARGET_GIRS=
if $have_gtk; then
@@ -62,49 +67,31 @@ AC_SUBST(GDK_TARGET)
AC_SUBST(GDK_TARGET_GIRS)
dnl gconf
-PKG_CHECK_MODULES(GCONF, gconf-2.0,
- have_gconf=true, have_gconf=false)
-AM_CONDITIONAL(BUILD_GCONF, $have_gconf)
+GIR_CHECK(GConf, gconf-2.0)
dnl soup
-PKG_CHECK_MODULES(SOUP, libsoup-2.4,
- have_soup=true, have_soup=false)
-AM_CONDITIONAL(BUILD_SOUP, $have_soup)
+GIR_CHECK(Soup, libsoup-2.4)
dnl babl
-PKG_CHECK_MODULES(BABL, babl,
- have_babl=true, have_babl=false)
-AM_CONDITIONAL(BUILD_BABL, $have_babl)
+GIR_CHECK(BABL, babl)
dnl nautilus-extension
-PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension,
- have_nautilusextension=true, have_nautilusextension=false)
-AM_CONDITIONAL(BUILD_NAUTILUS, $have_nautilusextension)
+GIR_CHECK(Nautilus, libnautilus-extension)
dnl gnome-keyring
-PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1,
- have_gnomekeyring=true, have_gnomekeyring=false)
-AM_CONDITIONAL(BUILD_GNOMEKEYRING, $have_gnomekeyring)
+GIR_CHECK(GnomeKeyring, gnome-keyring-1)
dnl webkit - has upstream support since 1.1.16
-PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= 1.0 webkit-1.0 < 1.1.16,
- have_webkit=true, have_webkit=false)
-AM_CONDITIONAL(BUILD_WEBKIT, $have_webkit)
+GIR_CHECK(WebKit, webkit-1.0 >= 1.0)
dnl notify
-PKG_CHECK_MODULES(NOTIFY, libnotify,
- have_notify=true, have_notify=false)
-AM_CONDITIONAL(BUILD_NOTIFY, $have_notify)
+GIR_CHECK(Notify, libnotify)
dnl gnio
-PKG_CHECK_MODULES(GNIO, gnio,
- have_gnio=true, have_gnio=false)
-AM_CONDITIONAL(BUILD_GNIO, $have_gnio)
+GIR_CHECK(Gnio, gnio)
dnl gstreamer supports introspection starting from 0.10.25
-PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10 >= 0.10.0 gstreamer-0.10 < 0.10.25],
- have_gstreamer=true, have_gstreamer=false)
-AM_CONDITIONAL(BUILD_GSTREAMER, $have_gstreamer)
+GIR_CHECK(Gst, gstreamer-0.10 >= 0.10.0, GSTREAMER)
dnl gstbufferlist.h, gsttaskpool.h were added in 0.10.24 (and in
dnl prereleases of that)
@@ -125,25 +112,19 @@ fi
AM_CONDITIONAL(HAVE_GSTTASKPOOL_H, $have_gsttaskpool_h)
dnl gst-plugins-base supports introspection starting from 0.10.25
-PKG_CHECK_MODULES(GSTREAMER_PLUGINS_BASE, [gstreamer-plugins-base-0.10 >= 0.10.0 gstreamer-plugins-base-0.10 < 0.10.25],
+PKG_CHECK_MODULES(GSTREAMER_PLUGINS_BASE, [gstreamer-plugins-base-0.10 >= 0.10.0],
have_gstreamer_plugins_base=true,
have_gstreamer_plugins_base=false)
AM_CONDITIONAL(BUILD_GSTREAMER_PLUGINS_BASE, $have_gstreamer_plugins_base)
dnl gtksourceview
-PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview-2.0,
- have_gtksourceview=true, have_gtksourceview=false)
-AM_CONDITIONAL(BUILD_GTKSOURCEVIEW, $have_gtksourceview)
+GIR_CHECK(GtkSourceView, gtksourceview-2.0)
dnl vte
-PKG_CHECK_MODULES(VTE, vte,
- have_vte=true, have_vte=false)
-AM_CONDITIONAL(BUILD_VTE, $have_vte)
+GIR_CHECK(Vte, vte)
dnl goocanvas
-PKG_CHECK_MODULES(GOOCANVAS, goocanvas,
- have_goocanvas=true, have_goocanvas=false)
-AM_CONDITIONAL(BUILD_GOOCANVAS, $have_goocanvas)
+GIR_CHECK(GooCanvas, goocanvas)
dnl mission-control (disabled for now, it has odd structs and isn't useful yet)
dnl PKG_CHECK_MODULES(MISSIONCONTROL, libmissioncontrol,
@@ -152,38 +133,28 @@ have_missioncontrol=false
AM_CONDITIONAL(BUILD_MISSIONCONTROL, $have_missioncontrol)
dnl gssdp
-PKG_CHECK_MODULES(GSSDP, gssdp-1.0,
- have_gssdp=true, have_gssdp=false)
-AM_CONDITIONAL(BUILD_GSSDP, $have_gssdp)
+GIR_CHECK(GSSDP, gssdp-1.0)
-dnl gupnp
-if test $have_gssdp; then
+dnl gupnp, not using macro due to conditional on have_gssdp too
+if test $have_gssdp && echo $with_skipped_gir_modules | grep -q ,GUPNP,; then
PKG_CHECK_MODULES(GUPNP, gupnp-1.0,
have_gupnp=true, have_gupnp=false)
else
- have_gupnp=false
+ have_gupnp=false
fi
AM_CONDITIONAL(BUILD_GUPNP, $have_gupnp)
dnl avahi-gobject
-PKG_CHECK_MODULES(AVAHI, avahi-core >= 0.6 avahi-gobject >= 0.6,
- have_avahi=true, have_avahi=false)
-AM_CONDITIONAL(BUILD_AVAHI, $have_avahi)
+GIR_CHECK(Avahi, avahi-core >= 0.6 avahi-gobject >= 0.6)
dnl unique
-PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= 1.0.0,
- have_unique=true, have_unique=false)
-AM_CONDITIONAL(BUILD_UNIQUE, $have_unique)
+GIR_CHECK(Unique, unique-1.0 >= 1.0.0)
dnl gmenu
-PKG_CHECK_MODULES(GMENU, libgnome-menu,
- have_gmenu=true, have_gmenu=false)
-AM_CONDITIONAL(BUILD_GMENU, $have_gmenu)
+GIR_CHECK(GMenu, libgnome-menu)
dnl wnck
-PKG_CHECK_MODULES(WNCK, libwnck-1.0,
- have_wnck=true, have_wnck=false)
-AM_CONDITIONAL(BUILD_WNCK, $have_wnck)
+GIR_CHECK(Wnck, libwnck-1.0)
AC_CONFIG_FILES([Makefile
gir/Makefile])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]