blob: 5ee75cb4debca61637b644b9687db1e4d73188e9 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 385bf1c2ec57942e17ee529e57eef0dcd99904e6 Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Tue, 1 Sep 2015 17:00:33 +0800
4Subject: [PATCH] [PATCH] conditionally check libvirt
Patrick Williamsb48b7b42016-08-17 15:04:38 -05005
6Upstream-Statue: Pending
7
8check if libvirt is available only when a user wants to use libvirt
9
10Signed-off-by: Roy Li <rongqing.li@windriver.com>
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012---
13 configure.ac | 13 ++++++++-----
14 1 file changed, 8 insertions(+), 5 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index 101d6f9f..a7eca97d 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -5758,11 +5758,14 @@ else
21 with_libxml2="no (pkg-config doesn't know libxml-2.0)"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022 fi
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024-$PKG_CONFIG --exists libvirt 2>/dev/null
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025-if test $? = 0; then
26- with_libvirt="yes"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027-else
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028- with_libvirt="no (pkg-config doesn't know libvirt)"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029+if test "x$enable_libvirt" = "xyes"; then
30+ $PKG_CONFIG --exists libvirt 2>/dev/null
31+ if test "$?" = "0"
32+ then
33+ with_libvirt="yes"
34+ else
35+ with_libvirt="no (pkg-config doesn't know libvirt)"
36+ fi
Patrick Williamsb48b7b42016-08-17 15:04:38 -050037 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038
39 if test "x$with_libxml2" = "xyes"; then