OS Manuals

/usr/bin/pkgconf

An implementation of pkg-config

From pkgconf 3.0.10-r2 (os), captured 2026-11-05 by running pkgconf --help (exit 0). permalink

usage: pkgconf [OPTIONS] [LIBRARIES]

basic options:

  --help                            this message
  --about                           print pkgconf version and license to stdout
  --version                         print supported pkg-config version to stdout
  --verbose                         print additional information
  --atleast-pkgconfig-version       check whether or not pkgconf is compatible
                                    with a specified pkg-config version
  --errors-to-stdout                print all errors on stdout instead of stderr
  --print-errors                    ensure all errors are printed
  --short-errors                    be less verbose about some errors
  --silence-errors                  explicitly be silent about errors
  --list-all                        list all known packages
  --list-package-names              list all known package names
  --simulate                        simulate walking the calculated dependency graph
  --no-cache                        do not cache already seen packages when
                                    walking the dependency graph
  --log-file=filename               write an audit log to a specified file
  --with-path=path                  adds a directory to the search path
  --define-prefix                   override the prefix variable with one that is guessed based on
                                    the location of the .pc file
  --dont-define-prefix              do not override the prefix variable under any circumstances
  --prefix-variable=varname         sets the name of the variable that pkgconf considers
                                    to be the package prefix
  --dont-relocate-paths             disables path relocation support

cross-compilation personality support:

  --personality=triplet|filename    sets the personality to 'triplet' or a file named 'filename'
  --dump-personality                dumps details concerning selected personality

checking specific pkg-config database entries:

  --atleast-version                 require a specific version of a module
  --exact-version                   require an exact version of a module
  --max-version                     require a maximum version of a module
  --exists                          check whether or not a module exists
  --uninstalled                     check whether or not an uninstalled module will be used
  --no-uninstalled                  never use uninstalled modules when satisfying dependencies
  --no-provides                     do not use 'provides' rules to resolve dependencies
  --maximum-traverse-depth          maximum allowed depth for dependency graph (-1 for unlimited)
  --static                          be more aggressive when computing dependency graph
                                    (for static linking)
  --shared                          use a simplified dependency graph (usually default)
  --pure                            optimize a static dependency graph as if it were a normal
                                    dependency graph
  --env-only                        look only for package entries in PKG_CONFIG_PATH
  --ignore-conflicts                ignore 'conflicts' rules in modules
  --validate                        validate specific .pc files for correctness

querying specific pkg-config database fields:

  --define-variable=varname=value   define variable 'varname' as 'value'
  --variable=varname                print specified variable entry to stdout
  --cflags                          print required CFLAGS to stdout
  --cflags-only-I                   print required include-dir CFLAGS to stdout
  --cflags-only-other               print required non-include-dir CFLAGS to stdout
  --libs                            print required linker flags to stdout
  --libs-only-L                     print required LDPATH linker flags to stdout
  --libs-only-l                     print required LIBNAME linker flags to stdout
  --libs-only-other                 print required other linker flags to stdout
  --print-requires                  print required dependency frameworks to stdout
  --print-requires-private          print required dependency frameworks for static
                                    linking to stdout
  --print-provides                  print provided dependencies to stdout
  --print-variables                 print all known variables in module to stdout
  --digraph                         print entire dependency graph in graphviz 'dot' format
  --print-digraph-query-nodes       also print query nodes in 'dot' format
  --solution                        print dependency graph solution in a simple format
  --keep-system-cflags              keep -I/usr/include entries in cflags output
  --keep-system-libs                keep -L/usr/lib entries in libs output
  --path                            show the exact filenames for any matching .pc files
  --modversion                      print the specified module's version to stdout
  --internal-cflags                 do not filter 'internal' cflags from output
  --license                         print the specified module's license to stdout if known
  --link-abi                        print the link ABIs (e.g. c, c++) the module must be linked against
  --source                          print the specified module's source code location to stdout if known
  --exists-cflags                   add -DHAVE_FOO fragments to cflags for each found module

filtering output:

  --msvc-syntax                     print translatable fragments in MSVC syntax
  --fragment-filter=types           filter output fragments to the specified types
  --env=prefix                      print output as shell-compatible environmental variables
  --fragment-tree                   visualize printed CFLAGS/LIBS fragments as a tree
  --newlines                        use newlines for whitespace between fragments

report bugs to <https://github.com/pkgconf/pkgconf/issues/new>.
Options (66)
OptionDescriptionSource
--helpPrint a usage summary on standard output and exit.help + man
--aboutPrint the version number, the Copyright notice, and the license of the pkgconf program to standard output and exit.help + man
--versionPrint the version number of the pkgconf program to standard output and exit.help + man
--verboseThis option only has an effect if --modversion is also specified.help + man
--atleast-pkgconfig-version versionExit with error if the requested version number is greater than the version number of the pkgconf program, or with success otherwise.help + man
--errors-to-stdoutPrint all error, warning, and debugging messages to standard output instead of to standard error output.help + man
--print-errorsPrint some messages about fatal errors to standard error output that would otherwise be omitted.help + man
--short-errorsWhen printing error messages about modules that are not found or conflict with each other, avoid printing additional, verbose instructions explaining potential methods for solving the problem.help + man
--silence-errorsDo not print any error, warning, or debugging messages at all.help + man
--list-allWalk the module search path in the order of descending priority.help + man
--list-package-namesPerform the same search as --list-all, but only print the basename of each pc(5) file without the extension, not the module name and the description.help + man
--simulateSimulates resolving a dependency graph based on the requested modules on the command line.help + man
--no-cacheSkip caching packages when they are loaded into the internal resolver.help + man
--log-file filenameSet the name of the output file where information about selected modules is logged, both about those selected by arguments and as dependencies.help + man
--with-path pathPrepend the directory path to the module search path, giving it priority over all other directories including those from PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR.help + man
--define-prefixoverride the prefix variable with one that is guessed based on the location of the .pc filehelp + man
--dont-define-prefixdo not override the prefix variable under any circumstanceshelp + man
--prefix-variable varnamesets the name of the variable that pkgconf considers to be the package prefixhelp + man
--dont-relocate-pathsDisables the path relocation feature.help + man
--personality triplet|filenamesets the personality to 'triplet' or a file named 'filename'help
--dump-personalityPrint some default settings to standard output, in particular the default module search path that is used when PKG_CONFIG_LIBDIR is not defined, the default list of include paths that are filtered…help + man
--atleast-version versionCheck the module arguments in the given order.help + man
--exact-version versionCheck the module arguments in the given order.help + man
--max-version versionCheck the module arguments in the given order.help + man
--existsExit with a non-zero exit status if the dependency resolver is unable to find all of the requested modules.help + man
--uninstalledExit with a non-zero result if the dependency resolver uses an ‘uninstalled’ module as part of its solution.help + man
--no-uninstalledForbids the dependency resolver from considering 'uninstalled' modules as part of a solution.help + man
--no-providesIgnore ‘Provides’ rules in modules when resolving dependencies.help + man
--maximum-traverse-depth depthmaximum allowed depth for dependency graph (-1 for unlimited)help + man
--staticCompute a deeper dependency graph and use compiler/linker flags intended for static linking.help + man
--sharedCompute a simple dependency graph that is only suitable for shared linking.help + man
--pureoptimize a static dependency graph as if it were a normal dependency graphhelp + man
--env-onlyInitialize the module search path from --with-path and PKG_CONFIG_PATH only, ignoring PKG_CONFIG_LIBDIR and the compiled-in default directories.help + man
--ignore-conflictsIgnore ‘Conflicts’ rules in modules.help + man
--validate packageValidate specific ‘.pc’ files for correctness.help + man
--define-variable varname=valuedefine variable 'varname' as 'value'help + man
--variable varnameFor each specified module, print the value of the variable with the name varname to standard output in command-line order.help + man
--cflagsPrint all compiler flags required to compile against the module, or only the include path (-I) flags, or only the compiler flags that are not include path flags, respectively.help + man
--cflags-only-Iprint required include-dir CFLAGS to stdouthelp
--cflags-only-otherprint required non-include-dir CFLAGS to stdouthelp
--libsPrint all linker flags required to link against the module, or only the library path (-L) flags, or only the library (-l) flags, or only the linker flags that are neither library path nor library…help + man
--libs-only-Lprint required LDPATH linker flags to stdouthelp
--libs-only-lprint required LIBNAME linker flags to stdouthelp
--libs-only-otherprint required other linker flags to stdouthelp
--print-requiresFor each specified module, print the Requires or Requires.private properties, respectively, in dependency list format to standard output.help + man
--print-requires-privateprint required dependency frameworks for static linking to stdouthelp
--print-providesFor each specified module, print one line to standard output containing the Name property, an equal sign (‘=’), and the Version property.help + man
--print-variablesFor the first module given on the command line, print the names of all seen variables to standard output, one per line.help + man
--digraphDump the dependency resolver's solution as a graphviz ‘dot’ file.help + man
--print-digraph-query-nodesalso print query nodes in 'dot' formathelp
--solutionPrint the names of the modules requested with module arguments and their dependencies to standard output.help + man
--keep-system-cflagsKeep CFLAGS or linker flag fragments that would be filtered due to being included by default in the compiler.help + man
--keep-system-libskeep -L/usr/lib entries in libs outputhelp
--pathFor the first module given on the command line, let the dependency resolver find the pc(5) file describing that module, print the absolute pathname of that file to standard output, and exit…help + man
--modversionFor each specified module, print the version number to standard output.help + man
--internal-cflagsdo not filter 'internal' cflags from outputhelp
--licenseprint the specified module's license to stdout if knownhelp
--link-abiPrint the set of link ABI tags (for example c or c++) that the module must be linked against, derived from the Link.ABI properties found across its dependency closure.help + man
--sourceprint the specified module's source code location to stdout if knownhelp
--exists-cflagsadd -DHAVE_FOO fragments to cflags for each found modulehelp
--msvc-syntaxUse MSVC syntax for --cflags, --env, and --libs output.help + man
--fragment-filter typesFilter the fragment lists for the specified types.help + man
--env prefixPrint the requested values as variable declarations in a similar format as the env(1) command.help + man
--fragment-treevisualize printed CFLAGS/LIBS fragments as a treehelp
--newlinesUse newlines to separate individual CFLAGS or linker flag fragments instead of spaces.help + man
--debugPrint some non-fatal warning messages to standard error output that would otherwise silently be ignored. (in the manual page but not in --help)man
Exit status (1) from the manual page
0success
Examples (1) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.