编辑器加载中...man pkg-config
NAME
pkg-config - Return metainformation about installed libraries
SYNOPSIS
pkg-config [--modversion] [--help] [--print-errors] [--silence-errors]
[--cflags] [--libs] [--libs-only-L] [--libs-only-l] [--cflags-only-I]
[--variable=VARIABLENAME] [--define-variable=VARIABLENAME=VARIABLE-
VALUE] [--uninstalled] [--exists] [--atleast-version=VERSION] [--exact-
version=VERSION] [--max-version=VERSION] [LIBRARIES...]
DESCRIPTION
The pkg-config program is used to retrieve information about installed
libraries in the system. It is typically used to compile and link
against one or more libraries. Here is a typical usage scenario in a
Makefile:
program: program.c
cc program.c `pkg-config --cflags --libs gnomeui`
pkg-config retrieves information about packages from special metadata
files. These files are named after the package, with the extension .pc.
By default, pkg-config looks in the directory prefix/lib/pkgconfig for
these files; it will also look in the colon-separated (on Windows,
semicolon-separated) list of directories specified by the PKG_CON-
FIG_PATH environment variable.
The package name specified on the pkg-config command line is defined to
be the name of the metadata file, minus the .pc extension. If a library
can install multiple versions simultaneously, it must give each version
its own name (for example, GTK 1.2 might have the package name "gtk+"
while GTK 2.0 has "gtk+-2.0").
OPTIONS
The following options are supported:
--modversion
Requests that the version information of the libraries specified
on the command line be displayed. If pkg-config can find all
the libraries on the command line, each library's version string
is printed to stdout, one version per line. In this case pkg-
config exits successfully. If one or more libraries is unknown,
pkg-config exits with a nonzero code, and the contents of stdout