summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-04-17 13:51:53 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-04-20 14:04:25 +1000
commitd84e0035d12a9655c09a6e8c619b1144be42c90c (patch)
tree4ef7efd9917433e183f3b2bc2d29fe52d2ada263 /configure.ac
parent6c75acfcdf6539713c3b62bc2227a4b215d05fdb (diff)
Implement the custom acceleration curve options
One new property, and the existing accel profile gets extended to keep one extra value. The new property libinput Accel Curve Points is a list of pairs of points to be added to the acceleration curve. libinput only supports adding points to the curve so we simply declare the behavior as undefined when the curve is set multiple times. Also helps to identify those that bother to read the man page before playing with random driver values. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 34f2274..5892c5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,23 @@ XORG_DEFAULT_OPTIONS
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto [inputproto >= 2.2])
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.4.901])
+AC_MSG_CHECKING([if libinput_device_config_accel_set_curve_point is available])
+OLD_LIBS=$LIBS
+OLD_CFLAGS=$CFLAGS
+LIBS="$LIBS $LIBINPUT_LIBS"
+CFLAGS="$CFLAGS $LIBINPUT_CFLAGS"
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <libinput.h>]],
+ [[libinput_device_config_accel_set_curve_point(NULL, 0, 0)]])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_LIBINPUT_CUSTOM_ACCEL_CURVE, [1],
+ [libinput_device_config_accel_set_curve_point() is available])
+ [libinput_have_custom_accel_curve=yes]],
+ [AC_MSG_RESULT([no])
+ [libinput_have_custom_accel_curve=no]])
+LIBS=$OLD_LIBS
+CFLAGS=$OLD_CFLAGS
+
# Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir,
AC_HELP_STRING([--with-xorg-module-dir=DIR],