5.6. Pkg-config-lite-0.28-1

Pkg-config-lite is a tool to help you insert the correct compiler options on the command line when compiling applications and libraries.

5.6.1. Installation of Pkg-config-lite

Several packages in the temporary system will use pkg-config to find various required and optional dependencies. Unfortunately, this could result in those packages finding libraries on the host system and trying to link against them, which will not work. To avoid this problem, we will install a pkg-config binary in /cross-tools and configure it so that it will look for Pkg-config files only in /tools.

Prepare Pkg-config-lite for compilation:

./configure --prefix=/cross-tools --host=${CLFS_TARGET}\
    --with-pc-path=/tools/lib/pkgconfig:/tools/share/pkgconfig

The meaning of the new configure option:

--host=${CLFS_TARGET}

Several packages that we will cross-compile later will try to search for ${CLFS_TARGET}-pkg-config. Setting this option ensures that Pkg-config-lite will create a hard link in /cross-tools/bin with this name, so that it will be used instead of any similarly-named program that might exist on the host.

--with-pc-path

This sets the default PKG_CONFIG_PATH to /tools/lib/pkgconfig and /tools/share/pkgconfig.

Compile the package:

make

Install the package:

make install

Details on this package are located in Section 10.23.2, “Contents of Pkg-config-lite.”