[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH] build: allow dbus notification code to be disabled



default is to build with dbus support

Signed-off-by: Fabio M. Di Nitto <fdinitto redhat com>
Signed-off-by: Lon Hohberger <lhh redhat com>
---
 configure                      |    7 +++++++
 make/defines.mk.input          |    1 +
 rgmanager/src/daemons/Makefile |    6 +++++-
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 7e1aca7..9c7a773 100755
--- a/configure
+++ b/configure
@@ -73,6 +73,7 @@ my %options = (
 	confdir => \$confdir,
 	conffile => \$conffile,
 	enable_contrib => \$enable_contrib,
+	disable_dbus => \$disable_dbus,
 	somajor => \$somajor,
 	sominor => \$sominor,
 	release_version => \$release_version,
@@ -144,6 +145,7 @@ my $err = &GetOptions (\%options,
 		    'sominor=s',
 		    'release_version=s',
 		    'enable_contrib',
+		    'disable_dbus',
 		    'without_common',
 		    'without_config',
 		    'without_cman',
@@ -219,6 +221,7 @@ if ($help || !$err) {
   print "--ldapincdir=\tthe base directory for ldap include files.  (Default: {incdir})\n";
   print "--ldaplibdir=\tthe base directory for ldap libraries.  (Default: {libdir})\n";
   print "--enable_contrib\tEnable build of community contributed code/tools.  (Default: no)\n";
+  print "--disable_dbus\tDisable built-in support for dbus notifications.  (Default: no)\n";
   print "--without_common\tDisable common building  (Default: enabled)\n";
   print "--without_config\tDisable config building  (Default: enabled)\n";
   print "--without_cman\tDisable cman building  (Default: enabled)\n";
@@ -504,6 +507,9 @@ if (!$conffile) {
 if (!$enable_contrib) {
   $enable_contrib="";
 }
+if (!$disable_dbus) {
+  $disable_dbus="";
+}
 if (!$without_common) {
   $without_common="";
 }
@@ -598,6 +604,7 @@ while (<IFILE>) {
   $_ =~ s/\ CONFDIR\@/$confdir/;
   $_ =~ s/\ CONFFILE\@/$conffile/;
   $_ =~ s/\ ENABLE_CONTRIB\@/$enable_contrib/;
+  $_ =~ s/\ DISABLE_DBUS\@/$disable_dbus/;
   $_ =~ s/\ DISABLE_COMMON\@/$without_common/;
   $_ =~ s/\ DISABLE_CONFIG\@/$without_config/;
   $_ =~ s/\ DISABLE_CMAN\@/$without_cman/;
diff --git a/make/defines.mk.input b/make/defines.mk.input
index 3751cf5..ee5f852 100644
--- a/make/defines.mk.input
+++ b/make/defines.mk.input
@@ -58,6 +58,7 @@ ldaplibdir ?= @LDAPLIBDIR@
 zlibincdir ?= @ZLIBINCDIR@
 zliblibdir ?= @ZLIBLIBDIR@
 contrib_code ?= @ENABLE_CONTRIB@
+disable_dbus ?= @DISABLE_DBUS@
 without_common ?= @DISABLE_COMMON@
 without_config ?= @DISABLE_CONFIG@
 without_cman ?= @DISABLE_CMAN@
diff --git a/rgmanager/src/daemons/Makefile b/rgmanager/src/daemons/Makefile
index 9619990..7218c53 100644
--- a/rgmanager/src/daemons/Makefile
+++ b/rgmanager/src/daemons/Makefile
@@ -47,7 +47,6 @@ CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} -I${logtincdir}
 CFLAGS += `xml2-config --cflags` -I${slangincdir}
 CFLAGS += -I$(S)/../../include
 CFLAGS += -I${incdir}
-CFLAGS += `pkg-config --cflags dbus-1`
 
 NOCCS_CFLAGS += -DNO_CCS
 
@@ -61,7 +60,12 @@ DLM_LDFLAGS += -L${dlmlibdir} -ldlm
 XML2_LDFLAGS += `xml2-config --libs`
 SLANG_LDFLAGS += -L${slanglibdir} -lslang
 EXTRA_LDFLAGS += -lpthread
+
+# dbus support for notifications
+ifndef disable_dbus
+CFLAGS += -DDBUS `pkg-config --cflags dbus-1`
 DBUS_LDFLAGS += `pkg-config --libs dbus-1`
+endif
 
 LDDEPS += ../clulib/libclulib.a
 
-- 
1.7.3.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]