44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
|
From 699414f5a518f039fa74fd314d21994849a90625 Mon Sep 17 00:00:00 2001
|
||
|
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
||
|
Date: Wed, 4 May 2016 10:18:54 +0200
|
||
|
Subject: [PATCH] configure: don't hardcode pkg-config
|
||
|
|
||
|
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
||
|
---
|
||
|
configure | 8 +++++---
|
||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/configure b/configure
|
||
|
index c92cb99..2368680 100755
|
||
|
--- a/configure
|
||
|
+++ b/configure
|
||
|
@@ -7,6 +7,8 @@ prefix=/usr
|
||
|
|
||
|
enable_documentation=yes
|
||
|
|
||
|
+PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
|
||
|
+
|
||
|
# Little helper function for reading args from the commandline.
|
||
|
# it automatically handles -a b and -a=b variants, and returns 1 if
|
||
|
# we need to shift $3.
|
||
|
@@ -50,7 +52,7 @@ while (($# > 0)); do
|
||
|
shift
|
||
|
done
|
||
|
|
||
|
-if ! pkg-config --exists --print-errors " libkmod >= 15 "; then
|
||
|
+if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then
|
||
|
echo "dracut needs pkg-config and libkmod >= 15." >&2
|
||
|
exit 1
|
||
|
fi
|
||
|
@@ -64,8 +66,8 @@ sbindir ?= ${sbindir:-${prefix}/sbin}
|
||
|
mandir ?= ${mandir:-${prefix}/share/man}
|
||
|
enable_documentation ?= ${enable_documentation:-yes}
|
||
|
bindir ?= ${bindir:-${prefix}/bin}
|
||
|
-KMOD_CFLAGS ?= $(pkg-config --cflags " libkmod >= 15 ")
|
||
|
-KMOD_LIBS ?= $(pkg-config --libs " libkmod >= 15 ")
|
||
|
+KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 15 ")
|
||
|
+KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ")
|
||
|
EOF
|
||
|
|
||
|
{
|