From aa9b2c5494c1db06ee1f3fe493d3fa1e49a1f2ba Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 10 May 2016 18:35:28 +0200 Subject: [PATCH] configure: Check for libwacom It will be used for some advanced tablet features, which we can't get solely from libinput. --- configure.ac | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/configure.ac b/configure.ac index 19ced73d8..455b9d3c6 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,8 @@ AM_PATH_GLIB_2_0([2.49.0]) CANBERRA_GTK=libcanberra-gtk3 CANBERRA_GTK_VERSION=0.26 +LIBWACOM_VERSION=0.19 + MUTTER_PC_MODULES=" gtk+-3.0 >= 3.19.8 gio-unix-2.0 >= 2.35.1 @@ -109,6 +111,11 @@ AC_ARG_WITH(libcanberra, [disable the use of libcanberra for playing sounds]),, with_libcanberra=auto) +AC_ARG_WITH(libwacom, + AC_HELP_STRING([--without-libwacom], + [disable the use of libwacom for advanced tablet management]),, + with_libwacom=auto) + AC_ARG_WITH([xwayland-path], [AS_HELP_STRING([--with-xwayland-path], [Absolute path for an X Wayland server])], [XWAYLAND_PATH="$withval"], @@ -170,6 +177,24 @@ else fi fi +have_libwacom=no +AC_MSG_CHECKING([libwacom]) +if test x$with_libwacom = xno ; then + AC_MSG_RESULT([disabled]) +else + if $PKG_CONFIG --exists libwacom '>=' $LIBWACOM_VERSION; then + have_libwacom=yes + AC_MSG_RESULT(yes) + MUTTER_PC_MODULES="$MUTTER_PC_MODULES libwacom" + AC_DEFINE([HAVE_LIBWACOM], 1, [Building with libwacom for advanced tablet management]) + else + AC_MSG_RESULT(no) + if test x$with_libwacom = xyes ; then + AC_MSG_ERROR([libwacom forced but not found]) + fi + fi +fi + INTROSPECTION_VERSION=0.9.5 GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION]) @@ -423,6 +448,7 @@ mutter-$VERSION Startup notification: ${have_startup_notification} libcanberra: ${have_libcanberra} + libwacom: ${have_libwacom} Introspection: ${found_introspection} Session management: ${found_sm} Wayland: ${have_wayland}