nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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