summaryrefslogtreecommitdiff
path: root/debian/patches/cross.patch
blob: b78bdbeafe2c275b5780c614e1b46e7c08217102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Helmut Grohne <helmut@subdivi.de>
Subject: use PKG_PROG_PKG_CONFIG correctly

Using $PKG_CONFIG allows PKG_PROG_PKG_CONFIG to add $ac_tool_prefix which is
crucial for cross compilation.

Index: btrfs-progs-4.7.3/configure.ac
===================================================================
--- btrfs-progs-4.7.3.orig/configure.ac
+++ btrfs-progs-4.7.3/configure.ac
@@ -55,8 +55,8 @@
 dnl Calls pkg-config --static
 dnl
 AC_DEFUN([PKG_STATIC], [
-  if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
-    $1=`pkg-config --libs --static "$2"`
+  if AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$2"]); then
+    $1=`$PKG_CONFIG --libs --static "$2"`
     AC_SUBST([$1])
   else
     AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
@@ -165,8 +165,8 @@
 # Our udev rule gives us the friendly dm names but isn't required (or valid)
 # on earlier releases.
 UDEVDIR=
-if pkg-config udev --atleast-version 190; then
-	UDEVDIR="$(pkg-config udev --variable=udevdir)"
+if $PKG_CONFIG udev --atleast-version 190; then
+	UDEVDIR="$($PKG_CONFIG udev --variable=udevdir)"
 fi
 AC_SUBST(UDEVDIR)