]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: update --with-systemd detection (#1715)
authorAmos Jeffries <yadij@users.noreply.github.com>
Mon, 4 Mar 2024 10:45:23 +0000 (10:45 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 4 Mar 2024 14:56:04 +0000 (14:56 +0000)
Drop support for obsolete systemd v209 and older.

configure.ac
src/client_side.cc

index 2a2c9c38469b18200d9a252dad63f51e03b8fd85..208edada6d71a0be7d0023689246b37e96d98c3f 100644 (file)
@@ -1259,20 +1259,13 @@ SQUID_CHECK_LIB_WORKS(ldap,[
 ])
 
 SQUID_AUTO_LIB(systemd,[systemd API for start-up notification],[LIBSYSTEMD])
-AH_TEMPLATE(USE_SYSTEMD,[systemd support is available])
 SQUID_CHECK_LIB_WORKS(systemd,[
   SQUID_STATE_SAVE(squid_systemd_state)
   LIBS="$LIBS $LIBSYSTEMD_PATH"
-  PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd],,[
-    # systemd < 209
-    PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd-daemon],,[:])
-  ])
-  AC_CHECK_HEADERS(systemd/sd-daemon.h)
+  PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd >= 209],[
+    AC_CHECK_HEADERS(systemd/sd-daemon.h)
+  ],[:])
   SQUID_STATE_ROLLBACK(squid_systemd_state)
-
-  AS_IF([test "x$LIBSYSTEMD_LIBS" != "x"],[
-    AC_DEFINE(USE_SYSTEMD,1,[systemd support is available])
-  ])
 ])
 
 AC_ARG_ENABLE(forw-via-db,
index c9a3a510a6e6cf68e9c92701fc2a09b441551894..eac7d93528f01b310ee65615c7430a708f782544 100644 (file)
@@ -3369,7 +3369,7 @@ clientListenerConnectionOpened(AnyP::PortCfgPointer &s, const Ipc::FdNoteId port
 
     Must(AddOpenedHttpSocket(s->listenConn)); // otherwise, we have received a fd we did not ask for
 
-#if USE_SYSTEMD
+#if HAVE_LIBSYSTEMD
     // When the very first port opens, tell systemd we are able to serve connections.
     // Subsequent sd_notify() calls, including calls during reconfiguration,
     // do nothing because the first call parameter is 1.