compositor: systemd notifications support
Add systemd status and watchdog notification support.
Feature is not compiled by default and can be enabled by
"--enable-systemd-notify" configuration flag. It compiles
into module "systemd-notify.so" and can be loaded by
adding it in weston.ini like any other module, i.e.
"modules=systemd-notify.so". Watchdog timeout equals to
half of timeout defined by "WATCHDOG_USEC" environment
variable, which is set by "WatchdogSec=" setting in
service file.
Signed-off-by: Egor Starkov <egor.starkov@ge.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/Makefile.am b/Makefile.am
index b82b8ee..ec5a32c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -95,7 +95,24 @@
shared/timespec-util.h \
shared/zalloc.h \
shared/platform.h \
- src/weston-egl-ext.h
+ src/weston-egl-ext.h \
+ src/systemd-notify.h
+
+if SYSTEMD_NOTIFY_SUPPORT
+module_LTLIBRARIES += systemd-notify.la
+systemd_notify_la_LDFLAGS = -module -avoid-version
+systemd_notify_la_LIBADD = $(SYSTEMD_DAEMON_LIBS)
+systemd_notify_la_CFLAGS = \
+ $(SYSTEMD_DAEMON_LIBS) \
+ $(PIXMAN_CFLAGS) \
+ $(AM_CFLAGS)
+systemd_notify_la_SOURCES = \
+ src/systemd-notify.c \
+ src/systemd-notify.h \
+ shared/helpers.h \
+ shared/zalloc.h \
+ compositor.h
+endif
nodist_weston_SOURCES = \
protocol/screenshooter-protocol.c \