|
|
7100e8 |
commit 719498e7cfbceffa01eff37263c55ceaf1623379
|
|
|
7100e8 |
Author: David Vossel <dvossel@redhat.com>
|
|
|
7100e8 |
Date: Wed Feb 5 17:42:01 2014 -0600
|
|
|
7100e8 |
|
|
|
7100e8 |
Low: services: Keep dbus build support optional
|
|
|
7100e8 |
|
|
|
7100e8 |
(cherry picked from commit e4d030a6d278fb3a43aa9c7eb359b488673f504a)
|
|
|
7100e8 |
|
|
|
7100e8 |
diff --git a/configure.ac b/configure.ac
|
|
|
7100e8 |
index f90ccdc..cad5190 100644
|
|
|
7100e8 |
--- a/configure.ac
|
|
|
7100e8 |
+++ b/configure.ac
|
|
|
7100e8 |
@@ -1162,6 +1162,8 @@ HAVE_upstart=0
|
|
|
7100e8 |
HAVE_systemd=0
|
|
|
7100e8 |
PKG_CHECK_MODULES(DBUS, dbus-1, ,HAVE_dbus=0)
|
|
|
7100e8 |
|
|
|
7100e8 |
+AM_CONDITIONAL(BUILD_DBUS, test $HAVE_dbus = 1)
|
|
|
7100e8 |
+
|
|
|
7100e8 |
if test $HAVE_dbus = 1; then
|
|
|
7100e8 |
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1`"
|
|
|
7100e8 |
fi
|
|
|
7100e8 |
diff --git a/include/portability.h b/include/portability.h
|
|
|
7100e8 |
index 4eb6eaa..b1302d2 100644
|
|
|
7100e8 |
--- a/include/portability.h
|
|
|
7100e8 |
+++ b/include/portability.h
|
|
|
7100e8 |
@@ -177,7 +177,7 @@ g_list_free_full(GList * list, GDestroyNotify free_func)
|
|
|
7100e8 |
}
|
|
|
7100e8 |
# endif
|
|
|
7100e8 |
|
|
|
7100e8 |
-# ifndef HAVE_DBUSBASICVALUE
|
|
|
7100e8 |
+# if defined(BUILD_DBUS) && !defined(HAVE_DBUSBASICVALUE)
|
|
|
7100e8 |
# include <stdint.h>
|
|
|
7100e8 |
# include <dbus/dbus.h>
|
|
|
7100e8 |
/**
|
|
|
7100e8 |
diff --git a/lib/services/Makefile.am b/lib/services/Makefile.am
|
|
|
7100e8 |
index 6ed4d01..96ccdb0 100644
|
|
|
7100e8 |
--- a/lib/services/Makefile.am
|
|
|
7100e8 |
+++ b/lib/services/Makefile.am
|
|
|
7100e8 |
@@ -23,11 +23,15 @@ INCLUDES = -I$(top_builddir)/include
|
|
|
7100e8 |
lib_LTLIBRARIES = libcrmservice.la
|
|
|
7100e8 |
noinst_HEADERS = upstart.h systemd.h services_private.h
|
|
|
7100e8 |
|
|
|
7100e8 |
-libcrmservice_la_SOURCES = services.c services_linux.c dbus.c
|
|
|
7100e8 |
+libcrmservice_la_SOURCES = services.c services_linux.c
|
|
|
7100e8 |
libcrmservice_la_LDFLAGS = -version-info 1:0:0
|
|
|
7100e8 |
libcrmservice_la_CFLAGS = $(GIO_CFLAGS) -DOCF_ROOT_DIR=\"@OCF_ROOT_DIR@\"
|
|
|
7100e8 |
libcrmservice_la_LIBADD = $(GIO_LIBS) $(top_builddir)/lib/common/libcrmcommon.la $(DBUS_LIBS)
|
|
|
7100e8 |
|
|
|
7100e8 |
+if BUILD_DBUS
|
|
|
7100e8 |
+libcrmservice_la_SOURCES += dbus.c
|
|
|
7100e8 |
+endif
|
|
|
7100e8 |
+
|
|
|
7100e8 |
if BUILD_UPSTART
|
|
|
7100e8 |
libcrmservice_la_SOURCES += upstart.c
|
|
|
7100e8 |
endif
|