summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2025-03-13 21:06:01 +0100
committerUlrich Müller <ulm@gentoo.org>2025-03-14 08:01:47 +0100
commit5dc0981875b64f2ffe38e59871cc34db05ab5f18 (patch)
tree54f6f29322fb11dd2acf367125e6c200edec3864 /configure.ac
parentf2f1fb7fe00d6d69fc081f423c1f9dff0f618e36 (diff)
New configure option --with-systemduserunitdir
* configure.ac (systemduserunitdir): New variable and option. * Makefile.in (systemduserunitdir): New, set by configure. (install-etc, uninstall): Don't install emacs.service when systemduserunitdir is unspecified. * etc/NEWS: Announce the new configure option. (Bug#76924)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4a7f326ab2b..81a247a696c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -481,6 +481,24 @@ AC_SUBST([HAVE_PDUMPER])
DUMPING=$with_dumping
AC_SUBST([DUMPING])
+dnl Where the etc/emacs.service file is to be installed.
+dnl We use $(prefix)/lib/systemd/user as default, but this may not be
+dnl in systemd's search path when prefix is neither /usr nor /usr/local.
+dnl In that case (e.g. for non-root installs) the location can be
+dnl specified with the configure option.
+dnl See https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#id-1.8.5
+dnl for documentation of systemd's unit file load path.
+AC_ARG_WITH([systemduserunitdir],
+ [AS_HELP_STRING([--with-systemduserunitdir=DIR],
+ [directory for systemd user unit file;
+ default 'PREFIX/usr/lib/systemd/user'])],
+ [systemduserunitdir=${withval}],
+ [systemduserunitdir='${prefix}/lib/systemd/user'])
+if test "${systemduserunitdir}" = "no"; then
+ systemduserunitdir=''
+fi
+AC_SUBST([systemduserunitdir])
+
dnl FIXME currently it is not the last.
dnl This should be the last --with option, because --with-x is
dnl added later on when we find the file name of X, and it's best to