diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 2703e6c016..5ea6aa29a3 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -617,6 +617,17 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_RESULT([no]) fi AC_SUBST(RPM_DEFINE_INITRAMFS) + + AC_MSG_CHECKING([default bash completion directory]) + case "$VENDOR" in + ubuntu) bashcompletiondir=/usr/share/bash-completion/completions ;; + debian) bashcompletiondir=/usr/share/bash-completion/completions ;; + freebsd) bashcompletiondir=$sysconfdir/bash_completion.d;; + *) bashcompletiondir=/etc/bash_completion.d ;; + esac + AC_MSG_RESULT([$bashcompletiondir]) + AC_SUBST(bashcompletiondir) + ]) dnl # diff --git a/contrib/bash_completion.d/Makefile.am b/contrib/bash_completion.d/Makefile.am index dc4b610c42..1ec05ed73d 100644 --- a/contrib/bash_completion.d/Makefile.am +++ b/contrib/bash_completion.d/Makefile.am @@ -1,5 +1,3 @@ -bashcompletiondir = $(sysconfdir)/bash_completion.d - nodist_bashcompletion_DATA = %D%/zfs SUBSTFILES += $(nodist_bashcompletion_DATA)