From: Daiki Ueno Date: Wed, 23 Oct 2019 09:01:49 +0000 (+0200) Subject: autotools: Fix bash-completion installation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c94eab51d08650eaa66184344325d42e812973c;p=p11-kit autotools: Fix bash-completion installation --- diff --git a/Makefile.am b/Makefile.am index b58af36..417cdf2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,7 +24,8 @@ CLEANFILES = EXTRA_DIST = HACKING meson.build meson_options.txt po/meson.build \ doc/manual/meson.build doc/manual/userdir.xml.in \ - doc/manual/sysdir.xml.in doc/manual/version.xml.in + doc/manual/sysdir.xml.in doc/manual/version.xml.in \ + bash-completion incdir = $(includedir)/p11-kit-1/p11-kit inc_HEADERS = @@ -42,6 +43,8 @@ TESTS = $(c_tests) $(sh_tests) moduledir = $(p11_module_path) module_LTLIBRARIES = +bashcomp_DATA = + include common/Makefile.am include p11-kit/Makefile.am @@ -49,14 +52,6 @@ if WITH_TRUST_MODULE include trust/Makefile.am endif -if WITH_BASH_COMPLETION -bashcompdir = $(datadir)/bash-completion/completions -dist_bashcomp_DATA = bash-completion/p11-kit -if WITH_TRUST_MODULE -dist_bashcomp_DATA += bash-completion/trust -endif -endif - SUBDIRS = . doc po ACLOCAL_AMFLAGS = -I build/m4 diff --git a/configure.ac b/configure.ac index df0d8c5..77b31cf 100644 --- a/configure.ac +++ b/configure.ac @@ -574,7 +574,10 @@ AM_CONDITIONAL(WITH_SYSTEMD, [test "$with_systemd" = "yes"]) # -------------------------------------------------------------------- # bash completion -PKG_CHECK_VAR([bashcompdir], [bash-completion], [with_bash_completion=yes]) +PKG_CHECK_VAR([bashcompdir], [bash-completion], [completionsdir], + [with_bash_completion=yes]) +AC_SUBST(bashcompdir) + AM_CONDITIONAL(WITH_BASH_COMPLETION, [test "$with_bash_completion" = "yes"]) diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am index 681dc17..9f3d42b 100644 --- a/p11-kit/Makefile.am +++ b/p11-kit/Makefile.am @@ -246,6 +246,10 @@ p11_kit_p11_kit_LDADD = \ $(LTLIBINTL) \ $(NULL) +if WITH_BASH_COMPLETION +bashcomp_DATA += bash-completion/p11-kit +endif + private_PROGRAMS += p11-kit/p11-kit-remote p11_kit_p11_kit_remote_SOURCES = \ diff --git a/trust/Makefile.am b/trust/Makefile.am index b050a8f..f708b47 100644 --- a/trust/Makefile.am +++ b/trust/Makefile.am @@ -119,6 +119,10 @@ externaldir = $(privatedir) external_SCRIPTS = \ trust/trust-extract-compat +if WITH_BASH_COMPLETION +bashcomp_DATA += bash-completion/trust +endif + EXTRA_DIST += \ trust/p11-kit-trust.module \ trust/meson.build