pkg-config

from Wikipedia, the free encyclopedia
pkg-config
Basic data

Current  version 0.29.2
(March 20, 2017)
operating system unixoid system
programming language C.
category Programming tool
License GPL
pkg-config.freedesktop.org

pkg-config (from English package , " package " and config , " configuration ") is a computer program that provides a uniform interface for querying metadata via any software . pkg-config is primarily used for version management of installed program libraries and provides information about, for example

The information resulting from the query can be used, for example, to translate (compile) executable programs from source text . pkg-config was originally developed for Unix , but is now also available for other operating systems such as Microsoft Windows .

History and meaning

In June 2000, the Gnome developer James Henstridge published the predecessor gnome-config in the form of a shell script that could only be expanded to a limited extent with hard-coded values ​​and could only be used by Gnome itself. One month later, Havoc Pennington translated pkg-config into the C programming language , and the changeover was completed in October 2000. Since June 2002 the GNOME project has only used pkg-config. Since December 2005 the X.Org project has also been completely converted to the use of pkg-config.

pkg-config has developed from Gnome through various individual libraries up to X.Org to a quasi- standard and is used by many software projects under different operating systems. Well-known projects such as Mozilla Firefox use it on the one hand to query metadata from previously installed libraries and on the other hand to provide metadata about their own libraries. pkg-config is intended to replace package-specific configuration scripts.

Working method

During the installation of a program library (for example via RPM or dpkg ) a file with the extension .pc is stored in a distribution- dependent directory that is made known via the environment variable PKG_CONFIG_PATH . In it you will find the version number, the file system paths to the corresponding head (fachsprachlich header - ) and library files (fachsprachlich Library ), compiler and linker switches and other packet information. This information is used to compile the programs that use these libraries.

Web links