1 From 2b4c5d43eaf14b93f2cf0fc7959926606f811f37 Mon Sep 17 00:00:00 2001
2 From: Nick Bowler <nbowler@draconx.ca>
5 configure.ac | 11 +++++++++--
7 2 files changed, 10 insertions(+), 3 deletions(-)
9 diff --git a/configure.ac b/configure.ac
10 index 47ff5db30a54..6d909ce861fb 100644
13 @@ -44,8 +44,15 @@ AC_CHECK_LIB(nsl, yp_get_default_domain)
14 AC_CHECK_LIB(socket, bind)
15 AC_CHECK_LIB(pthread, pthread_create)
17 -PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])
18 -AC_SUBST(USE_SD_NOTIFY)
19 +AC_ARG_WITH([systemd], [AS_HELP_STRING([--with-systemd], [build against libsystemd])])
22 +AS_IF([test x"$with_systemd" != x"no"],
23 + [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
24 + [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])])
25 +AS_IF([test x"$with_systemd" = x"yes" && test x"$USE_SD_NOTIFY" = x"0"],
26 + [AC_MSG_ERROR([systemd requested but libsystemd not found])])
27 +AC_SUBST([USE_SD_NOTIFY])
29 AC_ARG_ENABLE([dbus-nm],
30 AC_HELP_STRING([--enable-dbus-nm],[Enable DBUS/NetworkManager support]),
31 diff --git a/src/ypbind-mt.c b/src/ypbind-mt.c
32 index 2012eb8e8642..79f25eb3ea22 100644
36 #if defined(HAVE_NSS_H)
39 -#if defined(HAVE_SYSTEMD_SD_DAEMON_H)
41 #include <systemd/sd-daemon.h>