summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2011-02-23 12:00:34 -0500
committerDavid Zeuthen <davidz@redhat.com>2011-02-23 12:00:34 -0500
commit4746ff303b0803e928e5c88c961b8befc13fa57f (patch)
tree5b4ee40c836e7508fe988875d5eb8937bd1ed82b
parent78baa4742cf07fb04a9ecab24a068eca0e6ed547 (diff)
downloadpolkit-4746ff303b0803e928e5c88c961b8befc13fa57f.tar.gz
Bug 27253 – Use GOBJECT_INTROSPECTION_CHECK from gobject-introspection
https://bugs.freedesktop.org/show_bug.cgi?id=27253 Signed-off-by: David Zeuthen <davidz@redhat.com>
-rw-r--r--configure.ac22
-rw-r--r--src/polkit/Makefile.am16
-rw-r--r--src/polkitagent/Makefile.am16
3 files changed, 18 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac
index 4b7caff..5ed9894 100644
--- a/configure.ac
+++ b/configure.ac
@@ -379,25 +379,7 @@ case "$host_os" in
;;
esac
-# GObject introspection
-#
-AC_ARG_ENABLE([introspection],
- AS_HELP_STRING([--enable-introspection], [enable 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 --variable=girdir gobject-introspection-1.0)])
- #AC_SUBST([GIRTYPELIBDIR], [$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)])
- GIRDIR=${datadir}/gir-1.0
- GIRTYPELIBDIR=${libdir}/girepository-1.0
- AC_SUBST(GIRDIR)
- AC_SUBST(GIRTYPELIBDIR)
-fi
-AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes])
+GOBJECT_INTROSPECTION_CHECK([0.6.2])
AC_ARG_ENABLE([examples],
AS_HELP_STRING([--enable-examples], [Build the example programs]),,
@@ -458,7 +440,7 @@ echo "
cflags: ${CFLAGS}
cppflags: ${CPPFLAGS}
xsltproc: ${XSLTPROC}
- introspection: ${enable_introspection}
+ introspection: ${found_introspection}
Distribution/OS: ${with_os_type}
authentication framework: ${POLKIT_AUTHFW}
diff --git a/src/polkit/Makefile.am b/src/polkit/Makefile.am
index e44df1f..5876b81 100644
--- a/src/polkit/Makefile.am
+++ b/src/polkit/Makefile.am
@@ -91,15 +91,15 @@ libpolkit_gobject_1_la_LIBADD = \
libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
-if ENABLE_INTROSPECTION
-girdir = $(GIRDIR)
+if HAVE_INTROSPECTION
+girdir = $(INTROSPECTION_GIRDIR)
gir_DATA = Polkit-1.0.gir
-typelibsdir = $(GIRTYPELIBDIR)
+typelibsdir = $(INTROSPECTION_TYPELIBDIR)
typelibs_DATA = Polkit-1.0.typelib
-Polkit-1.0.gir: libpolkit-gobject-1.la $(G_IR_SCANNER) Makefile.am
- $(G_IR_SCANNER) -v \
+Polkit-1.0.gir: libpolkit-gobject-1.la $(INTROSPECTION_SCANNER) Makefile.am
+ $(INTROSPECTION_SCANNER) -v \
--warn-all \
--namespace Polkit \
--nsversion=1.0 \
@@ -115,10 +115,10 @@ Polkit-1.0.gir: libpolkit-gobject-1.la $(G_IR_SCANNER) Makefile.am
$(libpolkit_gobject_1_la_SOURCES) \
$(NULL)
-Polkit-1.0.typelib: Polkit-1.0.gir $(G_IR_COMPILER)
- $(G_IR_COMPILER) $< -o $@
+Polkit-1.0.typelib: Polkit-1.0.gir $(INTROSPECTION_COMPILER)
+ $(INTROSPECTION_COMPILER) $< -o $@
-endif # ENABLE_INTROSPECTION
+endif # HAVE_INTROSPECTION
EXTRA_DIST = polkitenumtypes.h.template polkitenumtypes.c.template
CLEANFILES = $(gir_DATA) $(typelibs_DATA)
diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am
index 8fcce06..e6caabb 100644
--- a/src/polkitagent/Makefile.am
+++ b/src/polkitagent/Makefile.am
@@ -101,15 +101,15 @@ polkit_agent_helper_1_LDADD = \
$(top_builddir)/src/polkit/libpolkit-gobject-1.la \
$(NULL)
-if ENABLE_INTROSPECTION
-girdir = $(GIRDIR)
+if HAVE_INTROSPECTION
+girdir = $(INTROSPECTION_GIRDIR)
gir_DATA = PolkitAgent-1.0.gir
-typelibsdir = $(GIRTYPELIBDIR)
+typelibsdir = $(INTROSPECTION_TYPELIBDIR)
typelibs_DATA = PolkitAgent-1.0.typelib
-PolkitAgent-1.0.gir: libpolkit-agent-1.la $(G_IR_SCANNER) Makefile.am
- $(G_IR_SCANNER) -v \
+PolkitAgent-1.0.gir: libpolkit-agent-1.la $(INTROSPECTION_SCANNER) Makefile.am
+ $(INTROSPECTION_SCANNER) -v \
--warn-all \
--namespace PolkitAgent \
--nsversion=1.0 \
@@ -127,12 +127,12 @@ PolkitAgent-1.0.gir: libpolkit-agent-1.la $(G_IR_SCANNER) Makefile.am
$(libpolkit_agent_1_la_SOURCES) \
$(NULL)
-PolkitAgent-1.0.typelib: PolkitAgent-1.0.gir $(G_IR_COMPILER)
- $(G_IR_COMPILER) \
+PolkitAgent-1.0.typelib: PolkitAgent-1.0.gir $(INTROSPECTION_COMPILER)
+ $(INTROSPECTION_COMPILER) \
--includedir $(top_builddir)/src/polkit \
$< -o $@
-endif # ENABLE_INTROSPECTION
+endif # HAVE_INTROSPECTION
# polkit-agent-helper-1 need to be setuid root because it's used to
# authenticate not only the invoking user, but possibly also root