1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00

bus: test-bus-marshal - make dbus-1 optional

This commit is contained in:
Kay Sievers 2013-11-06 02:03:05 +01:00
parent 95b015de38
commit 2270309471
2 changed files with 8 additions and 2 deletions

View File

@ -236,8 +236,10 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
# ------------------------------------------------------------------------------
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]) ])
AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
# ------------------------------------------------------------------------------
have_coverage=no

View File

@ -27,7 +27,9 @@
#include <gio/gio.h>
#endif
#ifdef HAVE_DBUS
#include <dbus.h>
#endif
#include "log.h"
#include "util.h"
@ -126,6 +128,7 @@ int main(int argc, char *argv[]) {
}
#endif
#ifdef HAVE_DBUS
{
DBusMessage *w;
DBusError error;
@ -138,6 +141,7 @@ int main(int argc, char *argv[]) {
} else
dbus_message_unref(w);
}
#endif
m = sd_bus_message_unref(m);