Introduction to pkg-config

The pkg-config package contains a tool for passing the include path and/or library paths to build tools during the configure and make file execution.

This package is known to build and work properly using an LFS-7.4 platform.



Pkg-config is part of LFS, but was omitted from the 7.0 and 7.1 releases. If you are using a system which includes it, there is nothing more to do. If not, you should follow these instructions.

Package Information

User Notes:

Installation of pkg-config

Install pkg-config by running the following commands:

./configure --prefix=/usr        \
            --with-internal-glib \
            --disable-host-tool  \
            --docdir=/usr/share/doc/pkg-config-0.28 &&

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--with-internal-glib: This switch causes the package to use the shipped version of GLib2.

--disable-host-tool: This switch disables creation of the unnecessary symlink.

Configuring pkg-config

The default setting for PKG_CONFIG_PATH is /usr/lib/pkgconfig:/usr/share/pkgconfig because of the prefix used to install pkg-config. You may add to PKG_CONFIG_PATH by exporting additional paths on your system where .pc files are installed. Note that PKG_CONFIG_PATH is only needed when compiling packages, not during run-time.


Installed Program: pkg-config
Installed Libraries: None
Installed Directories: None

Short Descriptions


returns meta information for the specified library or package.

Last updated on 2013-09-03 12:08:19 -0700