Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 599492 | Differences between
and this patch

Collapse All | Expand All

(-)a/configure.ac (-1 / +56 lines)
Lines 259-264 Link Here
259
dnl ---------------------------------------------------------------------------
259
dnl ---------------------------------------------------------------------------
260
AC_PATH_PROG([XSLTPROC], [xsltproc])
260
AC_PATH_PROG([XSLTPROC], [xsltproc])
261
261
262
# elogind
263
264
AC_ARG_ENABLE([elogind],
265
              AS_HELP_STRING([--enable-elogind], [Use elogind]),
266
              [enable_elogind=$enableval],
267
              [enable_elogind=auto])
268
269
if test x$enable_elogind != xno; then
270
   PKG_CHECK_MODULES(ELOGIND, [libelogind >= 219],
271
			                     [have_elogind=yes], [have_elogind=no])
272
else
273
   have_elogind=no
274
fi
275
276
AC_MSG_CHECKING([whether to use elogind])
277
278
if test x$enable_elogind = xauto ; then
279
        if test x$have_elogind = xno ; then
280
                enable_elogind=no
281
        else
282
                enable_elogind=yes
283
        fi
284
fi
285
286
AC_MSG_RESULT($enable_elogind)
287
288
if test x$enable_elogind = xyes; then
289
        if test x$have_elogind = xno; then
290
                AC_MSG_ERROR([elogind support explicitly required, but libelogind not found])
291
        fi
292
        # Use HAVE_SYSTEMD here, too, so data/Makefile.am does
293
        # not need to duplicate code
294
        AC_DEFINE(HAVE_SYSTEMD, 1, [Define if elogind is used])
295
fi
296
AC_SUBST(ELOGIND_CFLAGS)
297
AC_SUBST(ELOGIND_LIBS)
298
299
LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $ELOGIND_LIBS"
300
LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $ELOGIND_CFLAGS"
301
302
if test "x$have_elogind" != "xno" ; then
303
        AC_DEFINE(WITH_ELOGIND, 1, [Define to enable elogind support])
304
        # Re-use WITH_SYSTEMD to not flood 
305
        #   src/libaccountsservice/act-user-manager.c
306
        # with a plethora of "if defined() || defined()" lines
307
        AC_DEFINE(WITH_SYSTEMD, 1, [Define to enable systemd support])
308
fi
309
310
262
# systemd
311
# systemd
263
312
264
AC_ARG_ENABLE([systemd],
313
AC_ARG_ENABLE([systemd],
Lines 267-274 Link Here
267
              [enable_systemd=auto])
316
              [enable_systemd=auto])
268
317
269
if test x$enable_systemd != xno; then
318
if test x$enable_systemd != xno; then
270
   PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
319
   if test x$enable_elogind = yes; then
320
           AC_MSG_NOTICE([Systemd support requested, but elogind found])
321
           have_systemd=no
322
           enable_systemd=no
323
   else
324
           PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
271
			                     [have_systemd=yes], [have_systemd=no])
325
			                     [have_systemd=yes], [have_systemd=no])
326
   fi
272
else
327
else
273
   have_systemd=no
328
   have_systemd=no
274
fi
329
fi
(-)a/src/libaccountsservice/act-user-manager.c (+4 lines)
Lines 42-48 Link Here
42
#include <gio/gunixinputstream.h>
42
#include <gio/gunixinputstream.h>
43
43
44
#ifdef WITH_SYSTEMD
44
#ifdef WITH_SYSTEMD
45
#ifdef WITH_ELOGIND
46
#include <elogind/sd-login.h>
47
#else
45
#include <systemd/sd-login.h>
48
#include <systemd/sd-login.h>
49
#endif /* check against elogind substitution
46
50
47
/* check if logind is running */
51
/* check if logind is running */
48
#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0)
52
#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0)

Return to bug 599492