From: Jean Flach Date: Tue, 27 Feb 2018 14:54:58 +0000 (+0100) Subject: Require systemd headers X-Git-Tag: v2.9.0~144^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01c7f20170628a59ee8c76a0729576fb67dfa094;p=icinga2 Require systemd headers Only mandatory if using systemd --- diff --git a/INSTALL.md b/INSTALL.md index 98251784c..c7b5db363 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -44,6 +44,10 @@ application using a dist tarball (including notes for distributions): - Alpine: boost-dev * GNU bison (bison) * GNU flex (flex) >= 2.5.35 +* Systemd headers + - Only required when using Systemd + - Debian/Ubuntu: libsystemd-dev + - RHEL/Fedora: systemd-devel ## Optional features diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt index 73a8f5fc7..29daa94a0 100644 --- a/lib/base/CMakeLists.txt +++ b/lib/base/CMakeLists.txt @@ -97,6 +97,13 @@ if(ICINGA2_UNITY_BUILD) mkunity_target(base base base_SOURCES) endif() +if(HAVE_SYSTEMD) + find_path(SYSTEMD_INCLUDE_DIR + NAMES systemd/sd-daemon.h + HINTS ${SYSTEMD_ROOT_DIR}) + include_directories(${SYSTEMD_INCLUDE_DIR}) +endif() + add_library(base OBJECT ${base_SOURCES}) include_directories(${icinga2_SOURCE_DIR}/third-party/execvpe)