From 05f7c359ae59cbcf9890dddf27dd4362269459c8 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 23 Feb 2012 00:20:15 +0100 Subject: make gudev dep optional Debian has arches w/o udev (hurd-*, kfreebsd-*). These cannot build indicator-session currently because libgudev-1.0-dev is missing there. Make the gudev dep optional and thus make indicator-session buildable on non-Linux arches again. --- src/device-menu-mgr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/device-menu-mgr.c') diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index f8f0696..8e0713e 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -733,8 +733,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 -- cgit v1.2.3 From 68cf3cfad3861048d620b2486abf47d5a3ce2886 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 23 Feb 2012 08:40:17 -0600 Subject: Don't include the header or the variable if we're not using GUDev --- src/device-menu-mgr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/device-menu-mgr.c') diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index 8e0713e..cfdb55d 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -31,7 +31,9 @@ with this program. If not, see . #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; -- cgit v1.2.3