diff --git a/Makefile.am b/Makefile.am index c4646cce..f1528387 100644 --- a/Makefile.am +++ b/Makefile.am @@ -81,6 +81,18 @@ EXTRA_DIST += \ data/swupd-update.timer \ data/verifytime.service +DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdunitdir) + +systemdunitdir = @SYSTEMD_UNITDIR@ + +systemdunit_DATA = \ + data/check-update.service \ + data/check-update.timer \ + data/swupd-update.service \ + data/swupd-update.timer \ + data/verifytime.service + distclean-local: rm -rf aclocal.m4 ar-lib autom4te.cache config.guess config.h.in config.h.in~ config.sub configure depcomp install-sh ltmain.sh m4 Makefile.in missing compile diff --git a/configure.ac b/configure.ac index 4c77da66..396e5f71 100644 --- a/configure.ac +++ b/configure.ac @@ -240,6 +240,18 @@ AS_IF( AC_MSG_ERROR(['--with-formatid' has an invalid value ($with_formatid). Supported values are positive integers or "staging".])] ) +AC_ARG_WITH( + [systemdsystemunitdir], + [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [path to systemd system service dir @<:@default=/usr/lib/systemd/system@:>@])], + [unitpath=${withval}], + [unitpath="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"] +) +AS_IF( + [test -z "${unitpath}"], + [unitpath=/usr/lib/systemd/system] +) +AC_SUBST(SYSTEMD_UNITDIR, [${unitpath}]) + AC_ARG_WITH( [pre-update], [AS_HELP_STRING([--with-pre-update=EXE], [Path to the pre-update executable])],