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

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