From 4f3f140a09641b53c5e28943b091b8ac5b69262a Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 30 Oct 2023 22:53:53 +0100 Subject: [PATCH] Disable Bash completion in 'make distcheck' We cannot rely on the auto-detection of Bash completion dir during 'make distcheck' because autotools does not use DESTDIR, only --prefix for the install check, and pkg-config returns a system path. Also, show detected path in configure summary for debug. Signed-off-by: Joachim Wiberg --- Makefile.am | 7 ++++--- configure.ac | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2488c2c5..9760e458 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,7 @@ release: distcheck printf "$$file.sha256\t"; cat ../$$file.sha256 | cut -f1 -d' '; \ done -DISTCHECK_CONFIGURE_FLAGS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --enable-testserv-plugin --enable-x11-common-plugin \ - --with-watchdog --with-keventd --with-fstab=/etc/fstab +DISTCHECK_CONFIGURE_FLAGS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --enable-testserv-plugin --enable-x11-common-plugin \ + --with-watchdog --with-keventd --with-fstab=/etc/fstab \ + --with-bash-completion-dir=no diff --git a/configure.ac b/configure.ac index 3075649d..f46651bc 100644 --- a/configure.ac +++ b/configure.ac @@ -205,7 +205,6 @@ AS_IF([test "x$bash_dir" = "xyes"], [ [BASH_DIR="$(pkg-config --variable=completionsdir bash-completion)"], [BASH_DIR="$datadir/bash-completion/completions"])], [ BASH_DIR="$bash_dir"]) -AC_SUBST([BASH_DIR]) AS_IF([test "x$with_fstab" != "xno"], [ AS_IF([test "x$fstab" = "xyes"], [fstab=$sysconfdir/fstab]) @@ -338,6 +337,9 @@ AC_DEFINE_UNQUOTED(RESCUE_CONF, "$rescue_conf", [Finit rescue mode .conf]) AC_EXPAND_DIR(sample_conf, "$pkglibdir/sample.conf") AC_DEFINE_UNQUOTED(SAMPLE_CONF, "$sample_conf", [Finit sameple.conf for initctl create]) +AC_EXPAND_DIR(bash_completion_dir, "$BASH_DIR") +AC_SUBST(BASH_DIR, "$bash_completion_dir") + AS_IF([test "$heading" = ""], [heading=""]) AS_IF([test "$heading" = "no"], [heading=""]) @@ -374,6 +376,7 @@ Behavior: Optional features: Install doc/..........: $enable_doc Install contrib/......: $enable_contrib + Bash completion.......: $bash_completion_dir Built-in keventd......: $with_keventd Built-in sulogin......: $with_sulogin $sulogin Built-in watchdogd....: $with_watchdog $watchdog