-# Rules for bash_completion
-BASH_COMPLETION_DIR=/etc/bash_completion.d
-HAVE_BASH_COMPLETION=$(shell [ -d /etc/bash_completion.d/ ] && echo "y")
-ifeq ($(HAVE_BASH_COMPLETION),y)
+# Rules for bash-completion
+BASH_COMPLETIONS_DIR:=$(shell pkg-config --variable=completionsdir bash-completion 2>/dev/null)
+ifneq (,$(BASH_COMPLETIONS_DIR))