build: Use variables in pc files
Recently, we started prefixing the values of all variables defined in pc files with prefix
meson variable. While this works even when datadir
option is absolute (supported by some meson forks), it leads to inflexible pc files even when prefixing is not strictly necessary.
In this commit, we are constructing variables for pkg-config files separately from paths used for installation, obtaining nice .pc files in the common case, while still supporting unusual platforms like Nix.