]> Pileus Git - ~andy/gtk/commitdiff
configure: Detect XInput 2.2
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 28 Feb 2011 19:43:03 +0000 (20:43 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 1 Mar 2012 21:19:57 +0000 (16:19 -0500)
configure.ac
gdk/x11/Makefile.am

index a74cb8249bc41f4478fb69b14c01ef9cbf654372..25a84280e70303168a2240b90937fc33618406f7 100644 (file)
@@ -935,7 +935,7 @@ if test "x$enable_x11_backend" = xyes; then
     have_base_x_pc=true
     X_PACKAGES="$X_PACKAGES x11 xext"
     x_libs="`$PKG_CONFIG --libs x11 xext`"
-    X_CFLAGS="`$PKG_CONFIG --cflags x11 xext`"
+    X_CFLAGS="`$PKG_CONFIG --cflags x11 xext` -DXINPUT2_1_USE_UNSTABLE_PROTOCOL -DXINPUT2_2_USE_UNSTABLE_PROTOCOL"
 
     # Strip out any .la files that pkg-config might give us (this happens
     # with -uninstalled.pc files)
@@ -1126,6 +1126,10 @@ if test "x$enable_x11_backend" = xyes; then
                     AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]),
                     X_EXTENSIONS="$X_EXTENSIONS XInput")
 
+    gtk_save_LIBS="$LIBS"
+    LIBS="$LIBS -lXi"
+    AC_CHECK_FUNC(XIAllowTouchEvents, AC_DEFINE(XINPUT_2_2, 1, [Define to 1 if XInput 2.2 is available]))
+    LIBS="$gtk_save_LIBS"
   else
     AC_DEFINE(XINPUT_NONE, 1,
               [Define to 1 if no XInput should be used])
index 3b0d1bdcb3813b341f896d5b64610d457e25f78f..d8abfd5b4a5d6829f28cd57402d4fad3700d0d30 100644 (file)
@@ -7,6 +7,8 @@ libgdkx11includedir = $(includedir)/gtk-3.0/gdk/x11
 AM_CPPFLAGS =                  \
        -DG_LOG_DOMAIN=\"Gdk\"  \
        -DGDK_COMPILATION       \
+       -DXINPUT2_2_USE_UNSTABLE_PROTOCOL \
+       -DXINPUT2_1_USE_UNSTABLE_PROTOCOL \
        -I$(top_srcdir)         \
        -I$(top_srcdir)/gdk     \
        -I$(top_builddir)/gdk   \