summaryrefslogtreecommitdiff
blob: b35ce9e55bfdc5e984d09e8202b9363c4f38dae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff --git a/cinnamon-session/Makefile.am b/cinnamon-session/Makefile.am
index 789d47d..d8093d4 100644
--- a/cinnamon-session/Makefile.am
+++ b/cinnamon-session/Makefile.am
@@ -71,6 +71,7 @@ cinnamon_session_CPPFLAGS =			\
 	$(XEXT_CFLAGS)				\
 	$(GCONF_CFLAGS)				\
 	$(LOGIND_CFLAGS)			\
+	$(ELOGIND_CFLAGS)			\
 	-I$(top_srcdir)/egg			\
 	-DLOCALE_DIR=\""$(datadir)/locale"\"	\
 	-DDATA_DIR=\""$(datadir)/cinnamon-session"\" \
@@ -91,6 +92,7 @@ cinnamon_session_LDADD =				\
 	$(UPOWER_LIBS)				\
 	$(GCONF_LIBS)				\
 	$(LOGIND_LIBS)				\
+	$(ELOGIND_LIBS)				\
 	$(EXECINFO_LIBS)
 
 libcsmutil_la_SOURCES =				\
diff --git a/cinnamon-session/csm-systemd.c b/cinnamon-session/csm-systemd.c
index cef991c..dc2aa2e 100644
--- a/cinnamon-session/csm-systemd.c
+++ b/cinnamon-session/csm-systemd.c
@@ -32,7 +32,11 @@
 #include <sys/types.h>
 #include <pwd.h>
 
+#ifdef HAVE_ELOGIND
+#include <elogind/sd-login.h>
+#else
 #include <systemd/sd-login.h>
+#endif
 
 #include <glib.h>
 #include <glib-object.h>
diff --git a/configure.ac b/configure.ac
index 38db5a3..8dafc6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,15 +113,23 @@ AC_ARG_ENABLE([logind],
 
 have_logind=no
 if test x$enable_logind != xno ; then
-  PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd >= 183], [have_logind=yes], [have_logind=no])
+  PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0], [have_logind=yes], [have_logind=no])
 fi
 
 if test x$have_logind = xyes; then
     AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported])
 fi
 
+have_elogind=no
+PKG_CHECK_MODULES(ELOGIND, [libelogind], [have_elogind=yes], [have_elogind=no])
+if test x$have_elogind = xyes; then
+        AC_DEFINE(HAVE_ELOGIND, 1, [Define if logind is supported])
+fi
+
 AC_SUBST(LOGIND_CFLAGS)
 AC_SUBST(LOGIND_LIBS)
+AC_SUBST(ELOGIND_CFLAGS)
+AC_SUBST(ELOGIND_LIBS)
 
 dnl ====================================================================
 dnl Option to disable DBus user session support.