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