From: Michael Tremer Date: Sat, 27 Sep 2025 10:25:31 +0000 (+0000) Subject: configure: Always require systemd X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72f6db9955ce1df77912425f95cc0ef7307e4128;p=collecty.git configure: Always require systemd Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index dcc7a9e..fa2d2ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) # ------------------------------------------------------------------------------ diff --git a/configure.ac b/configure.ac index 6275481..99586cd 100644 --- a/configure.ac +++ b/configure.ac @@ -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} ])