Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | [PATCH] conditionally check libvirt |
| 2 | |
| 3 | Upstream-Statue: Pending |
| 4 | |
| 5 | check if libvirt is available only when a user wants to use libvirt |
| 6 | |
| 7 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 8 | --- |
| 9 | configure.ac | 14 ++++++++------ |
| 10 | 1 file changed, 8 insertions(+), 6 deletions(-) |
| 11 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 12 | Index: collectd-5.7.1/configure.ac |
| 13 | =================================================================== |
| 14 | --- collectd-5.7.1.orig/configure.ac |
| 15 | +++ collectd-5.7.1/configure.ac |
| 16 | @@ -5556,12 +5556,14 @@ else |
| 17 | with_libxml2="no (pkg-config doesn't know libxml-2.0)" |
| 18 | fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 19 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 20 | -$PKG_CONFIG --exists libvirt 2>/dev/null |
| 21 | -if test "$?" = "0" |
| 22 | -then |
| 23 | - with_libvirt="yes" |
| 24 | -else |
| 25 | - with_libvirt="no (pkg-config doesn't know libvirt)" |
| 26 | +if test "x$enable_libvirt" = "xyes"; then |
| 27 | + $PKG_CONFIG --exists libvirt 2>/dev/null |
| 28 | + if test "$?" = "0" |
| 29 | + then |
| 30 | + with_libvirt="yes" |
| 31 | + else |
| 32 | + with_libvirt="no (pkg-config doesn't know libvirt)" |
| 33 | + fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 34 | fi |
| 35 | if test "x$with_libxml2" = "xyes" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 36 | then |