From d988cad4557461489bad9062dab3ef72966fe9b6 Mon Sep 17 00:00:00 2001 From: John Hood Date: Sun, 28 Jun 2015 14:43:25 -0400 Subject: [PATCH] configure.ac: respect --prefix for bash completion Signed-off-by: John Hood --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5b57a4d..47f953b 100644 --- a/configure.ac +++ b/configure.ac @@ -372,7 +372,11 @@ PKG_CHECK_MODULES([protobuf], [protobuf]) # Bash completion needs to ask where it goes if >= 2.0 is installed. AS_IF([test "$install_completion" != no], [PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], - [completions="`pkg-config --variable=completionsdir bash-completion`"], + [if test "$prefix" = "NONE"; then + completions="`pkg-config --variable=completionsdir bash-completion`" + else + completions="`pkg-config --define-variable=prefix=$prefix --variable=completionsdir bash-completion`" + fi], [completions="${sysconfdir}/bash-completion.d"]) AC_SUBST([completions])])