gh-119696: Support relative pkg-config prefixes behind --enable-relocatable flag (#162185)
`make install` writes `python-3.X.pc` and `python-3.X-embed.pc` with an absolute `prefix=`, so they are wrong once the installation is relocated. Using `prefix=${pcfiledir}/../..` fixes that, but it isn't a viable default: pkg-config doesn't treat the resulting paths as system directories when the installation is under `/usr` (python/prebuilt-cpython#45). So this also introduces an `--enable-relocatable` configure option as an opt-in mechanism for this and future build-time tweaks that are needed to support relocatability but shouldn't be made the default.
Since relocatability is work-in-progress, and specifying the option doesn't yet produce a fully functional relocatable build, it is left out of the configure options docs and What's New for now.
Co-authored-by: Zanie Blue <contact@zanie.dev>
5 files changed