]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Define LOGIND_RUNNING from the configure script
authorIain Lane <iain.lane@canonical.com>
Tue, 16 Apr 2013 16:27:50 +0000 (17:27 +0100)
committerIain Lane <iain.lane@canonical.com>
Tue, 16 Apr 2013 16:27:50 +0000 (17:27 +0100)
configure.ac
src/session.h

index bbc25b67dfd29719556fadac5529c911ff1a1788..1a6dc9637e5f6f5b43ab6a90aa9965e33214bbbe 100644 (file)
@@ -179,6 +179,8 @@ AM_CONDITIONAL(ENABLE_CONSOLEKIT, test x$enable_consolekit = xyes)
 
 if test x$enable_consolekit = xyes; then
   AC_DEFINE(WITH_CONSOLEKIT, 1, [Define if ConsoleKit support is enabled])
+  AC_DEFINE(LOGIND_RUNNING(), 0,
+                     [Define to a check for whether the system is running logind])
 fi
 
 AC_ARG_ENABLE(logind,
@@ -189,6 +191,8 @@ AM_CONDITIONAL(ENABLE_LOGIND, test x$enable_logind = xyes)
 
 if test x$enable_logind = xyes; then
   AC_DEFINE(WITH_LOGIND, 1, [Define if systemd logind support is enabled])
+  AC_DEFINE(LOGIND_RUNNING(), (access("/run/systemd/seats/", F_OK) >= 0),
+                     [Define to a check for whether the system is running logind])
 fi
 
 if test x$enable_consolekit = xno -a x$enable_logind = xno; then
index 96c51e287d6da60e7793ffbc2d1187c19c5a82cb..52a6e9e8dd1a53938c34b0e1560299828051cd0f 100644 (file)
 
 G_BEGIN_DECLS
 
-#ifdef WITH_LOGIND
-#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0)
-#else
-#define LOGIND_RUNNING() (false)
-#endif
-
 #define SESSION_TYPE           (session_get_type())
 #define SESSION(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), SESSION_TYPE, Session))
 #define SESSION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), SESSION_TYPE, SessionClass))