On Wed, Aug 27, 2025 at 02:43:07PM +0200, Jan Engelhardt wrote: > `make distcheck` has an expectation that, if only --prefix is > specified, all other potentially-configurable paths are somehow > relative to '${prefix}', e.g. bindir defaults to '${prefix}/bin'. > > We get an absolute path from $(pkg-config systemd ...) at all times > in case systemd.pc is present, and an empty path in case it is not, > which collides with the aforementioned expectation two ways. Add an > internal --with-dcprefix configure option for the sake of distcheck. Subtle internal detail is exposed: nft configuration: cli support: editline enable debugging symbols: yes use mini-gmp: no enable man page: yes libxtables support: no json output support: no systemd unit: ${dcprefix}/lib/systemd/system ^---------^ When running ./configure on the extracted tarball file. I modified your patch to expose the systemd unit: file to provide a hint that service file is being installed. Any suggestion to refine this? > --- > Makefile.am | 1 + > configure.ac | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/Makefile.am b/Makefile.am > index e292d3b9..52a3e6c4 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -23,6 +23,7 @@ libnftables_LIBVERSION = 2:0:1 > ############################################################################### > > ACLOCAL_AMFLAGS = -I m4 > +AM_DISTCHECK_CONFIGURE_FLAGS = --with-dcprefix='$${prefix}' > > EXTRA_DIST = > BUILT_SOURCES = > diff --git a/configure.ac b/configure.ac > index 626c641b..198b3be8 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -122,6 +122,11 @@ AC_ARG_WITH([unitdir], > AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system']) > ]) > AC_SUBST([unitdir]) > +AC_ARG_WITH([dcprefix], > + [AS_HELP_STRING([Extra path inserted for distcheck])], > + [dcprefix="$withval"]) > +AC_SUBST([dcprefix]) > +AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system'], [unitdir='${dcprefix}'"$unitdir"]) > > > AC_CONFIG_FILES([ \ > -- > 2.51.0 >