Hi!
Admittedly, what prompts this report is arguably a bug in
a package: It passes _all_ the configure flags to
AM_DISTCHECK_CONFIGURE_FLAGS. Not a bright idea I guess,
but simple.
Unfortunately distcheck reads:
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
…
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
So the "local" flags, --srcdir and especially --prefix, are
provided by distcheck, and then overridden by the user's
DISTCHECK_CONFIGURE_FLAGS. Since I use --prefix, boom.
Very much agreed, --prefix should not have made it into
(AM_)DISTCHECK_CONFIGURE_FLAGS; however it seems simple to
just pass --srcdir and --prefix last to be protected against
such cases.
Thanks!