aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-03-17 11:03:08 -0500
committerTed Gould <ted@canonical.com>2009-03-17 11:03:08 -0500
commitfe24c75139fae9369d21a343fcc574c7db5155f7 (patch)
tree6e76bb3ea9fede49fbc98ad4e52a525f6ec5f553
parent148a7df7bd56600090c2faf4e67ccbc041ab0b32 (diff)
parentfdc47f8ef835d7a06f97f60caa1d476eb26db1f2 (diff)
downloadlibayatana-indicator-fe24c75139fae9369d21a343fcc574c7db5155f7.tar.gz
libayatana-indicator-fe24c75139fae9369d21a343fcc574c7db5155f7.tar.bz2
libayatana-indicator-fe24c75139fae9369d21a343fcc574c7db5155f7.zip
Changes to make GIR optional from the applet branch
-rw-r--r--configure.ac29
-rw-r--r--libindicate/Makefile.am3
2 files changed, 19 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index e32da5f..fe049c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,19 +61,22 @@ AC_SUBST(LIBINDICATE_LIBS)
# GObject Introspection
###########################
-PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, [gobject-introspection-1.0 >= 0.6])
-
-G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-AC_SUBST(G_IR_SCANNER)
-G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-AC_SUBST(G_IR_COMPILER)
-G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-AC_SUBST(G_IR_GENERATE)
-
-GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
-AC_SUBST(GIRDIR)
-TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
-AC_SUBST(TYPELIBDIR)
+PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, [gobject-introspection-1.0 >= 0.6], gir_ok=yes, gir_ok=no)
+
+AM_CONDITIONAL(USE_GIR, test "x$gir_ok" = "xyes")
+if test "x$gir_ok" = "xyes"; then
+ G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+ AC_SUBST(G_IR_SCANNER)
+ G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+ AC_SUBST(G_IR_COMPILER)
+ G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+ AC_SUBST(G_IR_GENERATE)
+
+ GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ AC_SUBST(GIRDIR)
+ TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+ AC_SUBST(TYPELIBDIR)
+fi
###########################
# GTK Doc
diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am
index b851919..5a6f466 100644
--- a/libindicate/Makefile.am
+++ b/libindicate/Makefile.am
@@ -95,6 +95,8 @@ listener-marshal.c: $(srcdir)/listener-marshal.list
pkgconfig_DATA = indicate.pc
pkgconfigdir = $(libdir)/pkgconfig
+if USE_GIR
+
gobjectintrospection_gir_DATA = \
Indicate-0.1.gir
gobjectintrospection_girdir = $(datadir)/gir
@@ -124,3 +126,4 @@ DISTCLEANFILES = \
Indicate-0.1.gir \
Indicate-0.1.typelib
+endif