diff --git a/plugins/autoaway/Makefile.am b/plugins/autoaway/Makefile.am
index b694929..c7b65d0 100644
--- a/plugins/autoaway/Makefile.am
+++ b/plugins/autoaway/Makefile.am
@@ -1,3 +1,7 @@
+if ENABLE_DBUS
+        AM_CPPFLAGS += -DENABLE_DBUS
+endif
+
 plugindir = $(pkglibdir)/plugins
 plugin_LTLIBRARIES = autoaway.la
 
