]> git.ipfire.org Git - collecty.git/commitdiff
configure: Always require systemd
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Sep 2025 10:25:31 +0000 (10:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Sep 2025 10:25:31 +0000 (10:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
configure.ac

index dcc7a9eb389c715b89bd02ccbb017d0368e59e8c..fa2d2ac60053bde8b884a2f321619d19c5c8018b 100644 (file)
@@ -35,6 +35,7 @@ pythondir  = $(pyexecdir)
 # Dirs of external packages
 dbuspolicydir=@dbuspolicydir@
 dbussystemservicedir=@dbussystemservicedir@
+systemdsystemunitdir = $(prefix)/lib/systemd/system
 
 CLEANFILES =
 DISTCLEANFILES =
@@ -54,8 +55,7 @@ po/POTFILES.in: Makefile
 
 DISTCHECK_CONFIGURE_FLAGS = \
        --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
-       --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
-       --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+       --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir)
 
 # ------------------------------------------------------------------------------
 
index 62754810244a7cddab62740387d4e2c157d3b650..99586cd3dfcd6a7f300bc6f15bd9d12852001470 100644 (file)
@@ -77,6 +77,9 @@ AC_PATH_PROG([XSLTPROC], [xsltproc])
 
 PKG_CHECK_MODULES([OPING], [liboping])
 
+# systemd
+PKG_CHECK_MODULES(systemd, [libsystemd])
+
 # Python
 AM_PATH_PYTHON([3.9])
 PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
@@ -113,10 +116,6 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
 
 # ------------------------------------------------------------------------------
 
-AC_ARG_WITH([systemd],
-       AS_HELP_STRING([--with-systemd], [Enable systemd support.])
-)
-
 AC_ARG_WITH([dbuspolicydir],
        AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
        [],
@@ -129,34 +128,6 @@ AC_ARG_WITH([dbussystemservicedir],
        [with_dbussystemservicedir=${datadir}/dbus-1/system-services]
 )
 
-AS_IF([test "x$with_systemd" != "xno"],
-      [PKG_CHECK_MODULES(systemd, [libsystemd],
-      [have_systemd=yes], [have_systemd=no])],
-      [have_systemd=no]
-)
-
-AS_IF([test "x$have_systemd" = "xyes"],
-      [AC_MSG_CHECKING([for systemd system unit directory])
-       AC_ARG_WITH([systemdsystemunitdir],
-               AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
-               [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
-       )
-
-       AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-
-       if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
-               AC_MSG_RESULT([$systemdsystemunitdir])
-       else
-               AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
-       fi
-      ],
-      [AS_IF([test "x$with_systemd" = "xyes"],
-             [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
-      ])
-])
-
-AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
-
 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
 
@@ -176,6 +147,5 @@ AC_MSG_RESULT([
        D-Bus policy dir:       ${with_dbuspolicydir}
        D-Bus system dir:       ${with_dbussystemservicedir}
 
-       Systemd support         ${have_systemd}
        Generate man-pages:     ${have_manpages}
 ])