cli: add PKG_CONFIG_RELOCATE_PATHS environmental variable

This is the inverse of PKG_CONFIG_DONT_RELOCATE_PATHS=1.

Closes github issue #253.
master
Ariadne Conill 2024-08-06 23:39:46 -07:00
parent 874d559e42
commit 72082a4d17
1 changed files with 1 additions and 1 deletions

View File

@ -1282,7 +1282,7 @@ main(int argc, char *argv[])
/* On Windows we want to always redefine the prefix by default /* On Windows we want to always redefine the prefix by default
* but allow that behavior to be manually disabled */ * but allow that behavior to be manually disabled */
#if !defined(_WIN32) && !defined(_WIN64) #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 #endif
want_client_flags |= PKGCONF_PKG_PKGF_REDEFINE_PREFIX; want_client_flags |= PKGCONF_PKG_PKGF_REDEFINE_PREFIX;