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/lib64/pkgconfig:/tools/share/pkgconfig

The meaning of the new configure option:

--host=${CLFS_TARGET}

This option makes sure the installation includes the proper {$CLFS_TARGET}-pkg-config to be detected and used when cross-compiling some tools in the temporary system and boot chapter.

--with-pc-path

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

Compile the package:

make

Install the package:

make install

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