From: Lucas De Marchi <lucas.demarchi@xxxxxxxxx> --- Makefile.am | 7 ++++++- configure.ac | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 57b7372..91a766a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,6 +89,10 @@ pkgconfig_DATA = libkmod/libkmod.pc EXTRA_DIST += libkmod/libkmod.pc.in CLEANFILES += libkmod/libkmod.pc +bashcompletiondir=@bashcompletiondir@ +dist_bashcompletion_DATA = \ + shell-completion/bash/kmod + install-exec-hook: if test "$(libdir)" != "$(rootlibdir)"; then \ $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ @@ -207,7 +211,8 @@ testsuite-distclean: DISTCLEAN_LOCAL_HOOKS += testsuite-distclean EXTRA_DIST += testsuite/rootfs-pristine -DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --sysconfdir=/etc --with-zlib +DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --sysconfdir=/etc --with-zlib \ + --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) distclean-local: $(DISTCLEAN_LOCAL_HOOKS) diff --git a/configure.ac b/configure.ac index 194dfab..15c69d4 100644 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,15 @@ AS_IF([test "x$with_zlib" != "xno"], [ AC_MSG_NOTICE([zlib support not requested]) ]) +AC_ARG_WITH([bashcompletiondir], + AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), + [], + [AS_IF([$($PKG_CONFIG --exists bash-completion)], [ + with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion) + ] , [ + with_bashcompletiondir=${datadir}/bash-completion/completions + ])]) +AC_SUBST([bashcompletiondir], [$with_bashcompletiondir]) ##################################################################### # --enable- @@ -194,7 +203,7 @@ AC_CONFIG_FILES([ AC_OUTPUT AC_MSG_RESULT([ $PACKAGE $VERSION - ====== + ======= prefix: ${prefix} sysconfdir: ${sysconfdir} @@ -202,6 +211,7 @@ AC_MSG_RESULT([ rootlibdir: ${rootlibdir} includedir: ${includedir} bindir: ${bindir} + Bash completions dir: ${with_bashcompletiondir} compiler: ${CC} cflags: ${with_cflags} ${CFLAGS} -- 1.8.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html