You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/gnome-extra/cinnamon-session/files/cinnamon-session-3.6.1-elog...

66 lines
1.9 KiB

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 elogind 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.