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 de‐
12     pendencies 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 re‐
41             solver.  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     --validate package ...
52             Validate specific ‘.pc’ files for correctness.
53
54     --maximum-traverse-depth=DEPTH
55             Impose a limit on the allowed depth in the dependency graph.  For
56             example, a depth of 2 will restrict the resolver from acting on
57             child dependencies of modules added to the resolver's solution.
58
59     --static
60             Compute a deeper dependency graph and use compiler/linker flags
61             intended for static linking.
62
63     --shared
64             Compute a simple dependency graph that is only suitable for
65             shared linking.
66
67     --pure  Treats the computed dependency graph as if it were pure.  This is
68             mainly intended for use with the --static flag.
69
70     --no-provides
71             Ignore ‘Provides’ rules in modules when resolving dependencies.
72
73     --with-path=PATH
74             Adds a new module search path to pkgconf's dependency resolver.
75             Paths added in this way are given preference before other paths.
76
77     --define-prefix
78             Attempts to determine the prefix variable to use for CFLAGS and
79             LIBS entry relocations.  This is mainly useful for platforms
80             where framework SDKs are relocatable, such as Windows.
81
82     --dont-define-prefix
83             Disables the ‘define-prefix’ feature.
84
85     --prefix-variable=VARIABLE
86             Sets the ‘prefix’ variable used by the ‘define-prefix’ feature.
87
88     --relocate=PATH
89             Relocates a path using the pkgconf_path_relocate API.  This is
90             mainly used by the testsuite to provide a guaranteed interface to
91             the system's path relocation backend.
92
93     --dont-relocate-paths
94             Disables the path relocation feature.
95

MODULE-SPECIFIC OPTIONS

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

QUERY-SPECIFIC OPTIONS

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

ENVIRONMENT

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

EXAMPLES

223     Displaying the CFLAGS of a package:
224           $ pkgconf --cflags foo
225           -fPIC -I/usr/include/foo
226

SEE ALSO

228     pc(5), pkg.m4(7)
229
230BSD                            November 15, 2016                           BSD
Impressum