summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-11-24 15:12:42 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-11-24 15:16:33 +0100
commitd4f5a1f47dbd04f26f2ddf951c97c4cb0ebbbe62 (patch)
tree54e891570c54a505a6babdefc95169d1efb1aaa2 /configure.ac
parent8a52210c9392887a31fdb2845f65b4c5869e8e66 (diff)
localed: validate xkb keymaps
Introduce a new optional dependency on libxkbcommon for systemd-localed. Whenever the x11 keymap settings are changed, use libxkbcommon to compile the keymap. If the compilation fails, print a warning so users will get notified. On compilation failure, we still update the keymap settings for now. This patch just introduces the xkbcommon infrastructure to have keymap validation in place. We can later decide if/how we want to enforce this.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2c8be53dd3..bd3cc0ea61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,6 +415,18 @@ fi
AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
# ------------------------------------------------------------------------------
+have_xkbcommon=no
+AC_ARG_ENABLE(xkbcommon, AS_HELP_STRING([--disable-xkbcommon], [disable xkbcommon keymap support]))
+if test "x$enable_xkbcommon" != "xno"; then
+ PKG_CHECK_MODULES(XKBCOMMON, [ xkbcommon >= 0.3.0 ],
+ [AC_DEFINE(HAVE_XKBCOMMON, 1, [Define if libxkbcommon is available]) have_xkbcommon=yes], have_xkbcommon=no)
+ if test "x$have_xkbcommon" = xno -a "x$enable_xkbcommon" = xyes; then
+ AC_MSG_ERROR([*** xkbcommon support requested but libraries not found])
+ fi
+fi
+AM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
+
+# ------------------------------------------------------------------------------
have_blkid=no
AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
if test "x$enable_blkid" != "xno"; then
@@ -1374,6 +1386,7 @@ AC_MSG_RESULT([
polkit: ${have_polkit}
efi: ${have_efi}
kmod: ${have_kmod}
+ xkbcommon: ${have_xkbcommon}
blkid: ${have_blkid}
dbus: ${have_dbus}
nss-myhostname: ${have_myhostname}