OS Manuals

/usr/bin/pkg-config

An implementation of pkg-config

From pkgconf 3.0.10-r2 (os), captured 2026-11-05 by running pkg-config --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 (65)
OptionDescriptionSource
--helpthis messagehelp
--aboutprint pkgconf version and license to stdouthelp
--versionprint supported pkg-config version to stdouthelp
--verboseprint additional informationhelp
--atleast-pkgconfig-versioncheck whether or not pkgconf is compatible with a specified pkg-config versionhelp
--errors-to-stdoutprint all errors on stdout instead of stderrhelp
--print-errorsensure all errors are printedhelp
--short-errorsbe less verbose about some errorshelp
--silence-errorsexplicitly be silent about errorshelp
--list-alllist all known packageshelp
--list-package-nameslist all known package nameshelp
--simulatesimulate walking the calculated dependency graphhelp
--no-cachedo not cache already seen packages when walking the dependency graphhelp
--log-file filenamewrite an audit log to a specified filehelp
--with-path pathadds a directory to the search pathhelp
--define-prefixoverride the prefix variable with one that is guessed based on the location of the .pc filehelp
--dont-define-prefixdo not override the prefix variable under any circumstanceshelp
--prefix-variable varnamesets the name of the variable that pkgconf considers to be the package prefixhelp
--dont-relocate-pathsdisables path relocation supporthelp
--personality triplet|filenamesets the personality to 'triplet' or a file named 'filename'help
--dump-personalitydumps details concerning selected personalityhelp
--atleast-versionrequire a specific version of a modulehelp
--exact-versionrequire an exact version of a modulehelp
--max-versionrequire a maximum version of a modulehelp
--existscheck whether or not a module existshelp
--uninstalledcheck whether or not an uninstalled module will be usedhelp
--no-uninstallednever use uninstalled modules when satisfying dependencieshelp
--no-providesdo not use 'provides' rules to resolve dependencieshelp
--maximum-traverse-depthmaximum allowed depth for dependency graph (-1 for unlimited)help
--staticbe more aggressive when computing dependency graph (for static linking)help
--shareduse a simplified dependency graph (usually default)help
--pureoptimize a static dependency graph as if it were a normal dependency graphhelp
--env-onlylook only for package entries in PKG_CONFIG_PATHhelp
--ignore-conflictsignore 'conflicts' rules in moduleshelp
--validatevalidate specific .pc files for correctnesshelp
--define-variable varname=valuedefine variable 'varname' as 'value'help
--variable varnameprint specified variable entry to stdouthelp
--cflagsprint required CFLAGS to stdouthelp
--cflags-only-Iprint required include-dir CFLAGS to stdouthelp
--cflags-only-otherprint required non-include-dir CFLAGS to stdouthelp
--libsprint required linker flags to stdouthelp
--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-requiresprint required dependency frameworks to stdouthelp
--print-requires-privateprint required dependency frameworks for static linking to stdouthelp
--print-providesprint provided dependencies to stdouthelp
--print-variablesprint all known variables in module to stdouthelp
--digraphprint entire dependency graph in graphviz 'dot' formathelp
--print-digraph-query-nodesalso print query nodes in 'dot' formathelp
--solutionprint dependency graph solution in a simple formathelp
--keep-system-cflagskeep -I/usr/include entries in cflags outputhelp
--keep-system-libskeep -L/usr/lib entries in libs outputhelp
--pathshow the exact filenames for any matching .pc fileshelp
--modversionprint the specified module's version to stdouthelp
--internal-cflagsdo not filter 'internal' cflags from outputhelp
--licenseprint the specified module's license to stdout if knownhelp
--link-abiprint the link ABIs (e.g. c, c++) the module must be linked againsthelp
--sourceprint the specified module's source code location to stdout if knownhelp
--exists-cflagsadd -DHAVE_FOO fragments to cflags for each found modulehelp
--msvc-syntaxprint translatable fragments in MSVC syntaxhelp
--fragment-filter typesfilter output fragments to the specified typeshelp
--env prefixprint output as shell-compatible environmental variableshelp
--fragment-treevisualize printed CFLAGS/LIBS fragments as a treehelp
--newlinesuse newlines for whitespace between fragmentshelp

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