2022-08-21 15:53:39 +00:00
|
|
|
|
PKGCONF(1)
|
|
|
|
|
|
|
|
|
|
; SPDX-FileCopyrightText: 2022 pkgconf authors
|
|
|
|
|
; SPDX-License-Identifier: ISC
|
|
|
|
|
|
|
|
|
|
# NAME
|
|
|
|
|
|
2022-08-21 20:18:58 +00:00
|
|
|
|
pkgconf — a system for configuring build dependency information
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
|
|
*pkgconf* [_options_] [_list of modules_]
|
|
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
|
|
*pkgconf* is a program which helps to configure compiler and linker flags for
|
|
|
|
|
development libraries. This allows build systems to detect other dependencies
|
|
|
|
|
and use them with the system toolchain.
|
|
|
|
|
|
|
|
|
|
# GENERAL OPTIONS
|
|
|
|
|
|
|
|
|
|
*--atleast-pkgconfig-version*=_VERSION_
|
|
|
|
|
Exit with error if we do not support the requested pkg-config version.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--define-prefix*
|
|
|
|
|
Attempts to determine the prefix variable to use for CFLAGS and LIBS entry
|
|
|
|
|
relocations. This is mainly useful for platforms where framework SDKs are
|
|
|
|
|
relocatable, such as Windows.
|
|
|
|
|
|
|
|
|
|
*--dont-define-prefix*
|
|
|
|
|
Disables the ‘define-prefix’ feature.
|
|
|
|
|
|
|
|
|
|
*--dont-relocate-paths*
|
|
|
|
|
Disables the path relocation feature.
|
|
|
|
|
|
|
|
|
|
*--env-only*
|
|
|
|
|
Learn about pkgconf's configuration strictly from environmental variables.
|
|
|
|
|
|
2022-08-21 15:53:39 +00:00
|
|
|
|
*--errors-to-stdout*
|
|
|
|
|
Print all errors on the main output stream instead of the error output
|
|
|
|
|
stream.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--ignore-conflicts*
|
|
|
|
|
Ignore ‘Conflicts’ rules in modules.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
*--list-all*
|
|
|
|
|
Walk all directories listed in the _PKG_CONFIG_PATH_ environmental variable
|
|
|
|
|
and display information on packages which have registered information there.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--maximum-traverse-depth*=_DEPTH_
|
|
|
|
|
Impose a limit on the allowed depth in the dependency graph. For example,
|
|
|
|
|
a depth of 2 will restrict the resolver from acting on child dependencies
|
|
|
|
|
of modules added to the resolver's solution.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
*--no-cache*
|
|
|
|
|
Skip caching packages when they are loaded into the internal resolver.
|
|
|
|
|
This may result in an alternate dependency graph being computed.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--no-provides*
|
|
|
|
|
Ignore ‘Provides’ rules in modules when resolving dependencies.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--prefix-variable*=_VARIABLE_
|
|
|
|
|
Sets the ‘prefix’ variable used by the ‘define-prefix’ feature.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--pure*
|
|
|
|
|
Treats the computed dependency graph as if it were pure. This is mainly
|
|
|
|
|
intended for use with the *--static* flag.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--relocate*=_PATH_
|
|
|
|
|
Relocates a path using the pkgconf_path_relocate API. This is mainly used
|
|
|
|
|
by the testsuite to provide a guaranteed interface to the system's path
|
|
|
|
|
relocation backend.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
*--shared*
|
|
|
|
|
Compute a simple dependency graph that is only suitable for shared linking.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--silence-errors*
|
|
|
|
|
Do not display any errors at all.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--simulate*
|
|
|
|
|
Simulates resolving a dependency graph based on the requested modules on
|
|
|
|
|
the command line. Dumps a series of trees denoting pkgconf's resolver state.
|
|
|
|
|
|
|
|
|
|
*--static*
|
|
|
|
|
Compute a deeper dependency graph and use compiler/linker flags intended
|
|
|
|
|
for static linking.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
*--with-path*=_PATH_
|
|
|
|
|
Adds a new module search path to pkgconf's dependency resolver. Paths added
|
|
|
|
|
in this way are given preference before other paths.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--validate* _package ..._
|
|
|
|
|
Validate specific ‘.pc’ files for correctness.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--version*
|
|
|
|
|
Display the supported pkg-config version and exit.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
# MODULE-SPECIFIC OPTIONS
|
|
|
|
|
|
|
|
|
|
*--atleast-version*=_VERSION_
|
|
|
|
|
Exit with error if a module's version is less than the specified version.
|
|
|
|
|
|
|
|
|
|
*--exact-version*=_VERSION_
|
|
|
|
|
Exit with error if a module's version is not exactly the specified version.
|
|
|
|
|
|
|
|
|
|
*--exists*
|
|
|
|
|
Exit with a non-zero result if the dependency resolver was unable to find
|
|
|
|
|
all of the requested modules.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--max-version*=_VERSION_
|
|
|
|
|
Exit with error if a module's version is greater than the specified
|
|
|
|
|
version.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
*--no-uninstalled*
|
|
|
|
|
Forbids the dependency resolver from considering 'uninstalled' modules as
|
|
|
|
|
part of a solution.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--uninstalled*
|
|
|
|
|
Exit with a non-zero result if the dependency resolver uses an
|
|
|
|
|
‘uninstalled’ module as part of its solution.
|
|
|
|
|
|
2022-08-21 15:53:39 +00:00
|
|
|
|
# QUERY-SPECIFIC OPTIONS
|
|
|
|
|
|
|
|
|
|
*--cflags*, *--cflags-only-I*, *--cflags-only-other*
|
|
|
|
|
Display either all CFLAGS, only *-I* CFLAGS or only CFLAGS that are not
|
|
|
|
|
*-I*.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--define-variable*=_VARNAME_=_VALUE_
|
|
|
|
|
Define _VARNAME_ as _VALUE_. Variables are used in query output, and some
|
|
|
|
|
modules' results may change based on the presence of a variable definition.
|
|
|
|
|
|
|
|
|
|
*--digraph*
|
|
|
|
|
Dump the dependency resolver's solution as a graphviz ‘dot’ file. This can
|
|
|
|
|
be used with graphviz to visualize module interdependencies.
|
|
|
|
|
|
|
|
|
|
*--env*=_VARNAME_
|
|
|
|
|
Print the requested values as variable declarations in a similar format as
|
|
|
|
|
the *env*(1) command.
|
|
|
|
|
|
|
|
|
|
*--fragment-filter*=_TYPES_
|
|
|
|
|
Filter the fragment lists for the specified types.
|
|
|
|
|
|
2022-08-21 15:53:39 +00:00
|
|
|
|
*--libs*, *--libs-only-L*, *--libs-only-l*, *--libs-only-other*
|
|
|
|
|
Display either all linker flags, only *-L* linker flags, only *-l* linker
|
|
|
|
|
flags or only linker flags that are not *-L* or *-l*.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--modversion*
|
|
|
|
|
Print the version of the queried module.
|
|
|
|
|
|
2022-08-21 15:53:39 +00:00
|
|
|
|
*--keep-system-cflags*, *--keep-system-libs*
|
|
|
|
|
Keep CFLAGS or linker flag fragments that would be filtered due to being
|
|
|
|
|
included by default in the compiler.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--path*
|
|
|
|
|
Display the filenames of the ‘.pc’ files used by the dependency resolver for
|
|
|
|
|
a given dependency set.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
*--print-provides*
|
|
|
|
|
Print all relevant ‘Provides’ entries for a module to the output channel.
|
|
|
|
|
|
|
|
|
|
*--print-requires*, *--print-requires-private*
|
|
|
|
|
Print the modules included in either the Requires field or the
|
|
|
|
|
Requires.private field.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--print-variables*
|
|
|
|
|
Print all seen variables for a module to the output channel.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
*--variable*=_VARNAME_
|
|
|
|
|
Print the value of _VARNAME_.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
# ENVIRONMENT
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_DESTDIR_
|
|
|
|
|
If set to _PKG_CONFIG_SYSROOT_DIR_, assume that
|
|
|
|
|
_PKG_CONFIG_FDO_SYSROOT_RULES_ is set.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_PKG_CONFIG_DEBUG_SPEW_
|
|
|
|
|
If set, enables additional debug logging. The format of the debug log
|
|
|
|
|
messages is implementation-specific.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_PKG_CONFIG_DISABLE_UNINSTALLED_
|
|
|
|
|
If set, enables the same behaviour as the *--no-uninstalled* flag.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_PKG_CONFIG_DONT_RELOCATE_PATHS_
|
|
|
|
|
If set, disables the path relocation feature.
|
|
|
|
|
|
|
|
|
|
_PKG_CONFIG_FDO_SYSROOT_RULES_
|
|
|
|
|
If set, follow the sysroot prefixing rules that freedesktop.org pkg-config
|
|
|
|
|
uses.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
_PKG_CONFIG_LIBDIR_
|
|
|
|
|
List of primary directories where ‘.pc’ files are looked up.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_PKG_CONFIG_LOG_
|
|
|
|
|
‘logfile’ which is used for dumping audit information concerning installed
|
|
|
|
|
module versions.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_PKG_CONFIG_MSVC_SYNTAX_
|
|
|
|
|
If set, uses MSVC syntax for fragments.
|
|
|
|
|
|
|
|
|
|
_PKG_CONFIG_PATH_
|
|
|
|
|
List of secondary directories where ‘.pc’ files are looked up.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
_PKG_CONFIG_PURE_DEPGRAPH_
|
|
|
|
|
If set, enables the same behaviour as the *--pure* flag.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_PKG_CONFIG_SYSROOT_DIR_
|
|
|
|
|
‘sysroot’ directory, will be prepended to every path defined in
|
|
|
|
|
PKG_CONFIG_PATH. Useful for cross compilation.
|
|
|
|
|
|
2022-08-21 15:53:39 +00:00
|
|
|
|
_PKG_CONFIG_SYSTEM_INCLUDE_PATH_
|
|
|
|
|
List of paths that are considered system include paths by the toolchain.
|
|
|
|
|
This is a pkgconf-specific extension.
|
|
|
|
|
|
|
|
|
|
_PKG_CONFIG_SYSTEM_LIBRARY_PATH_
|
|
|
|
|
List of paths that are considered system library paths by the toolchain.
|
|
|
|
|
This is a pkgconf-specific extension.
|
|
|
|
|
|
2022-08-21 15:59:36 +00:00
|
|
|
|
_PKG_CONFIG_TOP_BUILD_DIR_
|
|
|
|
|
Provides an alternative setting for the ‘pc_top_builddir’ global variable.
|
2022-08-21 15:53:39 +00:00
|
|
|
|
|
|
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
|
|
Displaying the CFLAGS of a package:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ pkgconf --cflags foo
|
|
|
|
|
-fPIC -I/usr/include/foo
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
|
|
*pc*(5), *pkg.m4*(7)
|