Commit 4746ff30 authored by Adrian Bunk's avatar Adrian Bunk Committed by David Zeuthen
Browse files

Bug 27253 – Use GOBJECT_INTROSPECTION_CHECK from gobject-introspection

https://bugs.freedesktop.org/show_bug.cgi?id=27253

Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent 78baa474
......@@ -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}
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment