summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-31 20:20:17 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-02 19:45:47 -0500
commitac6b760ceedd4b21921b6a682cf1479af3d3024f (patch)
treedacb10f95fa5106455afda7efc36056c6a77266d /configure.ac
parenta0846368c808fb8b73b84d40472717cfd83ca4d7 (diff)
build-sys: add --disable-dbus autoconf option
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4cb2a53c3..d8a9356ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,8 +247,14 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
# ------------------------------------------------------------------------------
-PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2], have_dbus=yes, have_dbus=no])
-AS_IF([test "$have_dbus" = "yes"], [ AC_DEFINE(HAVE_DBUS, [1], [Define if dbus-1 is available]) ])
+have_dbus=no
+AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
+AS_IF(["x$enable_dbus" != "xno"], [
+ PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
+ [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
+ [have_dbus=no])
+ AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
+ [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
# ------------------------------------------------------------------------------
@@ -1097,6 +1103,7 @@ AC_MSG_RESULT([
efi: ${have_efi}
kmod: ${have_kmod}
blkid: ${have_blkid}
+ dbus: ${have_dbus}
nss-myhostname: ${have_myhostname}
gudev: ${enable_gudev}
gintrospection: ${enable_introspection}