diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2015-01-25 13:38:43 +0200 |
---|---|---|
committer | Peter Meerwald <pmeerw@pmeerw.net> | 2015-05-25 16:20:43 +0200 |
commit | 84dff820ed14f8a4d95f4dd230a02f33c0d6a1ea (patch) | |
tree | 0dc7d28f7472b269c4d35c96d9e67291dee3b79d /configure.ac | |
parent | a26defed9ee4f4f9e8db79bd9051231d74717598 (diff) |
build-sys: Install bash completion to where bash-completion.pc says
Fall back to the previous /etc/bash_completion.d dir on failures
(either old bash completion or not installed).
changes over Ville Skyttä's patch:
define PKG_CHECK_VAR macro which became available only in pkg-config 0.28
see https://bugs.freedesktop.org/show_bug.cgi?id=88782 and
https://bugs.freedesktop.org/show_bug.cgi?id=89540
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b2fcd1e7..9e656841 100644 --- a/configure.ac +++ b/configure.ac @@ -1436,6 +1436,20 @@ AC_ARG_WITH( AC_SUBST(udevrulesdir) +# PKG_CHECK_VAR available with pkg-config 0.28 +AC_DEFUN([PKG_CHECK_VAR], + [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl + AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + _PKG_CONFIG([$1], [variable="][$3]["], [$2]) + AS_VAR_COPY([$1], [pkg_cv_][$1]) + AS_VAR_IF([$1], [""], [$5], [$4])dnl + ]) + +PKG_CHECK_VAR(bashcompletiondir, [bash-completion], [completionsdir], , + bashcompletiondir="${sysconfdir}/bash_completion.d") + +AC_SUBST(bashcompletiondir) + AC_ARG_WITH( [zsh-completion-dir], AS_HELP_STRING([--with-zsh-completion-dir], [Zsh completions directory (defaults to ${datadir}/zsh/site-functions)]), @@ -1563,6 +1577,7 @@ echo " System State Path: ${PA_SYSTEM_STATE_PATH} System Config Path: ${PA_SYSTEM_CONFIG_PATH} Zsh completions directory: ${zshcompletiondir} + Bash completions directory: ${bashcompletiondir} Compiler: ${CC} CFLAGS: ${CFLAGS} CPPFLAGS: ${CPPFLAGS} |