diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-03-28 08:42:13 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-03-28 08:42:13 +0100 |
commit | fc7f1e7acb3539a43df46136e971f770515e0b0d (patch) | |
tree | ffe4d697936e4149d955bbfdf3805a9258804dda /configure.ac | |
parent | d26a4ea463b96923bd93d95817f0fe78550c06ca (diff) | |
download | rtmux-fc7f1e7acb3539a43df46136e971f770515e0b0d.tar.gz rtmux-fc7f1e7acb3539a43df46136e971f770515e0b0d.tar.bz2 rtmux-fc7f1e7acb3539a43df46136e971f770515e0b0d.zip |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e473f141..276f71c8 100644 --- a/configure.ac +++ b/configure.ac @@ -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( |