From 06dc401fd255084735cd7f0809f5feb90626f9dc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Mar 2011 08:41:54 +1000 Subject: [PATCH] configure: enable run-time-dependencies as build-time dependencies With the recent addition of Sinhala keysyms, xkeyboard-config has a run-time dependency on certain xproto/libX11 versions. The build will work anyway, but using those layouts may result in unusable keyboards. 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. Those building on build hosts (e.g. distros) can skip this check with --disable-runtime-deps. Signed-off-by: Peter Hutterer --- configure.in | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/configure.in b/configure.in index 80af275..24233e4 100644 --- a/configure.in +++ b/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") -- 1.7.4