From 72082a4d17f08d3166ad45e7c353b567bc3bd114 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 6 Aug 2024 23:39:46 -0700 Subject: [PATCH] cli: add PKG_CONFIG_RELOCATE_PATHS environmental variable This is the inverse of PKG_CONFIG_DONT_RELOCATE_PATHS=1. Closes github issue #253. --- cli/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/main.c b/cli/main.c index bbbc2ac..cf75bfa 100644 --- a/cli/main.c +++ b/cli/main.c @@ -1282,7 +1282,7 @@ main(int argc, char *argv[]) /* On Windows we want to always redefine the prefix by default * but allow that behavior to be manually disabled */ #if !defined(_WIN32) && !defined(_WIN64) - if ((want_flags & PKG_DEFINE_PREFIX) == PKG_DEFINE_PREFIX) + if ((want_flags & PKG_DEFINE_PREFIX) == PKG_DEFINE_PREFIX || getenv("PKG_CONFIG_RELOCATE_PATHS") != NULL) #endif want_client_flags |= PKGCONF_PKG_PKGF_REDEFINE_PREFIX;