From d8d756e3067942fb7ab46589b2277b568068b222 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 9 Nov 2018 16:48:40 +0100 Subject: [PATCH] Fix make distcheck if systemd is installed The automatically determined path for systemd units is an absolute system path that doesn't respect $(prefix). That's a problem for make distcheck, which is usually ran as regular user and it's not expected to have any impact on the system (it does a local install in a subdir). To avoid these issues we override the configure flags used by make distcheck and set the path to one relative to the specified prefix. --- Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.am b/Makefile.am index 54b8220502..958edc6fe2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,6 +24,11 @@ config_includedir = $(ipseclibdir)/include nodist_config_include_HEADERS = config.h endif +# we can't (and shouldn't) install/uninstall system files during make distcheck, +# so override the autodetected path for systemd units +AM_DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir='$$(prefix)/lib/systemd/system' + # we leave config files behind intentionally so prevent distcheck from complaining distuninstallcheck_listfiles = find . -type f \! -name '*.conf' \! -name '*.secrets' -print -- 2.39.2