nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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