summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2018-12-06 12:08:02 -0500
committerChristopher Michael <cp.michael@samsung.com>2018-12-06 12:08:02 -0500
commitb09cf2cbbc31d718e2a98b3448a1148976a327d3 (patch)
treef302886882e5835080f25d164d997ee5863ffe25
parent01ed58d52d878ea51e7d5dd66f812b8e17f33cb8 (diff)
parent3deb46b503ab6829d06d9bee720614bf578113ca (diff)
elput: Add support for non-systemd boxes using elogind
These commits allow running efl/e wayland without installing systemd by using elogind library to provide the needed functionality. Merge branch 'devs/devilhorns/elput'
-rw-r--r--configure.ac14
-rw-r--r--meson_options.txt6
-rw-r--r--src/lib/elput/elput_logind.c2
-rw-r--r--src/lib/elput/elput_manager.c2
-rw-r--r--src/lib/elput/elput_private.h4
-rw-r--r--src/lib/elput/meson.build3
6 files changed, 29 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 65f695c35d..17455a35ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3934,8 +3934,22 @@ EFL_INTERNAL_DEPEND_PKG([ELPUT], [eina])
3934 3934
3935EFL_DEPEND_PKG([ELPUT], [LIBINPUT], [libinput >= 1.7.0 xkbcommon >= 0.3.0 libudev]) 3935EFL_DEPEND_PKG([ELPUT], [LIBINPUT], [libinput >= 1.7.0 xkbcommon >= 0.3.0 libudev])
3936 3936
3937AC_ARG_ENABLE([elogind],
3938 [AS_HELP_STRING([--enable-elogind],[enable elogind support.@<:@default=disabled@:>@])],
3939 [
3940 if test "x${enableval}" = "xyes" ; then
3941 want_elogind="yes"
3942 else
3943 want_elogind="no"
3944 fi
3945 ], [
3946 want_elogind="yes"
3947 ])
3948
3937EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_systemd}], [SYSTEMD], [libsystemd]) 3949EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_systemd}], [SYSTEMD], [libsystemd])
3950EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_elogind}], [ELOGIND], [libelogind])
3938EFL_ADD_FEATURE([ELPUT], [systemd-logind], [${want_systemd}]) 3951EFL_ADD_FEATURE([ELPUT], [systemd-logind], [${want_systemd}])
3952EFL_ADD_FEATURE([ELPUT], [elogind], [${want_elogind}])
3939 3953
3940EFL_ADD_LIBS([ELPUT], [-lm]) 3954EFL_ADD_LIBS([ELPUT], [-lm])
3941 3955
diff --git a/meson_options.txt b/meson_options.txt
index 296b3b88d8..30eed934a4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -333,3 +333,9 @@ option('native-arch-optimization',
333 value: true, 333 value: true,
334 description: 'Flag for enabling architecture native optimizations' 334 description: 'Flag for enabling architecture native optimizations'
335) 335)
336
337option('elogind',
338 type : 'boolean',
339 value : false,
340 description : 'use elogind support'
341)
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index 82ce11ff16..40e483ebe5 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -1,6 +1,6 @@
1#include "elput_private.h" 1#include "elput_private.h"
2 2
3#ifdef HAVE_SYSTEMD 3#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND)
4 4
5static void 5static void
6_logind_session_active_cb_free(void *data EINA_UNUSED, void *event) 6_logind_session_active_cb_free(void *data EINA_UNUSED, void *event)
diff --git a/src/lib/elput/elput_manager.c b/src/lib/elput/elput_manager.c
index 93f39ea261..987e73759b 100644
--- a/src/lib/elput/elput_manager.c
+++ b/src/lib/elput/elput_manager.c
@@ -2,7 +2,7 @@
2 2
3static Elput_Interface *_ifaces[] = 3static Elput_Interface *_ifaces[] =
4{ 4{
5#ifdef HAVE_SYSTEMD 5#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND)
6 &_logind_interface, 6 &_logind_interface,
7#endif 7#endif
8 NULL, 8 NULL,
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index 692dd4a83e..16fe305c5b 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -28,6 +28,10 @@
28# include <systemd/sd-login.h> 28# include <systemd/sd-login.h>
29# endif 29# endif
30 30
31# ifdef HAVE_ELOGIND
32# include <elogind/sd-login.h>
33# endif
34
31#ifndef ELPUT_NODEFS 35#ifndef ELPUT_NODEFS
32# ifdef ELPUT_DEFAULT_LOG_COLOR 36# ifdef ELPUT_DEFAULT_LOG_COLOR
33# undef ELPUT_DEFAULT_LOG_COLOR 37# undef ELPUT_DEFAULT_LOG_COLOR
diff --git a/src/lib/elput/meson.build b/src/lib/elput/meson.build
index c812ad7759..2aa3590d2b 100644
--- a/src/lib/elput/meson.build
+++ b/src/lib/elput/meson.build
@@ -22,6 +22,9 @@ elput_deps += dependency('libudev')
22if get_option('systemd') 22if get_option('systemd')
23 elput_deps += systemd 23 elput_deps += systemd
24endif 24endif
25if get_option('elogind')
26 elput_deps += dependency('libelogind')
27endif
25 28
26elput_lib = library('elput', 29elput_lib = library('elput',
27 elput_src, pub_eo_file_target, 30 elput_src, pub_eo_file_target,