As of writing, the bash-completion configuration is installed in the $(sysconfdir)/bash_completion.d/ directory, while downstreams, such as Linux distributions, might prefer /usr/share/bash-completion/completions/ (or even another path). For this, the pkg-config configuration file from bash-completion provides a variable being leveraged here (with fallback to the current directory).
To avoid breaking old Linux distributions with pkg-config < 0.28, some autoconf code for backwards compatibility is added, too.
As of writing, the bash-completion configuration is installed in the
$(sysconfdir)/bash_completion.d/
directory, while downstreams, such as Linux distributions, might prefer/usr/share/bash-completion/completions/
(or even another path). For this, the pkg-config configuration file from bash-completion provides a variable being leveraged here (with fallback to the current directory).To avoid breaking old Linux distributions with pkg-config < 0.28, some autoconf code for backwards compatibility is added, too.