aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am26
-rw-r--r--src/device-menu-mgr.c6
2 files changed, 27 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 67a1cb6..a1e443e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,6 @@
+EXTRA_DIST =
+
libexec_PROGRAMS = \
indicator-session-service
@@ -107,14 +109,26 @@ indicator_session_service_SOURCES = \
user-menu-mgr.c \
device-menu-mgr.h \
device-menu-mgr.c \
- udev-mgr.h \
- udev-mgr.c \
sane-rules.h
if BUILD_APT
indicator_session_service_SOURCES += \
apt-watcher.h \
apt-watcher.c
+else
+EXTRA_DIST += \
+ apt-watcher.h \
+ apt-watcher.c
+endif
+
+if HAS_GUDEV
+indicator_session_service_SOURCES += \
+ udev-mgr.h \
+ udev-mgr.c
+else
+EXTRA_DIST += \
+ udev-mgr.h \
+ udev-mgr.c
endif
indicator_session_service_CFLAGS = \
@@ -122,10 +136,12 @@ indicator_session_service_CFLAGS = \
$(GCONF_CFLAGS) \
-DLIBEXECDIR=\"$(libexecdir)\" \
-Wall -Werror \
- -DG_LOG_DOMAIN=\"Indicator-Session\"
+ -DG_LOG_DOMAIN=\"Indicator-Session\" \
+ $(GUDEV_CFLAGS)
indicator_session_service_LDADD = \
$(SESSIONSERVICE_LIBS) \
- $(GCONF_LIBS)
+ $(GCONF_LIBS) \
+ $(GUDEV_LIBS)
#################
# GTK Logout Stuff
@@ -168,7 +184,7 @@ BUILT_SOURCES = \
accounts-service-client.h \
accounts-service-user-client.h
-EXTRA_DIST = \
+EXTRA_DIST += \
org.freedesktop.ConsoleKit.Manager.xml \
org.freedesktop.ConsoleKit.Seat.xml \
org.freedesktop.ConsoleKit.Session.xml \
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index f8f0696..cfdb55d 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -31,7 +31,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "apt-watcher.h"
#endif /* HAVE_APT */
+#ifdef HAS_GUDEV
#include "udev-mgr.h"
+#endif /* HAS_GUDEV */
#define UP_ADDRESS "org.freedesktop.UPower"
#define UP_OBJECT "/org/freedesktop/UPower"
@@ -47,7 +49,9 @@ struct _DeviceMenuMgr
#ifdef HAVE_APT
AptWatcher* apt_watcher;
#endif /* HAVE_APT */
+#ifdef HAS_GUDEV
UdevMgr* udev_mgr;
+#endif /* HAS_GUDEV */
};
static GSettings *lockdown_settings = NULL;
@@ -733,8 +737,10 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self, gboolean greeter_mode)
restart_shutdown_logout_mi->shutdown_mi = shutdown_mi;
update_menu_entries(restart_shutdown_logout_mi);
+#ifdef HAS_GUDEV
// Time to create the udev mgr and hand it the static relevant items.
self->udev_mgr = udev_mgr_new (scanners_menuitem, webcam_menuitem);
+#endif
}
static void