build: configureDbus replacing linked objects

The external references to the configurations are provided by the
dbusconfiguration.cpp.  Make including this configured.

Tested: Now platform without dbus configuration properly configures
zone.
Change-Id: I97646141aa5672afaadd5346152dfbb07557b2d9
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/Makefile.am b/Makefile.am
index 05e8ce9..a0c64c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,7 +43,6 @@
 	dbus/util.cpp \
 	dbus/dbuspassive.cpp \
 	dbus/dbusactiveread.cpp \
-	dbus/dbusconfiguration.cpp \
 	dbus/dbuswrite.cpp \
 	sysfs/sysfsread.cpp \
 	sysfs/sysfswrite.cpp \
@@ -68,6 +67,10 @@
 	experiments/drive.cpp \
 	$(BUILT_SOURCES)
 
+if CONFIGURE_DBUS
+libswampd_la_SOURCES += dbus/dbusconfiguration.cpp
+endif
+
 libmanualcmdsdir = ${libdir}/ipmid-providers
 libmanualcmds_LTLIBRARIES = libmanualcmds.la
 libmanualcmds_la_SOURCES = \
diff --git a/main.cpp b/main.cpp
index 91e555f..e2672e4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -17,7 +17,6 @@
 #include "config.h"
 
 #include "conf.hpp"
-#include "dbus/dbusconfiguration.hpp"
 #include "interfaces.hpp"
 #include "pid/builder.hpp"
 #include "pid/builderconfig.hpp"
@@ -42,6 +41,10 @@
 #include <unordered_map>
 #include <vector>
 
+#if CONFIGURE_DBUS
+#include "dbus/dbusconfiguration.hpp"
+#endif
+
 /* The YAML converted sensor list. */
 extern std::map<std::string, struct sensor> SensorConfig;
 /* The YAML converted PID list. */
@@ -84,10 +87,11 @@
     }
 
     auto ModeControlBus = sdbusplus::bus::new_default();
-    if (configureDbus)
+#if CONFIGURE_DBUS
     {
         dbus_configuration::init(ModeControlBus);
     }
+#endif
     SensorManager mgmr;
     std::unordered_map<int64_t, std::unique_ptr<PIDZone>> zones;