Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 5eb10d90af9178edb65e6091ae939d1b5b19bb78 Mon Sep 17 00:00:00 2001 |
| 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
| 3 | Date: Tue, 23 Sep 2014 04:47:10 -0400 |
| 4 | Subject: [PATCH] systemtap: allow to disable libvirt |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> |
| 9 | --- |
| 10 | configure.ac | 13 +++++++++---- |
| 11 | 1 file changed, 9 insertions(+), 4 deletions(-) |
| 12 | |
| 13 | diff --git a/configure.ac b/configure.ac |
| 14 | index a631ae7..cb4885b 100644 |
| 15 | --- a/configure.ac |
| 16 | +++ b/configure.ac |
| 17 | @@ -525,10 +525,15 @@ dnl Check for the libvirt and libxml2 devel packages |
| 18 | |
| 19 | dnl We require libvirt >= 1.0.2 because stapvirt relies on the |
| 20 | dnl virDomainOpenChannel function, which was implemented in 1.0.2. |
| 21 | -PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ |
| 22 | - have_libvirt=yes |
| 23 | - AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) |
| 24 | - ], [have_libvirt=no]) |
| 25 | +AC_ARG_ENABLE([libvirt], |
| 26 | + AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present])) |
| 27 | + |
| 28 | +if test "$enable_libvirt" != no; then |
| 29 | + PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ |
| 30 | + have_libvirt=yes |
| 31 | + AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) |
| 32 | + ], [have_libvirt=no]) |
| 33 | +fi |
| 34 | AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"]) |
| 35 | PKG_CHECK_MODULES([libxml2], [libxml-2.0], [ |
| 36 | have_libxml2=yes |
| 37 | -- |
| 38 | 1.7.9.5 |
| 39 | |