From 97da92655c3de967742564ca6d27485688fc61f1 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 4 Jun 2016 19:55:21 -0400 Subject: [PATCH] configure: Ensure systemd development is present If a users specifies that they should use systemd then ensure that the systemd can be compiled against it. Signed-off-by: Donald Sharp Conflicts: configure.ac --- configure.ac | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 30fa7bd023..6719580976 100755 --- a/configure.ac +++ b/configure.ac @@ -328,10 +328,16 @@ if test x"${enable_time_check}" != x"no" ; then fi fi -if test "${enable_systemd}" = "yes" ; then - AC_DEFINE(HAVE_SYSTEMD,,Compile systemd support in) - LIBS="$LIBS -lsystemd " -fi +case "${enable_systemd}" in + "no") ;; + "yes") + AC_CHECK_LIB(systemd, sd_notify, LIBS="$LIBS -lsystemd") + if test $ac_cv_lib_systemd_sd_notify = no; then + AC_MSG_ERROR([enable systemd has been specified but systemd development env not found on your system]) + fi + ;; + "*") ;; +esac if test "${enable_poll}" = "yes" ; then AC_DEFINE(HAVE_POLL,,Compile systemd support in)