diff options
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | src/Daemon/CrashWatcher.cpp | 8 | ||||
-rw-r--r-- | src/Daemon/CrashWatcher.h | 6 | ||||
-rw-r--r-- | src/Daemon/Makefile.am | 3 |
4 files changed, 21 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index e8430a44..0b8351e1 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_CHECK_HEADER([magic.h], [], CONF_DIR='${sysconfdir}/${PACKAGE_NAME}' PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins' PLUGINS_LIB_DIR='${libdir}/${PACKAGE_NAME}' +ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1' DEBUG_DUMPS_DIR='${localstatedir}/cache/${PACKAGE_NAME}' AC_ARG_WITH(debugdumpsdir, @@ -40,6 +41,17 @@ AC_ARG_WITH(debugdumpsdir, [Directory where debugdumps are created])], [DEBUG_DUMPS_DIR="$withval"]) +AC_ARG_ENABLE(socket, + [AC_HELP_STRING([--enable-socket], + [Enable socket communication. Disable DBus communication])], + [ENABLE_SOCKET_OR_DBUS='-DENABLE_SOCKET=1']) + +AC_ARG_ENABLE(dbus, + [AC_HELP_STRING([--enable-dbus], + [Enable DBus communication. Disable socket communication @<:@default@:>@])], + [ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1']) + +AC_SUBST(ENABLE_SOCKET_OR_DBUS) AC_SUBST(CONF_DIR) AC_SUBST(PLUGINS_CONF_DIR) AC_SUBST(PLUGINS_LIB_DIR) diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 9dd4232e..97d03b57 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -381,13 +381,13 @@ CCrashWatcher::CCrashWatcher(const std::string& pPath) SetUpMW(); SetUpCron(); FindNewDumps(pPath); -#ifdef HAVE_DBUS +#ifdef ENABLE_DBUS m_pCommLayer = new CCommLayerServerDBus(); -#elif HAVE_SOCKET +#elif ENABLE_SOCKET m_pCommLayer = new CCommLayerServerSocket(); #endif - m_pCommLayer = new CCommLayerServerDBus(); -// m_pCommLayer = new CCommLayerServerSocket(); +// m_pCommLayer = new CCommLayerServerDBus(); +// m_pCommLayer = new CCommLayerServerSocket(); m_pCommLayer->Attach(this); if((m_nFd = inotify_init()) == -1) diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h index ec463ee3..98ad9156 100644 --- a/src/Daemon/CrashWatcher.h +++ b/src/Daemon/CrashWatcher.h @@ -30,11 +30,11 @@ #include "Settings.h" //FIXME remove when it gets to autoconf -#include "CommLayerServerDBus.h" +//#include "CommLayerServerDBus.h" //#include "CommLayerServerSocket.h" -#ifdef HAVE_DBUS +#ifdef ENABLE_DBUS #include "CommLayerServerDBus.h" -#elif HAVE_SOCKET +#elif ENABLE_SOCKET #include "CommLayerServerSocket.h" #endif #include "CommLayerInner.h" diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index b84631ef..844abb43 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -6,7 +6,8 @@ abrt_CPPFLAGS = -I$(srcdir)/../../lib/MiddleWare -I$(srcdir)/../../lib/CommLayer -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(GLIB_CFLAGS) $(DBUSCPP_CFLAGS) \ -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \ -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \ - -DCONF_DIR=\"$(CONF_DIR)\" + -DCONF_DIR=\"$(CONF_DIR)\" \ + $(ENABLE_SOCKET_OR_DBUS) abrt_LDADD = ../../lib/MiddleWare/libABRTMiddleWare.la ../../lib/CommLayer/libABRTCommLayer.la $(DL_LIBS) $(DBUSCPP_LIBS) $(RPM_LIBS) dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/ dist_dbusabrtconf_DATA = dbus-abrt.conf |