Bug 27253 – Use GOBJECT_INTROSPECTION_CHECK from gobject-introspection
authorAdrian Bunk <bunk@stusta.de>
Wed, 23 Feb 2011 17:00:34 +0000 (12:00 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Wed, 23 Feb 2011 17:00:34 +0000 (12:00 -0500)
https://bugs.freedesktop.org/show_bug.cgi?id=27253

Signed-off-by: David Zeuthen <davidz@redhat.com>
configure.ac
src/polkit/Makefile.am
src/polkitagent/Makefile.am

index 4b7caffc45a19879029cc593d8cacffa8230f9ff..5ed989465ed3680e1f8047dd52b687b012bc071f 100644 (file)
@@ -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}
index e44df1fa1e4fdc6fc67598b52dfcfb890360c79a..5876b81746177cf50e24c0bf5bdaa0f1612adc6b 100644 (file)
@@ -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)
index 8fcce0669bca2be815a0806649521925a50d828c..e6caabb9c80ae535868203bde05b8407a8b48c46 100644 (file)
@@ -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