configure: only install bash completion if supported
authorJani Nikula <jani@nikula.org>
Sun, 2 Feb 2014 16:47:57 +0000 (18:47 +0200)
committerDavid Bremner <david@tethera.net>
Mon, 3 Feb 2014 20:19:08 +0000 (16:19 -0400)
Our bash completion depends on bash-completion 1.90 or later. Only
install where available.

configure

index 13b60620fe3cebdd0cc00cee4a4bc088260ef720..66aaedbe19081763b2afbdacd625f6f8cd0fef11 100755 (executable)
--- a/configure
+++ b/configure
@@ -360,6 +360,14 @@ else
     have_valgrind=0
 fi
 
+printf "Checking for bash-completion (>= 1.90)... "
+if pkg-config --atleast-version=1.90 bash-completion; then
+    printf "Yes.\n"
+else
+    printf "No (will not install bash completion).\n"
+    WITH_BASH=0
+fi
+
 if [ -z "${EMACSLISPDIR}" ]; then
     if pkg-config --exists emacs; then
        EMACSLISPDIR=$(pkg-config emacs --variable sitepkglispdir)