Blame SOURCES/0012-Move-bash-completion-script-922997.patch

d9d99f
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d9d99f
From: Peter Jones <pjones@redhat.com>
d9d99f
Date: Wed, 3 Apr 2013 14:35:34 -0400
d9d99f
Subject: [PATCH] Move bash completion script (#922997)
d9d99f
d9d99f
Apparently these go in a new place now.
d9d99f
---
d9d99f
 configure.ac                       | 11 +++++++++++
d9d99f
 util/bash-completion.d/Makefile.am |  1 -
d9d99f
 2 files changed, 11 insertions(+), 1 deletion(-)
d9d99f
d9d99f
diff --git a/configure.ac b/configure.ac
b71686
index c7888e40f..783118ccd 100644
d9d99f
--- a/configure.ac
d9d99f
+++ b/configure.ac
d9d99f
@@ -289,6 +289,14 @@ AC_SUBST(grubdirname)
d9d99f
 AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname",
d9d99f
     [Default grub directory name])
d9d99f
 
d9d99f
+PKG_PROG_PKG_CONFIG
d9d99f
+AS_IF([$($PKG_CONFIG --exists bash-completion)], [
d9d99f
+	bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
d9d99f
+] , [
d9d99f
+	bashcompletiondir=${datadir}/bash-completion/completions
d9d99f
+])
d9d99f
+AC_SUBST(bashcompletiondir)
d9d99f
+
d9d99f
 #
d9d99f
 # Checks for build programs.
d9d99f
 #
d9d99f
@@ -498,6 +506,9 @@ HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
d9d99f
 # Check for target programs.
d9d99f
 #
d9d99f
 
d9d99f
+# This makes sure pkg.m4 is available.
d9d99f
+m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
d9d99f
+
d9d99f
 # Find tools for the target.
d9d99f
 if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
d9d99f
   tmp_ac_tool_prefix="$ac_tool_prefix"
d9d99f
diff --git a/util/bash-completion.d/Makefile.am b/util/bash-completion.d/Makefile.am
b71686
index 136287cf1..61108f054 100644
d9d99f
--- a/util/bash-completion.d/Makefile.am
d9d99f
+++ b/util/bash-completion.d/Makefile.am
d9d99f
@@ -6,7 +6,6 @@ EXTRA_DIST = $(bash_completion_source)
d9d99f
 
d9d99f
 CLEANFILES = $(bash_completion_script) config.log
d9d99f
 
d9d99f
-bashcompletiondir = $(sysconfdir)/bash_completion.d
d9d99f
 bashcompletion_DATA = $(bash_completion_script)
d9d99f
 
d9d99f
 $(bash_completion_script): $(bash_completion_source) $(top_builddir)/config.status