From 79437b1ba9a65aedfea13e82e372ebebef34b626 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 13 Oct 2019 10:22:43 +0200 Subject: [PATCH] configure: Make runtimedir configurable On modern systems we should use /run/plymouth to store things like the pid file, instead of /var/run/plymouth, make the runtime dir configurable with --with-runtimedir. This keeps the old default behavior of using /var/run/plymouth, users can pass --with-runtimedir=/run to use /run/plymouth instead. Fixes: #75 Signed-off-by: Hans de Goede --- configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index bdb50efe..ada2e4d7 100644 --- a/configure.ac +++ b/configure.ac @@ -143,17 +143,25 @@ if test x$enable_systemd_integration = xyes; then AC_SUBST(SYSTEMD_UNIT_DIR) fi +AC_ARG_WITH([runtimedir], + AC_HELP_STRING([--with-runtimedir=DIR], [runtime data dir [LOCALSTATEDIR/run]]), + [plymouthruntimedir=${withval}/plymouth], [plymouthruntimedir=""]) + AC_ARG_WITH(system-root-install, AS_HELP_STRING([--with-system-root-install],[Install client in /bin and daemon in /sbin]),with_system_root_install=${withval},with_system_root_install=no) AM_CONDITIONAL(WITH_SYSTEM_ROOT_INSTALL, [test "$with_system_root_install" = yes]) if test x$with_system_root_install = xyes; then plymouthclientdir=/bin plymouthdaemondir=/sbin - plymouthruntimedir=/run/plymouth + if (test -z "${plymouthruntimedir}"); then + plymouthruntimedir=/run/plymouth + fi else plymouthclientdir=$bindir plymouthdaemondir=$sbindir - plymouthruntimedir=$localstatedir/run/plymouth + if (test -z "${plymouthruntimedir}"); then + plymouthruntimedir=$localstatedir/run/plymouth + fi fi AC_SUBST(plymouthclientdir) AC_SUBST(plymouthdaemondir) -- 2.47.3