summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-07-18 16:06:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-08-03 14:06:48 +1000
commit8a8c72983fbf334e1b321ae870c1d13fdeda5bc8 (patch)
tree368a0dfcd5e4f4c24047dcf5f3c0e5af4bcd9b35 /configure.ac
parent90f6e43562f660ee369b03cf866d0ca94fd74dcd (diff)
udev: check wacom devices for a paired product id
The newer Wacom Cintiqs have touch devices with a different PID than the pen device. Use the new libwacom_get_paired_device call where available to pair the two devices and give them the same device group. This isn't that important just yet, so no need to force users to update to a new libwacom version. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9e238b46..b6f75552 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,7 +208,26 @@ AC_ARG_ENABLE(libwacom,
if test "x$use_libwacom" = "xyes"; then
PKG_CHECK_MODULES(LIBWACOM, [libwacom >= 0.12], [HAVE_LIBWACOM="yes"])
AC_DEFINE(HAVE_LIBWACOM, 1, [Build with libwacom])
+
+ OLD_LIBS=$LIBS
+ OLD_CFLAGS=$CFLAGS
+ LIBS="$LIBS $LIBWACOM_LIBS"
+ CFLAGS="$CFLAGS $LIBWACOM_CFLAGS"
+ AC_MSG_CHECKING([if libwacom_get_paired_device is available])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <libwacom/libwacom.h>]],
+ [[libwacom_get_paired_device(NULL)]])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_LIBWACOM_GET_PAIRED_DEVICE, [1],
+ [libwacom_get_paired_device() is available])
+ [libwacom_have_get_paired_device=yes]],
+ [AC_MSG_RESULT([no])
+ [libwacom_have_get_paired_device=no]])
+ LIBS=$OLD_LIBS
+ CFLAGS=$OLD_CFLAGS
fi
+AM_CONDITIONAL(HAVE_LIBWACOM_GET_PAIRED_DEVICE,
+ [test "x$libwacom_have_get_paired_device" == "xyes"])
AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"])