From 2c70c6dc7212d0124a5599428553662c6905a53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 17 Oct 2014 21:11:14 +0200 Subject: [PATCH 2/2] build-sys: Support overriding bash completion directory Allow overriding the directory via --with-bash-completion-dir, default to the value provided by pkg-config. --- Makefile.am | 1 - configure.ac | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 665736d..866c281 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,7 +61,6 @@ endif cmakedir = $(libdir)/cmake/PulseAudio cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake -bashcompletiondir=$(sysconfdir)/bash_completion.d dist_bashcompletion_DATA = shell-completion/bash/pulseaudio install-bashcompletion-aliases: diff --git a/configure.ac b/configure.ac index e78c754..b2e2fb6 100644 --- a/configure.ac +++ b/configure.ac @@ -1373,6 +1373,17 @@ AC_ARG_WITH( AC_SUBST(udevrulesdir) +AC_ARG_WITH([bashcompletiondir], + AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), + [bashcompletiondir=$withval], + [AS_IF([$($PKG_CONFIG --exists bash-completion)], [ + bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion) + ],[ + bashcompletiondir=${datadir}/bash-completion/completions + ])]) + +AC_SUBST([bashcompletiondir], [$bashcompletiondir]) + AC_ARG_WITH( [zsh-completion-dir], AS_HELP_STRING([--with-zsh-completion-dir], [Zsh completions directory (defaults to ${datadir}/zsh/site-functions)]), @@ -1492,6 +1503,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} -- 2.1.2