From 475d559f7e0982a95479320fbd981b170a696e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 25 Jan 2015 13:38:43 +0200 Subject: [PATCH] build-sys: Install bash completion to where bash-completion.pc says MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fall back to the previous /etc/bash_completion.d dir on failures (either old bash completion or not installed). Signed-off-by: Ville Skyttä --- Makefile.am | 2 +- configure.ac | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 75b784f..b39fc41 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,7 +59,7 @@ endif cmakedir = $(libdir)/cmake/PulseAudio cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake -bashcompletiondir=$(sysconfdir)/bash_completion.d +bashcompletiondir=@bashcompletiondir@ dist_bashcompletion_DATA = shell-completion/bash/pulseaudio install-bashcompletion-aliases: diff --git a/configure.ac b/configure.ac index 3c71472..a79dff8 100644 --- a/configure.ac +++ b/configure.ac @@ -1421,6 +1421,11 @@ AC_ARG_WITH( AC_SUBST(udevrulesdir) +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)]), @@ -1547,6 +1552,7 @@ echo " System Runtime Path: ${PA_SYSTEM_RUNTIME_PATH} System State Path: ${PA_SYSTEM_STATE_PATH} System Config Path: ${PA_SYSTEM_CONFIG_PATH} + Bash completions directory: ${bashcompletiondir} Zsh completions directory: ${zshcompletiondir} Compiler: ${CC} CFLAGS: ${CFLAGS} -- 1.9.3