build: use list for logind dep

This reduces the boilerplate a bit. Use logind.name() instead of
having a separate source of truth. Requires adapting the checks a
bit because the dep name has a "lib" prefix.
This commit is contained in:
Simon Ser 2021-11-26 21:17:51 +00:00 committed by Kenny Levinsen
parent 69cf5c36e0
commit d92fa01f88
2 changed files with 8 additions and 15 deletions

View file

@ -13,10 +13,10 @@
#include <sys/un.h>
#include <unistd.h>
#if defined(HAVE_ELOGIND)
#if defined(HAVE_LIBELOGIND)
#include <elogind/sd-bus.h>
#include <elogind/sd-login.h>
#elif defined(HAVE_SYSTEMD)
#elif defined(HAVE_LIBSYSTEMD)
#include <systemd/sd-bus.h>
#include <systemd/sd-login.h>
#else