aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkeyboard-config/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xkeyboard-config/configure.in')
-rw-r--r--xorg-server/xkeyboard-config/configure.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/xorg-server/xkeyboard-config/configure.in b/xorg-server/xkeyboard-config/configure.in
index 4cb214f1a..8d1a44b00 100644
--- a/xorg-server/xkeyboard-config/configure.in
+++ b/xorg-server/xkeyboard-config/configure.in
@@ -24,6 +24,32 @@ AC_ARG_ENABLE( compat_rules,
enable_compat_rules="$enableval",
enable_compat_rules="yes" )
+# xkeyboard-config does not have build-time dependencies. However, it does
+# have run-time dependencies and keyboard layouts may not work without the
+# right libX11 or xproto installed.
+# By default, we enable these run-time dependencies as build-time
+# dependencies so that those building on their local machines are warned
+# that the resulting build may not work.
+AC_ARG_ENABLE( runtime-deps,
+ [ --enable-runtime-deps use run-time dependencies as build-time dependencies],
+ enable_runtime_deps="$enableval",
+ enable_runtime_deps="yes")
+
+if test "x$enable_runtime_deps" = "xyes"; then
+ PKG_CHECK_MODULES(DEPS, [xproto >= 7.0.20] [x11 >= 1.4.3], [have_deps=yes], [have_deps=no])
+ AC_MSG_WARN([
+ Required dependencies not found. These dependencies are
+ run-time dependencies only and not required for building.
+ Skip this check with --disable-runtime-deps.
+
+ Installing this version of xkeyboard-config on a host
+ without the required dependencies may result in unusable
+ keyboard layouts.
+ ])
+
+ AC_MSG_ERROR([$DEPS_PKG_ERRORS])
+fi
+
AM_CONDITIONAL(CREATE_RULES_SYMLINK, test "x$xkb_rules_symlink" != "x")
AM_CONDITIONAL(USE_COMPAT_RULES, test "x$enable_compat_rules" = "xyes")