add systemd socket activation

This commit is contained in:
Wim Taymans 2018-10-18 09:50:43 +02:00
parent 9fdb8a0e5f
commit e5dcacdefb
5 changed files with 52 additions and 31 deletions

View file

@ -125,6 +125,16 @@ if cc.has_function('memfd_create', prefix : '#include <sys/mman.h>', args : [ '-
cdata.set('HAVE_MEMFD_CREATE', 1)
endif
if get_option('systemd')
systemd = dependency('systemd', required: false)
systemd_dep = dependency('libsystemd', required: false)
if systemd.found()
cdata.set('HAVE_SYSTEMD_DAEMON', 1)
else
warning('Systemd integration was enabled, but systemd is not available')
endif
endif
configure_file(input : 'config.h.meson',
output : 'config.h',
configuration : cdata)