From ef881f318c6b51f3f04467db04413b8880a9900f Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 25 Sep 2026 10:07:39 +0100 Subject: [PATCH] Add --with-socket-path to configure. GitHub issue 5635 from Alexandre Fiori. --- Makefile.am | 3 +++ configure.ac | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/Makefile.am b/Makefile.am index 46ca73da7..349d6e224 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,9 @@ AM_CPPFLAGS += @XOPEN_DEFINES@ \ -DTMUX_LOCK_CMD='"@DEFAULT_LOCK_CMD@"' \ -DTMUX_TERM='"@DEFAULT_TERM@"' \ -DTMUX_MOUSE=1 +if HAVE_TMUX_SOCK +AM_CPPFLAGS += -DTMUX_SOCK='"@TMUX_SOCK@"' +endif # Additional object files. LDADD = $(LIBOBJS) diff --git a/configure.ac b/configure.ac index de61d7cf8..5da5f30af 100644 --- a/configure.ac +++ b/configure.ac @@ -111,6 +111,17 @@ case "x$DEFAULT_TERM" in ;; esac +# Allow the socket directory list to be set. It is a colon-separated list of +# directories, tried in order; a leading $ is an environment variable. +AC_ARG_WITH( + socket-path, + AS_HELP_STRING(--with-socket-path=PATHS, set socket directory list), + [TMUX_SOCK=`echo "$withval" | sed 's/[[$]]/$$/g'`], + [TMUX_SOCK=] +) +AM_CONDITIONAL(HAVE_TMUX_SOCK, [test "x$TMUX_SOCK" != x]) +AC_SUBST(TMUX_SOCK) + # Do we need fuzzers? AM_CONDITIONAL(NEED_FUZZING, test "x$enable_fuzzing" = xyes)