summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2018-05-29 00:08:38 -0400
committerAllan McRae <allan@archlinux.org>2018-08-10 12:37:19 +1000
commitfd16da2ed68aa7f89ad37701bcf7674b7bb14b2d (patch)
tree3a0f1337c50cd0ff4431b9fee4537ebd76f8c276 /configure.ac
parent7e081d2adf8321f25165255fd21fab61d4055a53 (diff)
downloadpacman-fd16da2ed68aa7f89ad37701bcf7674b7bb14b2d.tar.xz
scripts/completion: derive the bash completion directory from pkg-config
Default to the standard completionsdir, which is lazy-loaded, rather than hardcoding the compatdir which is not. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0a48dbb2..07bdc105 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,6 +215,9 @@ AM_GNU_GETTEXT_VERSION(0.13.1)
AC_CHECK_LIB([m], [fabs], ,
AC_MSG_ERROR([libm is needed to compile pacman!]))
+PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], ,
+ bashcompdir="${prefix}/share/bash-completion/completions")
+
# Check for libarchive
PKG_CHECK_MODULES(LIBARCHIVE, [libarchive >= 3.0.0], ,
AC_MSG_ERROR([*** libarchive >= 3.0.0 is needed to compile pacman!]))