[clutter] Check for XInput 2.2 extension



commit 4fcd32025580c35b2133369159f411ea508e3d3b
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Mar 19 12:13:01 2012 +0000

    Check for XInput 2.2 extension

 configure.ac |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f5a0632..b9e7608 100644
--- a/configure.ac
+++ b/configure.ac
@@ -716,9 +716,27 @@ AS_IF([test "x$SUPPORT_X11" = "x1"],
                                                [Define to 1 if XInput is available])
                                    ])
 
+                  clutter_save_LIBS="$LIBS"
+                  LIBS="$LIBS -lXi"
+
+                  AC_CHECK_FUNC([XIAllowTouchEvents],
+                                [
+                                  AC_CHECK_MEMBER([XIScrollClassInfo.number],
+                                                  [
+                                                    have_xinput_2_2=yes
+                                                    AC_DEFINE([XINPUT_2_2], [1], [Define to 1 if XInput 2.2 is available])
+                                                  ],
+                                                  [have_xinput_2_2=no],
+                                                  [[#include <X11/extensions/XInput2.h>]])])
+
+                  LIBS="$clutter_save_LIBS"
+
                   X11_LIBS="$X11_LIBS $XINPUT_LIBS"
                   X11_PC_FILES="$X11_PC_FILES xi"
-                  X11_EXTS="$X11_EXTS xi"
+
+                  AS_IF([test "x$have_xinput_2_2" = "xyes"],
+                        [X11_EXTS="$X11_EXTS xi2.2"],
+                        [X11_EXTS="$X11_EXTS xi2.0"])
                 ],
 
                 [no],



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