1PKGCONF(1)                BSD General Commands Manual               PKGCONF(1)
2

NAME

4     pkgconf — a system for configuring build dependency information
5

SYNOPSIS

7     pkgconf [options] [list of modules]
8

DESCRIPTION

10     pkgconf is a program which helps to configure compiler and linker flags
11     for development libraries.  This allows build systems to detect other
12     dependencies and use them with the system toolchain.
13

GENERAL OPTIONS

15     --version
16             Display the supported pkg-config version and exit.
17
18     --atleast-pkgconfig-version=VERSION
19             Exit with error if we do not support the requested pkg-config
20             version.
21
22     --errors-to-stdout
23             Print all errors on the main output stream instead of the error
24             output stream.
25
26     --silence-errors
27             Do not display any errors at all.
28
29     --list-all
30             Walk all directories listed in the PKG_CONFIG_PATH environmental
31             variable and display information on packages which have regis‐
32             tered information there.
33
34     --simulate
35             Simulates resolving a dependency graph based on the requested
36             modules on the command line.  Dumps a series of trees denoting
37             pkgconf's resolver state.
38
39     --no-cache
40             Skip caching packages when they are loaded into the internal
41             resolver.  This may result in an alternate dependency graph being
42             computed.
43
44     --ignore-conflicts
45             Ignore ‘Conflicts’ rules in modules.
46
47     --env-only
48             Learn about pkgconf's configuration strictly from environmental
49             variables.
50
51     --maximum-traverse-depth=DEPTH
52             Impose a limit on the allowed depth in the dependency graph.  For
53             example, a depth of 2 will restrict the resolver from acting on
54             child dependencies of modules added to the resolver's solution.
55
56     --static
57             Compute a deeper dependency graph and use compiler/linker flags
58             intended for static linking.
59
60     --shared
61             Compute a simple dependency graph that is only suitable for
62             shared linking.
63
64     --pure  Treats the computed dependency graph as if it were pure.  This is
65             mainly intended for use with the --static flag.
66
67     --no-provides
68             Ignore ‘Provides’ rules in modules when resolving dependencies.
69
70     --with-path=PATH
71             Adds a new module search path to pkgconf's dependency resolver.
72             Paths added in this way are given preference before other paths.
73
74     --define-prefix
75             Attempts to determine the prefix variable to use for CFLAGS and
76             LIBS entry relocations.  This is mainly useful for platforms
77             where framework SDKs are relocatable, such as Windows.
78
79     --dont-define-prefix
80             Disables the ‘define-prefix’ feature.
81
82     --prefix-variable=VARIABLE
83             Sets the ‘prefix’ variable used by the ‘define-prefix’ feature.
84
85     --relocate=PATH
86             Relocates a path using the pkgconf_path_relocate API.  This is
87             mainly used by the testsuite to provide a guaranteed interface to
88             the system's path relocation backend.
89
90     --dont-relocate-paths
91             Disables the path relocation feature.
92

MODULE-SPECIFIC OPTIONS

94     --atleast-version=VERSION
95             Exit with error if a module's version is less than the specified
96             version.
97
98     --exact-version=VERSION
99             Exit with error if a module's version is not exactly the speci‐
100             fied version.
101
102     --max-version=VERSION
103             Exit with error if a module's version is greater than the speci‐
104             fied version.
105
106     --exists
107             Exit with a non-zero result if the dependency resolver was unable
108             to find all of the requested modules.
109
110     --uninstalled
111             Exit with a non-zero result if the dependency resolver uses an
112             ‘uninstalled’ module as part of it's solution.
113
114     --no-uninstalled
115             Forbids the dependency resolver from considering 'uninstalled'
116             modules as part of a solution.
117

QUERY-SPECIFIC OPTIONS

119     --cflags, --cflags-only-I, --cflags-only-other
120             Display either all CFLAGS, only -I CFLAGS or only CFLAGS that are
121             not -I.
122
123     --libs, --libs-only-L, --libs-only-l, --libs-only-other
124             Display either all linker flags, only -L linker flags, only -l
125             linker flags or only linker flags that are not -L or -l.
126
127     --keep-system-cflags, --keep-system-libs
128             Keep CFLAGS or linker flag fragments that would be filtered due
129             to being included by default in the compiler.
130
131     --define-variable=VARNAME=VALUE
132             Define VARNAME as VALUE.  Variables are used in query output, and
133             some modules' results may change based on the presence of a vari‐
134             able definition.
135
136     --print-variables
137             Print all seen variables for a module to the output channel.
138
139     --print-provides
140             Print all relevant ‘Provides’ entries for a module to the output
141             channel.
142
143     --variable=VARNAME
144             Print the value of VARNAME.
145
146     --print-requires, --print-requires-private
147             Print the modules included in either the Requires field or the
148             Requires.private field.
149
150     --digraph
151             Dump the dependency resolver's solution as a graphviz ‘dot’ file.
152             This can be used with graphviz to visualize module interdependen‐
153             cies.
154
155     --path  Display the filenames of the ‘.pc’ files used by the dependency
156             resolver for a given dependency set.
157
158     --env=VARNAME
159             Print the requested values as variable declarations in a similar
160             format as the env(1) command.
161
162     --fragment-filter=TYPES
163             Filter the fragment lists for the specified types.
164
165     --modversion
166             Print the version of the queried module.
167

ENVIRONMENT

169     PKG_CONFIG_PATH
170             List of secondary directories where ‘.pc’ files are looked up.
171
172     PKG_CONFIG_LIBDIR
173             List of primary directories where ‘.pc’ files are looked up.
174
175     PKG_CONFIG_SYSROOT_DIR
176             ‘sysroot’ directory, will be prepended to every path defined in
177             PKG_CONFIG_PATH.  Useful for cross compilation.
178
179     PKG_CONFIG_TOP_BUILD_DIR
180             Provides an alternative setting for the ‘pc_top_builddir’ global
181             variable.
182
183     PKG_CONFIG_PURE_DEPGRAPH
184             If set, enables the same behaviour as the --pure flag.
185
186     PKG_CONFIG_SYSTEM_INCLUDE_PATH
187             List of paths that are considered system include paths by the
188             toolchain.  This is a pkgconf-specific extension.
189
190     PKG_CONFIG_SYSTEM_LIBRARY_PATH
191             List of paths that are considered system library paths by the
192             toolchain.  This is a pkgconf-specific extension.
193
194     PKG_CONFIG_DISABLE_UNINSTALLED
195             If set, enables the same behaviour as the --no-uninstalled flag.
196
197     PKG_CONFIG_LOG
198             ‘logfile’ which is used for dumping audit information concerning
199             installed module versions.
200
201     PKG_CONFIG_DEBUG_SPEW
202             If set, enables additional debug logging.  The format of the
203             debug log messages is implementation-specific.
204
205     PKG_CONFIG_DONT_RELOCATE_PATHS
206             If set, disables the path relocation feature.
207
208     PKG_CONFIG_MSVC_SYNTAX
209             If set, uses MSVC syntax for fragments.
210

EXAMPLES

212     Displaying the CFLAGS of a package:
213           $ pkgconf --cflags foo
214           -fPIC -I/usr/include/foo
215

SEE ALSO

217     pc(5), pkg.m4(7)
218
219BSD                            November 15, 2016                           BSD
Impressum