From 9c7e4ba06ebf38019463ede1c2f0265131fc52dd Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Sun, 1 Oct 2017 00:11:31 +0200 Subject: [PATCH] Fix bash completion installation Fixed the configure script to avoid that the bash completion script gets installed outside of the prefix location. The default install location is now $prefix/share/bash-completion/completions. Use the configure option '--with-bash-completion-dir=PATH' if you need to install the bash completion script elsewhere. --- configure.ac | 4 +--- src/Makefile.am | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index b641153..f78d48d 100644 --- a/configure.ac +++ b/configure.ac @@ -17,9 +17,7 @@ AC_ARG_WITH([bash-completion-dir], [with_bash_completion_dir=yes]) if test "x$with_bash_completion_dir" = "xyes"; then - PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], - [BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"], - [BASH_COMPLETION_DIR="${sysconfdir}/bash_completion.d"]) + BASH_COMPLETION_DIR="${datadir}/bash-completion/completions" else BASH_COMPLETION_DIR="$with_bash_completion_dir" fi diff --git a/src/Makefile.am b/src/Makefile.am index e44d14e..b06b6d1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,8 +14,6 @@ tio_SOURCES = tty.c \ include/tio/error.h if ENABLE_BASH_COMPLETION - bashcompletiondir=@BASH_COMPLETION_DIR@ bashcompletion_DATA=bash-completion/tio - endif