Remove dependency on libxkbcommon
authorMike Gorse <mgorse@linux-e5s4.suse>
Thu, 28 Sep 2017 19:32:00 +0000 (14:32 -0500)
committerMike Gorse <mgorse@linux-e5s4.suse>
Thu, 28 Sep 2017 19:32:00 +0000 (14:32 -0500)
Currently, no functions in libxkbcommon are used, so the dependency is
spurious. Instead, check for XkbGetMap in -lX11.

https://bugzilla.gnome.org/show_bug.cgi?id=787756

configure.ac
meson.build

index 8c4fca2..850f808 100644 (file)
@@ -107,10 +107,8 @@ AS_IF([test "x$enable_x11" = xno], [
     X11_LIBS="$X11_LIBS $XINPUT_LIBS"
 
     # XKB (optional)
-    PKG_CHECK_MODULES(XKB, [xkbcommon-x11], [
+    AC_CHECK_LIB(X11, XkbGetMap, [
       AC_DEFINE(HAVE_XKB, 1, [Define to use XKB])
-      X11_CFLAGS="$X11_CFLAGS $XKB_CFLAGS"
-      X11_LIBS="$X11_LIBS $XKB_LIBS"
     ], [:])
   ])
 
index abd4c7c..e746e14 100644 (file)
@@ -62,9 +62,7 @@ if x11_dep.found()
   xtest_dep = dependency('xtst')
   x11_deps += xtest_dep
 
-  xkb_dep = dependency('xkbcommon-x11', required: false)
-  if xkb_dep.found()
-    x11_deps += xkb_dep
+  if cc.has_function('XkbGetMap', dependencies: x11_deps)
     at_spi_conf.set('HAVE_XKB', 1)
   endif