Add support for systemd socket activation (where systemd creates the Unix

domain socket for tmux rather than tmux creating it). Build with
--enable-systemd. From Julien Moutinho in GitHub issue 3119.
This commit is contained in:
Nicholas Marriott
2022-03-28 08:42:13 +01:00
parent d26a4ea463
commit fc7f1e7acb
6 changed files with 99 additions and 1 deletions

View File

@ -390,6 +390,31 @@ if test "x$enable_utf8proc" = xyes; then
fi
AM_CONDITIONAL(HAVE_UTF8PROC, [test "x$enable_utf8proc" = xyes])
# Check for systemd support.
AC_ARG_ENABLE(
systemd,
AS_HELP_STRING(--enable-systemd, enable systemd integration)
)
if test x"$enable_systemd" = xyes; then
PKG_CHECK_MODULES(
SYSTEMD,
libsystemd,
[
AM_CPPFLAGS="$SYSTEMD_CFLAGS $AM_CPPFLAGS"
CPPFLAGS="$AM_CPPFLAGS $SAVED_CPPFLAGS"
LIBS="$SYSTEMD_LIBS $LIBS"
found_systemd=yes
],
found_systemd=no
)
if test "x$found_systemd" = xyes; then
AC_DEFINE(HAVE_SYSTEMD)
else
AC_MSG_ERROR("systemd not found")
fi
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$found_systemd" = xyes])
# Check for b64_ntop. If we have b64_ntop, we assume b64_pton as well.
AC_MSG_CHECKING(for b64_ntop)
AC_LINK_IFELSE([AC_LANG_PROGRAM(