Make selection of installation contexts configurable for software build components
Some software components need to be installed. Selected storage locations (like system header and library directories) can need corresponding write permissions which are “occasionally” not granted. Thus alternative storage locations will be chosen then on demand.
The tool “pkgconf” is used here for management of some build parameters. But such a tool is also limited to information which is available at build time.
One approach for the selection of a different installation directory is to use the environment variable “DESTDIR”. The chosen path is prepended then for involved files at installation time. References to previously recorded data are preserved unmodified.
I suggest to manage additional “installation prefixes” by corresponding build variables so that references to installed files (in customised directories) will be appropriately resolved.