[gtkparasite] build: Fix X11 detection to actually use GTK+ 3.0



commit fe127f622d1dff409e0881a7ab64d7d9791cf638
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Sep 27 14:14:32 2013 +0200

    build: Fix X11 detection to actually use GTK+ 3.0
    
    The X11 detection was using the "target" variable in the GTK+ 2.x
    pkg-config file instead of the "targets" variable in the GTK+ 3.x
    pkg-config file.

 configure.ac |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c7e12be..235d446 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,8 +56,15 @@ PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.3.16])
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
-GDK_BACKEND=`pkg-config --variable=target gtk+-2.0`
-AM_CONDITIONAL(HAVE_X11, [test x"$GDK_BACKEND" = x"x11"])
+GDK_BACKENDS=`pkg-config --variable=targets gtk+-3.0`
+have_x11_backend=no
+for target in $GDK_BACKENDS; do
+  if test x"$GDK_BACKEND" = x"x11"; then
+    have_x11_backend=true
+  fi
+done
+
+AM_CONDITIONAL(HAVE_X11, [test x"$have_x11_backend" = x"true"])
 
 dnl # Use wall if we have GCC
 if test "x$GCC" = "xyes"; then


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]