[virt-tools-list] [virt-viewer v2 2/5] Use GDK_VERSION_MAX_ALLOWED

Fabiano Fidêncio fidencio at redhat.com
Wed Feb 24 07:04:56 UTC 2016


In order to avoid using a too new Gtk API.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 configure.ac | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 437f6e4..286c7f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,9 +16,12 @@ AM_SILENT_RULES([yes])
 GLIB2_REQUIRED="2.38"
 GLIB2_ENCODED_VERSION="GLIB_VERSION_2_38"
 
+# Keep these two definitions in agreement.
+GTK_REQUIRED="3.10"
+GTK_ENCODED_VERSION="GDK_VERSION_3_10"
+
 LIBXML2_REQUIRED="2.6.0"
 LIBVIRT_REQUIRED="0.10.0"
-GTK_REQUIRED="3.10"
 GTK_VNC_REQUIRED="0.4.0"
 SPICE_GTK_REQUIRED="0.30"
 SPICE_PROTOCOL_REQUIRED="0.12.7"
@@ -126,6 +129,10 @@ AC_CHECK_LIB([virt],
 LIBS=$old_LIBS
 
 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED)
+GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=$GTK_ENCODED_VERSION"
+GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MAX_ALLOWED=$GTK_ENCODED_VERSION"
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
 
 AC_ARG_WITH([gtk-vnc],
     AS_HELP_STRING([--without-gtk-vnc], [Ignore presence of gtk-vnc and disable it]))
-- 
2.5.0




More information about the virt-tools-list mailing list