[mutter/wip/tablet-protocol-v2: 29/65] configure: Check for libwacom



commit d82e2fbc6368d33fdab331ad7c3eb6c2c061ca3c
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue May 10 18:35:28 2016 +0200

    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 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3d83443..311cd71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,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
@@ -107,6 +109,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"],
@@ -168,6 +175,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])
 
@@ -421,6 +446,7 @@ mutter-$VERSION
 
        Startup notification:     ${have_startup_notification}
        libcanberra:              ${have_libcanberra}
+       libwacom:                 ${have_libwacom}
        Introspection:            ${found_introspection}
        Session management:       ${found_sm}
        Wayland:                  ${have_wayland}


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