diff options
author | Adam Jackson <ajax@redhat.com> | 2018-03-28 16:11:18 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-03-28 16:34:36 -0400 |
commit | 726839459cb887a60361cb4779f9871c03f372b1 (patch) | |
tree | d0d41dc72d347eaeb05e61140dfb38db0727f31d | |
parent | d11d5bb80d21f2aaa54ddf2f26a50aa6ef31d2fa (diff) |
autotools: Derive xkb configuration from xkbcomp.pc
... if available, falling back to the current heuristics otherwise. This
_finally_ gets me to being able to run util/modular/release.sh without
overriding $prefix.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | configure.ac | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 7087107e3..defb707a2 100644 --- a/configure.ac +++ b/configure.ac @@ -471,9 +471,9 @@ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [ AC_MSG_CHECKING([for default font path]) AC_MSG_RESULT([$FONTPATH]) -AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]), +AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: auto)]), [ XKBPATH="$withval" ], - [ XKBPATH="${datadir}/X11/xkb" ]) + [ XKBPATH="auto" ]) AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), [ XKBOUTPUT="$withval" ], [ XKBOUTPUT="compiled" ]) @@ -1391,11 +1391,19 @@ AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes) AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) +if test "x$XKBPATH" = "xauto"; then + XKBPATH=$(pkg-config --variable datadir xkbcomp || echo ${datadir})/X11/xkb +fi + AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) AC_ARG_WITH(xkb-bin-directory, - AS_HELP_STRING([--with-xkb-bin-directory=DIR], [Directory containing xkbcomp program (default: ${bindir})]), + AS_HELP_STRING([--with-xkb-bin-directory=DIR], [Directory containing xkbcomp program (default: auto)]), [XKB_BIN_DIRECTORY="$withval"], - [XKB_BIN_DIRECTORY="$bindir"]) + [XKB_BIN_DIRECTORY="auto"]) + +if test "x$XKB_BIN_DIRECTORY" = "xauto"; then + XKB_BIN_DIRECTORY=$(pkg-config --variable bindir xkbcomp || echo ${bindir}) +fi AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir]) |