Patchwork [1/2] require gtk 2.20+

login
register
mail settings
Submitter Gerd Hoffmann
Date Feb. 22, 2013, 11:11 a.m.
Message ID <1361531519-4793-2-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/222514/
State New
Headers show

Comments

Gerd Hoffmann - Feb. 22, 2013, 11:11 a.m.
The gtk code uses gtk_widget_get_realized which is available in 2.20+
only, so make this the minimum accepted versions.  Fixes build failures
on RHEL-6 (which ships 2.18) by not building gtk support there.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Daniel P. Berrange - Feb. 22, 2013, 11:17 a.m.
On Fri, Feb 22, 2013 at 12:11:58PM +0100, Gerd Hoffmann wrote:
> The gtk code uses gtk_widget_get_realized which is available in 2.20+
> only, so make this the minimum accepted versions.  Fixes build failures
> on RHEL-6 (which ships 2.18) by not building gtk support there.

IMHO it'd be nicer to add the compat code to let it build with
something like this:

 #if !GTK_CHECK_VERSION(2, 18, 0)
 #define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED(w)
 #endif

Regards,
Daniel
Paolo Bonzini - Feb. 22, 2013, 11:17 a.m.
Il 22/02/2013 12:11, Gerd Hoffmann ha scritto:
> The gtk code uses gtk_widget_get_realized which is available in 2.20+
> only, so make this the minimum accepted versions.  Fixes build failures
> on RHEL-6 (which ships 2.18) by not building gtk support there.

We should either require GTK+ 3, or just use GTK_WIDGET_REALIZED().
Either is fine, I think.

Paolo

Patch

diff --git a/configure b/configure
index 0dadd31..a6b0c02 100755
--- a/configure
+++ b/configure
@@ -1644,7 +1644,7 @@  fi
 # GTK probe
 
 if test "$gtk" != "no"; then
-    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
+    if $pkg_config gtk+-2.0 --atleast-version=2.20 >/dev/null 2>/dev/null && \
        $pkg_config vte --modversion >/dev/null 2>/dev/null; then
 	gtk_cflags=`$pkg_config --cflags gtk+-2.0 2>/dev/null`
 	gtk_libs=`$pkg_config --libs gtk+-2.0 2>/dev/null`