From 4fcd32025580c35b2133369159f411ea508e3d3b Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 19 Mar 2012 12:13:01 +0000 Subject: [PATCH] Check for XInput 2.2 extension --- configure.ac | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f5a0632a0..b9e76088b 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 ]])]) + + 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],