[gtk-vnc] Cope with building against newer gobject-introspection
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Cope with building against newer gobject-introspection
- Date: Thu, 28 Oct 2010 15:41:34 +0000 (UTC)
commit 8bae7c4858919d66c275e7a575837a824ca8e84a
Author: Daniel P. Berrange <berrange redhat com>
Date: Thu Oct 28 15:27:28 2010 +0100
Cope with building against newer gobject-introspection
Newer gobject-introspection wants --symbol-prefix and
--identifier-prefix instead of --strip-prefix. Test
for such a version and use the new style options if
appropriate
* configure.ac: Check for new gobject introspection
* src/Makefile.am: Adapt to g-ir-scanner flags
configure.ac | 31 +++++++++++++++++++++++--------
src/Makefile.am | 11 ++++++++---
2 files changed, 31 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c82393e..16f4b3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,7 @@ CAIRO_REQUIRED=1.2.0
FIREFOX_PLUGIN_REQUIRED=2.0.0
MOZILLA_PLUGIN_REQUIRED=1.8
GOBJECT_INTROSPECTION_REQUIRED=0.6.2
+GOBJECT_INTROSPECTION_DESIRED=0.9.4
dnl *******************************************************************************
dnl Get the version information at compile-time
@@ -96,7 +97,7 @@ case "$with_gtk" in
GTK_VNC_API_VERSION=1.0
;;
3.0) GTK_API_VERSION=3.0
- GTK_REQUIRED=2.90.4
+ GTK_REQUIRED=2.91.3
GTK_VNC_API_VERSION=2.0
;;
esac
@@ -366,17 +367,30 @@ AC_ARG_ENABLE([introspection],
AS_HELP_STRING([--enable-introspection], [enable GObject introspection]),
[], [enable_introspection=check])
+has_symbol_prefix=no
if test "x$enable_introspection" != "xno" ; then
PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],
- [gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED],
- [enable_introspection=yes],
+ [gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_DESIRED],
[
- if test "x$enable_introspection" = "xcheck"; then
- enable_introspection=no
- else
- AC_MSG_ERROR([gobject-introspection is not available])
- fi
+ enable_introspection=yes
+ has_symbol_prefix=yes
+ ],
+ [
+ PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],
+ [gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED],
+ [
+ enable_introspection=yes
+ has_symbol_prefix=no
+ ],
+ [
+ if test "x$enable_introspection" = "xcheck"; then
+ enable_introspection=no
+ else
+ AC_MSG_ERROR([gobject-introspection is not available])
+ fi
+ ])
])
+
if test "x$enable_introspection" = "xyes" ; then
AC_DEFINE([WITH_GOBJECT_INTROSPECTION], [1], [enable GObject introspection support])
AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
@@ -386,6 +400,7 @@ if test "x$enable_introspection" != "xno" ; then
fi
fi
AM_CONDITIONAL([WITH_GOBJECT_INTROSPECTION], [test "x$enable_introspection" = "xyes"])
+AM_CONDITIONAL([G_IR_SCANNER_SYMBOL_PREFIX], [test "x$has_symbol_prefix" = "xyes"])
AC_CONFIG_FILES(
Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 85649fb..87353b2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -283,8 +283,13 @@ GTK_VNC_INTROSPECTION_SRCS = \
if HAVE_GTK_2
GTK_VNC_INTROSPECTION_SRCS += \
- $(srcdir)/vncimageframebuffer.h $(srcdir)/vncimageframebuffer.c \
+ $(srcdir)/vncimageframebuffer.h $(srcdir)/vncimageframebuffer.c
+endif
+
+if G_IR_SCANNER_SYMBOL_PREFIX
+PREFIX_ARGS = --symbol-prefix=vnc --identifier-prefix=Vnc
else
+PREFIX_ARGS = --strip-prefix=Vnc
endif
GVnc-1.0.gir: libgvnc-1.0.la $(G_IR_SCANNER) Makefile.am
@@ -292,7 +297,7 @@ GVnc-1.0.gir: libgvnc-1.0.la $(G_IR_SCANNER) Makefile.am
--namespace GVnc \
--nsversion 1.0 \
--include GObject-2.0 \
- --strip-prefix=Vnc \
+ $(PREFIX_ARGS) \
--library=$(builddir)/libgvnc-1.0.la \
--add-include-path=$(top_srcdir) \
--add-include-path=$(srcdir) \
@@ -314,7 +319,7 @@ GtkVnc-$(GTK_VNC_API_VERSION).gir: GVnc-1.0.gir libgtk-vnc-$(GTK_VNC_API_VERSION
--include GObject-2.0 \
--include Gtk-$(GTK_API_VERSION) \
--include GVnc-1.0 \
- --strip-prefix=Vnc \
+ $(PREFIX_ARGS) \
--library=$(builddir)/libgtk-vnc-$(GTK_VNC_API_VERSION).la \
--add-include-path=$(top_srcdir) \
--add-include-path=$(srcdir) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]