aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch
blob: 1ceacd8c40e69130406e6790c73d1b5910375521 (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
33
34
35
36
[PATCH] conditionally check libvirt

Upstream-Statue: Pending

check if libvirt is available only when a user wants to use libvirt

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 configure.ac | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Index: collectd-5.7.1/configure.ac
===================================================================
--- collectd-5.7.1.orig/configure.ac
+++ collectd-5.7.1/configure.ac
@@ -5556,12 +5556,14 @@ else
 	with_libxml2="no (pkg-config doesn't know libxml-2.0)"
 fi
 
-$PKG_CONFIG --exists libvirt 2>/dev/null
-if test "$?" = "0"
-then
-	with_libvirt="yes"
-else
-	with_libvirt="no (pkg-config doesn't know libvirt)"
+if test "x$enable_libvirt" = "xyes"; then
+	$PKG_CONFIG --exists libvirt 2>/dev/null
+	if test "$?" = "0"
+	then
+		with_libvirt="yes"
+	else
+		with_libvirt="no (pkg-config doesn't know libvirt)"
+	fi
 fi
 if test "x$with_libxml2" = "xyes"
 then