[mutter/wip/tablet-protocol-v2: 104/149] configure: Check for libwacom



commit d3be07119667d8cad219236242da56bcc2030f77
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 7199094..a66e510 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}


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