qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] gtk: cleanup backend dependencies
@ 2014-06-02 10:58 Gerd Hoffmann
  2014-06-02 11:10 ` Daniel P. Berrange
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2014-06-02 10:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori, Richard Henderson

Make configure detect gtk x11 and win32 backends.  Make gtk backend
specific code properly #ifdefed on the new CONFIG_GTK_{X11,WIN32}
config options.  Our gtk ui code should build fine on any platform
now.

This also fixes the linker failute due to the new XkbGetKeyboard call
added by commit 3158a3482b0093e41f2b2596fba50774ea31ae08.

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure | 15 +++++++++++++++
 ui/gtk.c  |  8 +++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 0e516f9..b02f822 100755
--- a/configure
+++ b/configure
@@ -1986,6 +1986,8 @@ fi
 
 if test "$gtk" != "no"; then
     gtkpackage="gtk+-$gtkabi"
+    gtkx11package="gtk+-x11-$gtkabi"
+    gtkwin32package="gtk+-win32-$gtkabi"
     if test "$gtkabi" = "3.0" ; then
       gtkversion="3.0.0"
     else
@@ -1996,6 +1998,13 @@ if test "$gtk" != "no"; then
         gtk_libs=`$pkg_config --libs $gtkpackage`
         libs_softmmu="$gtk_libs $libs_softmmu"
         gtk="yes"
+        if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
+            gtkx11="yes"
+            gtk_libs="$gtk_libs -lX11"
+        fi
+        if $pkg_config --exists "$gtkwin32package >= $gtkversion"; then
+            gtkwin32="yes"
+        fi
     elif test "$gtk" = "yes"; then
         feature_not_found "gtk" "Install gtk2 or gtk3 devel"
     else
@@ -4459,6 +4468,12 @@ if test "$gtk" = "yes" ; then
   echo "CONFIG_GTKABI=$gtkabi" >> $config_host_mak
   echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak
 fi
+if test "$gtkx11" = "yes" ; then
+  echo "CONFIG_GTK_X11=y" >> $config_host_mak
+fi
+if test "$gtkwin32" = "yes" ; then
+  echo "CONFIG_GTK_WIN32=y" >> $config_host_mak
+fi
 if test "$vte" = "yes" ; then
   echo "CONFIG_VTE=y" >> $config_host_mak
   echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak
diff --git a/ui/gtk.c b/ui/gtk.c
index 9d06df3..773a987 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -68,7 +68,7 @@
 #include "keymaps.h"
 #include "sysemu/char.h"
 #include "qom/object.h"
-#ifndef _WIN32
+#ifdef CONFIG_GTK_X11
 #include <gdk/gdkx.h>
 #include <X11/XKBlib.h>
 #endif
@@ -925,7 +925,7 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
     int gdk_keycode = key->hardware_keycode;
     int i;
 
-#ifdef _WIN32
+#ifdef CONFIG_GTK_WIN32
     UINT qemu_keycode = MapVirtualKey(gdk_keycode, MAPVK_VK_TO_VSC);
     switch (qemu_keycode) {
     case 103:   /* alt gr */
@@ -939,12 +939,14 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
         qemu_keycode = 0;
     } else if (gdk_keycode < 97) {
         qemu_keycode = gdk_keycode - 8;
+#ifdef CONFIG_GTK_X11
     } else if (gdk_keycode < 158) {
         if (s->has_evdev) {
             qemu_keycode = translate_evdev_keycode(gdk_keycode - 97);
         } else {
             qemu_keycode = translate_xfree86_keycode(gdk_keycode - 97);
         }
+#endif
     } else if (gdk_keycode == 208) { /* Hiragana_Katakana */
         qemu_keycode = 0x70;
     } else if (gdk_keycode == 211) { /* backslash */
@@ -1822,7 +1824,7 @@ static void gd_create_menus(GtkDisplayState *s)
 
 static void gd_set_keycode_type(GtkDisplayState *s)
 {
-#ifndef _WIN32
+#ifdef CONFIG_GTK_X11
     char *keycodes = NULL;
     GdkDisplay *display = gtk_widget_get_display(s->window);
     Display *x11_display = gdk_x11_display_get_xdisplay(display);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] gtk: cleanup backend dependencies
  2014-06-02 10:58 [Qemu-devel] [PATCH] gtk: cleanup backend dependencies Gerd Hoffmann
@ 2014-06-02 11:10 ` Daniel P. Berrange
  2014-06-02 11:13   ` Daniel P. Berrange
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2014-06-02 11:10 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Anthony Liguori, Richard Henderson

On Mon, Jun 02, 2014 at 12:58:33PM +0200, Gerd Hoffmann wrote:
> diff --git a/configure b/configure
> index 0e516f9..b02f822 100755
> --- a/configure
> +++ b/configure
> @@ -1986,6 +1986,8 @@ fi
>  
>  if test "$gtk" != "no"; then
>      gtkpackage="gtk+-$gtkabi"
> +    gtkx11package="gtk+-x11-$gtkabi"
> +    gtkwin32package="gtk+-win32-$gtkabi"
>      if test "$gtkabi" = "3.0" ; then
>        gtkversion="3.0.0"
>      else
> @@ -1996,6 +1998,13 @@ if test "$gtk" != "no"; then
>          gtk_libs=`$pkg_config --libs $gtkpackage`
>          libs_softmmu="$gtk_libs $libs_softmmu"
>          gtk="yes"
> +        if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
> +            gtkx11="yes"
> +            gtk_libs="$gtk_libs -lX11"
> +        fi
> +        if $pkg_config --exists "$gtkwin32package >= $gtkversion"; then
> +            gtkwin32="yes"
> +        fi
>      elif test "$gtk" = "yes"; then
>          feature_not_found "gtk" "Install gtk2 or gtk3 devel"
>      else
> @@ -4459,6 +4468,12 @@ if test "$gtk" = "yes" ; then
>    echo "CONFIG_GTKABI=$gtkabi" >> $config_host_mak
>    echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak
>  fi
> +if test "$gtkx11" = "yes" ; then
> +  echo "CONFIG_GTK_X11=y" >> $config_host_mak
> +fi
> +if test "$gtkwin32" = "yes" ; then
> +  echo "CONFIG_GTK_WIN32=y" >> $config_host_mak
> +fi
>  if test "$vte" = "yes" ; then
>    echo "CONFIG_VTE=y" >> $config_host_mak
>    echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak

None of this configure time detection is needed, as GTK already
defines macros in its header which let you check this eg you can
just do

 #ifdef GDK_WINDOWING_WIN32
 ...Windows stuf...
 #endif

 #ifdef GDK_WINDOWING_QUARTZ
 ...OS-X stuff...
 #endif
 

 #ifdef GDK_WINDOWING_X11
 ...Xorg stuf...
 #endif

This works for GTK 2 and 3 - we're using this in GTK-VNC for
a while now [1].

> diff --git a/ui/gtk.c b/ui/gtk.c
> index 9d06df3..773a987 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -68,7 +68,7 @@
>  #include "keymaps.h"
>  #include "sysemu/char.h"
>  #include "qom/object.h"
> -#ifndef _WIN32
> +#ifdef CONFIG_GTK_X11
>  #include <gdk/gdkx.h>
>  #include <X11/XKBlib.h>
>  #endif
> @@ -925,7 +925,7 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
>      int gdk_keycode = key->hardware_keycode;
>      int i;
>  
> -#ifdef _WIN32
> +#ifdef CONFIG_GTK_WIN32
>      UINT qemu_keycode = MapVirtualKey(gdk_keycode, MAPVK_VK_TO_VSC);
>      switch (qemu_keycode) {
>      case 103:   /* alt gr */
> @@ -939,12 +939,14 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
>          qemu_keycode = 0;
>      } else if (gdk_keycode < 97) {
>          qemu_keycode = gdk_keycode - 8;
> +#ifdef CONFIG_GTK_X11
>      } else if (gdk_keycode < 158) {
>          if (s->has_evdev) {
>              qemu_keycode = translate_evdev_keycode(gdk_keycode - 97);
>          } else {
>              qemu_keycode = translate_xfree86_keycode(gdk_keycode - 97);
>          }
> +#endif

With GTK3 you can have multiple backends compiled into the GTK library
so as well as using the #ifdef GDK_WINDOWING_X11 you should also check
whether the window system is the active backend using one of the
GDK_IS_*_DISPLAY() macros

eg With GTK3 you'd do

#ifdef GDK_WINDOWING_X11
    if (GDK_IS_X11_DISPLAY(dpy)) {
       ....Xorg stuff...
    }
#endif

#ifdef GDK_WINDOWING_WIN32
    if (GDK_IS_WIN32_DISPLAY(dpy)) {
       ...Windows stuff...
    }
#endif

The only painpoint is that the GDK_IS_*_DISPLAY macros don't exist
with GTK2, but with GTK2 you can only have 1 windowing system compiled
into the binary, so you can stub out those macros to no-ops that
evaluate true

eg

/* GTK2 compat */
#ifndef GDK_IS_X11_DISPLAY
#define GDK_IS_X11_DISPLAY(dpy) (dpy == dpy)
#endif
#ifndef GDK_IS_WIN32_DISPLAY
#define GDK_IS_WIN32_DISPLAY(dpy) (dpy == dpy)
#endif
#ifndef GDK_IS_QUARTZ_DISPLAY
#define GDK_IS_QUARTZ_DISPLAY(dpy) (dpy == dpy)
#endif



Regards,
Daniel

[1] https://git.gnome.org/browse/gtk-vnc/tree/src/vncdisplaykeymap.c
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] gtk: cleanup backend dependencies
  2014-06-02 11:10 ` Daniel P. Berrange
@ 2014-06-02 11:13   ` Daniel P. Berrange
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrange @ 2014-06-02 11:13 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Anthony Liguori, Richard Henderson

On Mon, Jun 02, 2014 at 12:10:44PM +0100, Daniel P. Berrange wrote:
> On Mon, Jun 02, 2014 at 12:58:33PM +0200, Gerd Hoffmann wrote:
> > diff --git a/configure b/configure
> > index 0e516f9..b02f822 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1986,6 +1986,8 @@ fi
> >  
> >  if test "$gtk" != "no"; then
> >      gtkpackage="gtk+-$gtkabi"
> > +    gtkx11package="gtk+-x11-$gtkabi"
> > +    gtkwin32package="gtk+-win32-$gtkabi"
> >      if test "$gtkabi" = "3.0" ; then
> >        gtkversion="3.0.0"
> >      else
> > @@ -1996,6 +1998,13 @@ if test "$gtk" != "no"; then
> >          gtk_libs=`$pkg_config --libs $gtkpackage`
> >          libs_softmmu="$gtk_libs $libs_softmmu"
> >          gtk="yes"
> > +        if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
> > +            gtkx11="yes"
> > +            gtk_libs="$gtk_libs -lX11"
> > +        fi
> > +        if $pkg_config --exists "$gtkwin32package >= $gtkversion"; then
> > +            gtkwin32="yes"
> > +        fi
> >      elif test "$gtk" = "yes"; then
> >          feature_not_found "gtk" "Install gtk2 or gtk3 devel"
> >      else
> > @@ -4459,6 +4468,12 @@ if test "$gtk" = "yes" ; then
> >    echo "CONFIG_GTKABI=$gtkabi" >> $config_host_mak
> >    echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak
> >  fi
> > +if test "$gtkx11" = "yes" ; then
> > +  echo "CONFIG_GTK_X11=y" >> $config_host_mak
> > +fi
> > +if test "$gtkwin32" = "yes" ; then
> > +  echo "CONFIG_GTK_WIN32=y" >> $config_host_mak
> > +fi
> >  if test "$vte" = "yes" ; then
> >    echo "CONFIG_VTE=y" >> $config_host_mak
> >    echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak
> 
> None of this configure time detection is needed, as GTK already
> defines macros in its header which let you check this eg you can
> just do

Correction - the setting of CONFIG_GTK_* stuff is not needed,
the addition of '-lX11' is still needed.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH] gtk: cleanup backend dependencies
@ 2014-06-02 11:50 Gerd Hoffmann
  2014-06-02 11:54 ` Daniel P. Berrange
  2014-06-02 18:13 ` Richard Henderson
  0 siblings, 2 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2014-06-02 11:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori, Richard Henderson

Make configure detect gtk x11 backend and link libX11 then.  Make
gtk backend specific code properly #ifdef'ed on the GTK_WINDOWING_*
backends at runtime).  Our gtk ui code should build and run fine on
any platform now.

This also fixes the linker failute due to the new XkbGetKeyboard call
added by commit 3158a3482b0093e41f2b2596fba50774ea31ae08.

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure |  4 +++
 ui/gtk.c  | 97 ++++++++++++++++++++++++++++++++++++---------------------------
 2 files changed, 60 insertions(+), 41 deletions(-)

diff --git a/configure b/configure
index 0e516f9..871452e 100755
--- a/configure
+++ b/configure
@@ -1986,6 +1986,7 @@ fi
 
 if test "$gtk" != "no"; then
     gtkpackage="gtk+-$gtkabi"
+    gtkx11package="gtk+-x11-$gtkabi"
     if test "$gtkabi" = "3.0" ; then
       gtkversion="3.0.0"
     else
@@ -1996,6 +1997,9 @@ if test "$gtk" != "no"; then
         gtk_libs=`$pkg_config --libs $gtkpackage`
         libs_softmmu="$gtk_libs $libs_softmmu"
         gtk="yes"
+        if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
+            gtk_libs="$gtk_libs -lX11"
+        fi
     elif test "$gtk" = "yes"; then
         feature_not_found "gtk" "Install gtk2 or gtk3 devel"
     else
diff --git a/ui/gtk.c b/ui/gtk.c
index 9d06df3..3490999 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -68,7 +68,7 @@
 #include "keymaps.h"
 #include "sysemu/char.h"
 #include "qom/object.h"
-#ifndef _WIN32
+#ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
 #include <X11/XKBlib.h>
 #endif
@@ -112,6 +112,13 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 #define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED(widget)
 #endif
 
+#ifndef GDK_IS_X11_DISPLAY
+#define GDK_IS_X11_DISPLAY(dpy) (dpy == dpy)
+#endif
+#ifndef GDK_IS_WIN32_DISPLAY
+#define GDK_IS_WIN32_DISPLAY(dpy) (dpy == dpy)
+#endif
+
 #ifndef GDK_KEY_0
 #define GDK_KEY_0 GDK_0
 #define GDK_KEY_1 GDK_1
@@ -922,37 +929,43 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
 {
     VirtualConsole *vc = opaque;
     GtkDisplayState *s = vc->s;
+    GdkDisplay *dpy = gtk_widget_get_display(widget);
     int gdk_keycode = key->hardware_keycode;
+    int qemu_keycode = 0;
     int i;
 
-#ifdef _WIN32
-    UINT qemu_keycode = MapVirtualKey(gdk_keycode, MAPVK_VK_TO_VSC);
-    switch (qemu_keycode) {
-    case 103:   /* alt gr */
-        qemu_keycode = 56 | SCANCODE_GREY;
-        break;
+#ifdef GDK_WINDOWING_WIN32
+    if (GDK_IS_WIN32_DISPLAY(dpy)) {
+        qemu_keycode = MapVirtualKey(gdk_keycode, MAPVK_VK_TO_VSC);
+        switch (qemu_keycode) {
+        case 103:   /* alt gr */
+            qemu_keycode = 56 | SCANCODE_GREY;
+            break;
+        }
     }
-#else
-    int qemu_keycode;
-
-    if (gdk_keycode < 9) {
-        qemu_keycode = 0;
-    } else if (gdk_keycode < 97) {
-        qemu_keycode = gdk_keycode - 8;
-    } else if (gdk_keycode < 158) {
-        if (s->has_evdev) {
-            qemu_keycode = translate_evdev_keycode(gdk_keycode - 97);
+#endif
+
+    if (qemu_keycode == 0) {
+        if (gdk_keycode < 9) {
+            qemu_keycode = 0;
+        } else if (gdk_keycode < 97) {
+            qemu_keycode = gdk_keycode - 8;
+#ifdef GDK_WINDOWING_X11
+        } else if (GDK_IS_X11_DISPLAY(dpy) && gdk_keycode < 158) {
+            if (s->has_evdev) {
+                qemu_keycode = translate_evdev_keycode(gdk_keycode - 97);
+            } else {
+                qemu_keycode = translate_xfree86_keycode(gdk_keycode - 97);
+            }
+#endif
+        } else if (gdk_keycode == 208) { /* Hiragana_Katakana */
+            qemu_keycode = 0x70;
+        } else if (gdk_keycode == 211) { /* backslash */
+            qemu_keycode = 0x73;
         } else {
-            qemu_keycode = translate_xfree86_keycode(gdk_keycode - 97);
+            qemu_keycode = 0;
         }
-    } else if (gdk_keycode == 208) { /* Hiragana_Katakana */
-        qemu_keycode = 0x70;
-    } else if (gdk_keycode == 211) { /* backslash */
-        qemu_keycode = 0x73;
-    } else {
-        qemu_keycode = 0;
     }
-#endif
 
     trace_gd_key_event(vc->label, gdk_keycode, qemu_keycode,
                        (key->type == GDK_KEY_PRESS) ? "down" : "up");
@@ -1822,23 +1835,25 @@ static void gd_create_menus(GtkDisplayState *s)
 
 static void gd_set_keycode_type(GtkDisplayState *s)
 {
-#ifndef _WIN32
-    char *keycodes = NULL;
+#ifdef GDK_WINDOWING_X11
     GdkDisplay *display = gtk_widget_get_display(s->window);
-    Display *x11_display = gdk_x11_display_get_xdisplay(display);
-    XkbDescPtr desc = XkbGetKeyboard(x11_display, XkbGBN_AllComponentsMask,
-                                     XkbUseCoreKbd);
-
-    if (desc && desc->names) {
-        keycodes = XGetAtomName(x11_display, desc->names->keycodes);
-    }
-    if (keycodes == NULL) {
-        fprintf(stderr, "could not lookup keycode name\n");
-    } else if (strstart(keycodes, "evdev", NULL)) {
-        s->has_evdev = true;
-    } else if (!strstart(keycodes, "xfree86", NULL)) {
-        fprintf(stderr, "unknown keycodes `%s', please report to "
-                "qemu-devel@nongnu.org\n", keycodes);
+    if (GDK_IS_X11_DISPLAY(display)) {
+        Display *x11_display = gdk_x11_display_get_xdisplay(display);
+        XkbDescPtr desc = XkbGetKeyboard(x11_display, XkbGBN_AllComponentsMask,
+                                         XkbUseCoreKbd);
+        char *keycodes = NULL;
+
+        if (desc && desc->names) {
+            keycodes = XGetAtomName(x11_display, desc->names->keycodes);
+        }
+        if (keycodes == NULL) {
+            fprintf(stderr, "could not lookup keycode name\n");
+        } else if (strstart(keycodes, "evdev", NULL)) {
+            s->has_evdev = true;
+        } else if (!strstart(keycodes, "xfree86", NULL)) {
+            fprintf(stderr, "unknown keycodes `%s', please report to "
+                    "qemu-devel@nongnu.org\n", keycodes);
+        }
     }
 #endif
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] gtk: cleanup backend dependencies
  2014-06-02 11:50 Gerd Hoffmann
@ 2014-06-02 11:54 ` Daniel P. Berrange
  2014-06-02 18:13 ` Richard Henderson
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrange @ 2014-06-02 11:54 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Anthony Liguori, Richard Henderson

On Mon, Jun 02, 2014 at 01:50:25PM +0200, Gerd Hoffmann wrote:
> Make configure detect gtk x11 backend and link libX11 then.  Make
> gtk backend specific code properly #ifdef'ed on the GTK_WINDOWING_*
> backends at runtime).  Our gtk ui code should build and run fine on
> any platform now.
> 
> This also fixes the linker failute due to the new XkbGetKeyboard call
> added by commit 3158a3482b0093e41f2b2596fba50774ea31ae08.
> 
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  configure |  4 +++
>  ui/gtk.c  | 97 ++++++++++++++++++++++++++++++++++++---------------------------
>  2 files changed, 60 insertions(+), 41 deletions(-)

Looks good.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] gtk: cleanup backend dependencies
  2014-06-02 11:50 Gerd Hoffmann
  2014-06-02 11:54 ` Daniel P. Berrange
@ 2014-06-02 18:13 ` Richard Henderson
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2014-06-02 18:13 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel; +Cc: Anthony Liguori

On 06/02/2014 04:50 AM, Gerd Hoffmann wrote:
> @@ -1996,6 +1997,9 @@ if test "$gtk" != "no"; then
>          gtk_libs=`$pkg_config --libs $gtkpackage`
>          libs_softmmu="$gtk_libs $libs_softmmu"
>          gtk="yes"
> +        if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
> +            gtk_libs="$gtk_libs -lX11"
> +        fi

You need to move this hunk above the libs_softmmu line,
otherwise the assignment is unused.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-02 18:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 10:58 [Qemu-devel] [PATCH] gtk: cleanup backend dependencies Gerd Hoffmann
2014-06-02 11:10 ` Daniel P. Berrange
2014-06-02 11:13   ` Daniel P. Berrange
  -- strict thread matches above, loose matches on Subject: below --
2014-06-02 11:50 Gerd Hoffmann
2014-06-02 11:54 ` Daniel P. Berrange
2014-06-02 18:13 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).