Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From 385bf1c2ec57942e17ee529e57eef0dcd99904e6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Roy Li <rongqing.li@windriver.com> |
| 3 | Date: Tue, 1 Sep 2015 17:00:33 +0800 |
| 4 | Subject: [PATCH] [PATCH] conditionally check libvirt |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 5 | |
| 6 | Upstream-Statue: Pending |
| 7 | |
| 8 | check if libvirt is available only when a user wants to use libvirt |
| 9 | |
| 10 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 11 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 12 | --- |
| 13 | configure.ac | 13 ++++++++----- |
| 14 | 1 file changed, 8 insertions(+), 5 deletions(-) |
| 15 | |
| 16 | diff --git a/configure.ac b/configure.ac |
| 17 | index 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 23 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | -$PKG_CONFIG --exists libvirt 2>/dev/null |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 25 | -if test $? = 0; then |
| 26 | - with_libvirt="yes" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 27 | -else |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 28 | - with_libvirt="no (pkg-config doesn't know libvirt)" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | +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 Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 37 | fi |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 38 | |
| 39 | if test "x$with_libxml2" = "xyes"; then |