public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/4] configure: Allow to disable libvirt
@ 2019-09-05 13:42 Richard Purdie
  2019-09-05 13:42 ` [PATCH 2/4] configure: Allow explicit configuration of the monitor Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Purdie @ 2019-09-05 13:42 UTC (permalink / raw)
  To: systemtap; +Cc: Wenzong Fan

From: Wenzong Fan <wenzong.fan@windriver.com>

Rather than just autodetecting libvirt allow it to be explictly disabled even
if present (important for reproducibile builds).

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 configure.ac | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index d3dbc0277..171c5bcf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -706,10 +706,15 @@ AC_ARG_ENABLE([virt],
 
 dnl We require libvirt >= 1.0.2 because stapvirt relies on the
 dnl virDomainOpenChannel function, which was implemented in 1.0.2.
-PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
-   have_libvirt=yes
-   AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
-   ], [have_libvirt=no])
+AC_ARG_ENABLE([libvirt],
+  AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present]))
+
+if test "$enable_libvirt" != no; then
+  PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
+     have_libvirt=yes
+     AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
+     ], [have_libvirt=no])
+fi
 AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"])
 PKG_CHECK_MODULES([libxml2], [libxml-2.0], [
    have_libxml2=yes
-- 
2.17.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-05 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 13:42 [PATCH 1/4] configure: Allow to disable libvirt Richard Purdie
2019-09-05 13:42 ` [PATCH 2/4] configure: Allow explicit configuration of the monitor Richard Purdie
2019-09-05 13:42 ` [PATCH 4/4] cache.cxx: Fix errors on x32 builds Richard Purdie
2019-09-05 13:42 ` [PATCH 3/4] configure: Remove explicit msgfmt check Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).