From f7548d6d28c313cf80e6f3ef89aed16a19815df1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:51:24 +0200 Subject: Adding upstream version 1:2.3.19.1+dfsg1. Signed-off-by: Daniel Baumann --- m4/want_systemd.m4 | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 m4/want_systemd.m4 (limited to 'm4/want_systemd.m4') diff --git a/m4/want_systemd.m4 b/m4/want_systemd.m4 new file mode 100644 index 0000000..fbccbc2 --- /dev/null +++ b/m4/want_systemd.m4 @@ -0,0 +1,36 @@ +dnl Checks for libsystemd existence and where +dnl to put systemd unit files. You can have +dnl systemd units without libsystemd. + +AC_DEFUN([DOVECOT_WANT_SYSTEMD], [ + systemdservicetype='simple' + have_libsystemd=no + + AS_IF([test "$want_systemd" != "no"], [ + dnl Check for actual systemd integration + PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [ + AC_DEFINE([HAVE_LIBSYSTEMD],[1], [Define to 1 if you have libsystemd]) + systemdservicetype='notify' + have_libsystemd=yes + ], AS_IF([test "$want_systemd" = "yes"], [ + AC_MSG_WARN([libsystemd not found - full integration disabled]) + ]) + ) + dnl Check for unit file installation + AC_MSG_CHECKING([for systemd unit directory]) + AS_IF([test "$systemdsystemunitdir" = ""], [ + PKG_CHECK_VAR([systemdsystemunitdir], [systemd], [systemdsystemunitdir]) + ]) + AC_MSG_RESULT([$systemdsystemunitdir]) + AS_IF([test "$systemdsystemunitdir" = ""], [ + AS_IF([test "$want_systemd" = "yes"], [ + AC_MSG_ERROR([Cannot determine where to put systemd files - Provide systemdsystemunitdir manually]) + ]) + dnl Cannot enable even unit file installation. + want_systemd=no + ]) + ]) + AC_SUBST(systemdsystemunitdir) + AC_SUBST(systemdservicetype) + AM_CONDITIONAL(WANT_SYSTEMD, [test "$want_systemd" != "no"]) +]) -- cgit v1.2.3