Pkg-config is a library management system that works with automake and autoconf, helping to manage compile/link flags.
pkg-config is a language-agnostic, free software that serves as a helper tool when compiling programs. It automatically inserts the correct compiler options on the command line so that your application can use the necessary libraries without any issues – for instance, instead of manually specifying where to find the glib library, you can use the following command: gcc -o test test.c `pkg-config --libs --cflags glib-2.0`.
In addition to being extremely useful, pkg-config is also platform-independent, meaning it works on a variety of operating systems. Whether you're running Linux, UNIX-like systems, Mac OS X or Windows, you won't have any issues using pkg-config. Furthermore, the tool doesn't require anything but a reasonably well-working C compiler and a C library. If you do have glib installed, you can use it with pkg-config.
One thing worth mentioning is that pkg-config was initially written in shell by James Henstridge, but it was later rewritten in C by Havoc Pennington. As time passed, the tool evolved, and an autoconf macro was added, first by Tim Janik and then rewritten by Scott James Remnant.
The latest release of pkg-config includes several improvements, including fixing segfaults and Windows bugs. Also, a new option called "--short-errors" was added, which gives better error messages if some libraries can't be found. All in all, pkg-config is an excellent tool for any developer looking to simplify the process of compiling applications and libraries.
Version 0.20: N/A