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

Collapse All | Expand All

(-)a/configure.ac (-3 / +31 lines)
Lines 183-193 Link Here
183
183
184
AM_CONDITIONAL(BUILD_TEST, [test "x$enable_test" = "xyes"])
184
AM_CONDITIONAL(BUILD_TEST, [test "x$enable_test" = "xyes"])
185
185
186
dnl ---------------------------------------------------------------------------
186
dnl -----------------------------------------------------------------------------------
187
dnl - Select wether to use libsystemd-login or ConsoleKit for session tracking
187
dnl - Select wether to use libsystemd-login, elogind or ConsoleKit for session tracking
188
dnl ---------------------------------------------------------------------------
188
dnl -----------------------------------------------------------------------------------
189
189
190
have_libsystemd=no
190
have_libsystemd=no
191
have_elogind=no
191
SESSION_TRACKING=ConsoleKit
192
SESSION_TRACKING=ConsoleKit
192
193
193
AC_ARG_ENABLE([libsystemd-login],
194
AC_ARG_ENABLE([libsystemd-login],
Lines 220-225 Link Here
220
    fi
221
    fi
221
  fi
222
  fi
222
fi
223
fi
224
225
AC_ARG_ENABLE([libelogind],
226
              [AS_HELP_STRING([--enable-libelogind[=@<:@auto/yes/no@:>@]], [Use libelogind (auto/yes/no)])],
227
              [enable_libelogind=$enableval],
228
              [enable_libelogind=auto])
229
if test "$enable_libelogind" != "no"; then
230
  PKG_CHECK_MODULES([LIBELOGIND],
231
    [libelogind],
232
    [have_libelogind=yes],
233
    [have_libelogind=no])
234
  if test "$have_libelogind" = "yes"; then
235
    SESSION_TRACKING=libelogind
236
    AC_DEFINE([HAVE_LIBELOGIND], 1, [Define to 1 if libelogind is available])
237
    save_LIBS=$LIBS
238
    LIBS=$LIBELOGIND_LIBS
239
    AC_CHECK_FUNCS(sd_uid_get_display)
240
    LIBS=$save_LIBS
241
  else
242
    if test "$enable_libelogind" = "yes"; then
243
      AC_MSG_ERROR([libelogind support requested but libelogind not found])
244
    fi
245
  fi
246
fi
223
247
224
AS_IF([test "x$cross_compiling" != "xyes" ], [
248
AS_IF([test "x$cross_compiling" != "xyes" ], [
225
  AS_IF([test "$have_libsystemd" = "yes"], [
249
  AS_IF([test "$have_libsystemd" = "yes"], [
Lines 245-250 Link Here
245
AC_SUBST(LIBSYSTEMD_LIBS)
245
AC_SUBST(LIBSYSTEMD_LIBS)
246
AM_CONDITIONAL(HAVE_LIBSYSTEMD, [test "$have_libsystemd" = "yes"], [Using libsystemd])
246
AM_CONDITIONAL(HAVE_LIBSYSTEMD, [test "$have_libsystemd" = "yes"], [Using libsystemd])
247
247
248
AC_SUBST(LIBELOGIND_CFLAGS)
249
AC_SUBST(LIBELOGIND_LIBS)
250
AM_CONDITIONAL(HAVE_LIBELOGIND, [test "$have_libelogind" = "yes"], [Using libelogind])
251
248
dnl ---------------------------------------------------------------------------
252
dnl ---------------------------------------------------------------------------
249
dnl - systemd unit / service files
253
dnl - systemd unit / service files
250
dnl ---------------------------------------------------------------------------
254
dnl ---------------------------------------------------------------------------
(-)a/src/polkitbackend/Makefile.am (+7 lines)
Lines 42-62 Link Here
42
libpolkit_backend_1_la_SOURCES += \
42
libpolkit_backend_1_la_SOURCES += \
43
	polkitbackendsessionmonitor.h		polkitbackendsessionmonitor-systemd.c
43
	polkitbackendsessionmonitor.h		polkitbackendsessionmonitor-systemd.c
44
else
44
else
45
if HAVE_LIBELOGIND
46
libpolkit_backend_1_la_SOURCES += \
47
	polkitbackendsessionmonitor.h		polkitbackendsessionmonitor-systemd.c
48
else
45
libpolkit_backend_1_la_SOURCES += \
49
libpolkit_backend_1_la_SOURCES += \
46
	polkitbackendsessionmonitor.h		polkitbackendsessionmonitor.c
50
	polkitbackendsessionmonitor.h		polkitbackendsessionmonitor.c
47
endif
51
endif
52
endif
48
53
49
libpolkit_backend_1_la_CFLAGS =                                        	\
54
libpolkit_backend_1_la_CFLAGS =                                        	\
50
        -D_POLKIT_COMPILATION                                  		\
55
        -D_POLKIT_COMPILATION                                  		\
51
        -D_POLKIT_BACKEND_COMPILATION                                  	\
56
        -D_POLKIT_BACKEND_COMPILATION                                  	\
52
        $(GLIB_CFLAGS)							\
57
        $(GLIB_CFLAGS)							\
53
	$(LIBSYSTEMD_CFLAGS)						\
58
	$(LIBSYSTEMD_CFLAGS)						\
59
	$(LIBELOGIND_CFLAGS)						\
54
	$(LIBJS_CFLAGS)							\
60
	$(LIBJS_CFLAGS)							\
55
        $(NULL)
61
        $(NULL)
56
62
57
libpolkit_backend_1_la_LIBADD =                               		\
63
libpolkit_backend_1_la_LIBADD =                               		\
58
        $(GLIB_LIBS)							\
64
        $(GLIB_LIBS)							\
59
	$(LIBSYSTEMD_LIBS)						\
65
	$(LIBSYSTEMD_LIBS)						\
66
	$(LIBELOGIND_LIBS)						\
60
	$(top_builddir)/src/polkit/libpolkit-gobject-1.la		\
67
	$(top_builddir)/src/polkit/libpolkit-gobject-1.la		\
61
	$(EXPAT_LIBS)							\
68
	$(EXPAT_LIBS)							\
62
	$(LIBJS_LIBS)							\
69
	$(LIBJS_LIBS)							\
(-)a/src/polkit/Makefile.am (+7 lines)
Lines 85-103 Link Here
85
libpolkit_gobject_1_la_SOURCES += \
85
libpolkit_gobject_1_la_SOURCES += \
86
	polkitunixsession-systemd.c		polkitunixsession.h
86
	polkitunixsession-systemd.c		polkitunixsession.h
87
else
87
else
88
if HAVE_LIBELOGIND
89
libpolkit_gobject_1_la_SOURCES += \
90
	polkitunixsession-systemd.c		polkitunixsession.h
91
else
88
libpolkit_gobject_1_la_SOURCES += \
92
libpolkit_gobject_1_la_SOURCES += \
89
	polkitunixsession.c			polkitunixsession.h
93
	polkitunixsession.c			polkitunixsession.h
90
endif
94
endif
95
endif
91
96
92
libpolkit_gobject_1_la_CFLAGS =                                        	\
97
libpolkit_gobject_1_la_CFLAGS =                                        	\
93
        -D_POLKIT_COMPILATION                                  		\
98
        -D_POLKIT_COMPILATION                                  		\
94
        $(GLIB_CFLAGS)							\
99
        $(GLIB_CFLAGS)							\
95
	$(LIBSYSTEMD_CFLAGS)						\
100
	$(LIBSYSTEMD_CFLAGS)						\
101
	$(LIBELOGIND_CFLAGS)						\
96
        $(NULL)
102
        $(NULL)
97
103
98
libpolkit_gobject_1_la_LIBADD =                               		\
104
libpolkit_gobject_1_la_LIBADD =                               		\
99
        $(GLIB_LIBS)							\
105
        $(GLIB_LIBS)							\
100
	$(LIBSYSTEMD_LIBS)						\
106
	$(LIBSYSTEMD_LIBS)						\
107
	$(LIBELOGIND_LIBS)						\
101
        $(NULL)
108
        $(NULL)
102
109
103
libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
110
libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
(-)a/src/polkitbackend/polkitbackendjsauthority.c (+4 lines)
Lines 39-44 Link Here
39
#include <systemd/sd-login.h>
39
#include <systemd/sd-login.h>
40
#endif /* HAVE_LIBSYSTEMD */
40
#endif /* HAVE_LIBSYSTEMD */
41
41
42
#ifdef HAVE_LIBELOGIND
43
#include <elogind/sd-login.h>
44
#endif /* HAVE_LIBELOGIND */
45
42
#include <jsapi.h>
46
#include <jsapi.h>
43
47
44
#include "initjs.h" /* init.js */
48
#include "initjs.h" /* init.js */
(-)a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c (+4 lines)
Lines 25-31 Link Here
25
#include <grp.h>
25
#include <grp.h>
26
#include <string.h>
26
#include <string.h>
27
#include <glib/gstdio.h>
27
#include <glib/gstdio.h>
28
#ifdef HAVE_LIBSYSTEMD
28
#include <systemd/sd-login.h>
29
#include <systemd/sd-login.h>
30
#else
31
#include <elogind/sd-login.h>
32
#endif /* HAVE_LIBSYSTEMD versus HAVE_LIBELOGIND */
29
#include <stdlib.h>
33
#include <stdlib.h>
30
34
31
#include <polkit/polkit.h>
35
#include <polkit/polkit.h>
(-)a/src/polkit/polkitunixsession-systemd.c (+4 lines)
Lines 30-36 Link Here
30
#include "polkiterror.h"
30
#include "polkiterror.h"
31
#include "polkitprivate.h"
31
#include "polkitprivate.h"
32
32
33
#ifdef HAVE_LIBSYSTEMD
33
#include <systemd/sd-login.h>
34
#include <systemd/sd-login.h>
35
#else
36
#include <elogind/sd-login.h>
37
#endif /* HAVE_LIBSYSTEMD versus HAVE_ELOGIND */
34
38
35
/**
39
/**
36
 * SECTION:polkitunixsession
40
 * SECTION:polkitunixsession

Return to bug 598615