The pkgconf package is a successor to pkg-config and contains a tool for passing the include path and/or library paths to build tools during the configure and make phases of package installations.
Prepare Pkgconf for compilation:
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/pkgconf-2.5.1
Compile the package:
make
Install the package:
make install
To maintain compatibility with the original Pkg-config create two symlinks:
ln -sv pkgconf /usr/bin/pkg-config ln -sv pkgconf.1 /usr/share/man/man1/pkg-config.1
When targetting the x32-bit architecture on 64-bit, some packages will use Pkg-config in a way that will pull in libraries that have only been built for 64-bit. This spirals into linker or other errors. This can be fixed by creating Pkg-config personalities which can then be used to override default Pkg-config behavior. Create them now:
ln -sv pkgconf /usr/bin/x86_64-pc-linux-gnux32-pkg-config ln -sv pkgconf /usr/bin/x86_64-pc-linux-gnu-pkg-config mkdir -pv /usr/share/pkgconfig/personality.d cat > /usr/share/pkgconfig/personality.d/x86_64-pc-linux-gnux32.personality << EOFTriplet: x86_64-pc-linux-gnux32 SysrootDir: / DefaultSearchPaths: /usr/libx32/pkgconfig:/usr/share/pkgconfig SystemIncludePaths: /usr/include SystemLibraryPaths: /usr/libx32EOF cat > /usr/share/pkgconfig/personality.d/x86_64-pc-linux-gnu.personality << EOFTriplet: x86_64-pc-linux-gnu SysrootDir: / DefaultSearchPaths: /usr/lib/pkgconfig:/usr/share/pkgconfig SystemIncludePaths: /usr/include SystemLibraryPaths: /usr/libEOF