]> git.ozlabs.org Git - ppp.git/commitdiff
configure.ac, pppd/Makefile.am: use pkg-config to link against systemd
authorSam James <sam@gentoo.org>
Sun, 8 Aug 2021 06:07:18 +0000 (07:07 +0100)
committerEivind Næss <eivnaes@yahoo.com>
Fri, 15 Jul 2022 22:25:39 +0000 (15:25 -0700)
Signed-off-by: Sam James <sam@gentoo.org>
configure.ac
pppd/Makefile.am

index 819d766081bf44ffe879ab8d29c364fc51b9cbf4..93e60f6568a102b82df0a28357695123a90d886a 100644 (file)
@@ -106,6 +106,10 @@ AM_CONDITIONAL(WITH_SYSTEMD, test "x${enable_systemd}" = "xyes")
 AM_COND_IF([WITH_SYSTEMD],
     AC_DEFINE([SYSTEMD], 1, [Enable support for systemd notifications]))
 
+if test "x${enable_systemd}" = "xyes"; then
+       PKG_CHECK_MODULES([systemd], [systemd])
+fi
+
 #
 # Enable Callback Protocol Support, disabled by default
 AC_ARG_ENABLE([cbcp],
index c3f512fbd4497467c4b0eb548bcbae2882541740..d0dcf8aef2703e689adf1c88380ec31485a43c02 100644 (file)
@@ -171,7 +171,8 @@ utest_chap_LDADD = libppp_crypt.la
 pppd_LIBS += libppp_crypt.la
 
 if WITH_SYSTEMD
-pppd_LIBS += -lsystemd
+pppd_CPPFLAGS += $(SYSTEMD_CFLAGS)
+pppd_LIBS += $(SYSTEMD_LIBS)
 endif
 
 if WITH_SRP