When building nftables git HEAD, I use a script which also builds libmnl and libnftnl in their respective repositories and populates PKG_CONFIG_PATH variable so nftables is linked against them instead of host libraries. This is mandatory as host-installed libraries are chronically outdated and linking against them would fail. Pass this variable to build test suite as well as the VPATH build performed by distcheck target based on the presumption that if a custom PKG_CONFIG_PATH was needed for the main build, these derived builds will need it as well. Signed-off-by: Phil Sutter --- Changes since v1: - Cover for distcheck as well - Adjust patch description accordingly --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index c60c2e63d5aff..828146bc4fb1a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,8 @@ libnftables_LIBVERSION = 2:0:1 ############################################################################### ACLOCAL_AMFLAGS = -I m4 -AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) EXTRA_DIST = BUILT_SOURCES = @@ -446,6 +447,7 @@ tools/nftables.service: tools/nftables.service.in ${top_builddir}/config.status endif if !BUILD_DISTCHECK +AM_TESTS_ENVIRONMENT = PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) TESTS = tests/build/run-tests.sh \ tests/json_echo/run-test.py \ tests/monitor/run-tests.sh \ -- 2.51.0