PKGCONF(1)
β¨ PKGCONF(1) β¨
okay so bestie, welcome to pkgconf(1) β it's a General Commands Manual page and honestly it's giving "the tool that makes your build system behave." Let's get into it π
πΈ NAME πΈ
pkgconf β a system for configuring build dependency information π
π¦ SYNOPSIS π¦
pkgconf [options] [list of modules]
literally that's it. options, then some modules, go off π
π DESCRIPTION π
pkgconf is a program which helps to configure compiler and linker flags for development libraries. no cap, that's the whole vibe. it lets build systems detect other dependencies and use them with the system toolchain. it's the matchmaker between your project and everything it needs π«Ά
π GENERAL OPTIONS π
--versionβ Display the supported pkg-config version and exit. slay, you get a version number and then it dips β¨--atleast-pkgconfig-version=VERSIONβ Exit with error if we do not support the requested pkg-config version. like a vibe check on the version, and if it flops you get an error π--errors-to-stdoutβ Print all errors on the main output stream instead of the error output stream. errors but make them main-character π--silence-errorsβ Do not display any errors at all. nothing to see here π--list-allβ Walk all directories listed in thePKG_CONFIG_PATHenvironmental variable and display information on packages which have registered information there. a lil tour of everything registered π--simulateβ Simulates resolving a dependency graph based on the requested modules on the command line. Dumps a series of trees denotingpkgconf's resolver state. it's giving "let me show you my thought process" π§--no-cacheβ Skip caching packages when they are loaded into the internal resolver. This may result in an alternate dependency graph being computed. different graph, no cap π₯--ignore-conflictsβ Ignore βConflictsβ rules in modules. drama? never heard of her π--env-onlyβ Learn aboutpkgconf's configuration strictly from environmental variables. environment variables only, periodt π±--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. set a boundary, we love boundaries π--staticβ Compute a deeper dependency graph and use compiler/linker flags intended for static linking. deeper graph, static-link flags π₯--pureβ Treats the computed dependency graph as if it were pure. This is mainly intended for use with the--staticflag. pure vibes, mostly pairs with--staticβ¨--no-providesβ Ignore βProvidesβ rules in modules when resolving dependencies. provides? not today πΈ--with-path=PATHβ Adds a new module search path topkgconf's dependency resolver. Paths added in this way are given preference before other paths. your path goes to the front of the line π--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. relocatable SDKs say hi πͺ--dont-define-prefixβ Disables the βdefine-prefixβ feature. not today, prefix π--prefix-variable=VARIABLEβ Sets the βprefixβ variable used by the βdefine-prefixβ feature. you pick the variable name π--relocate=PATHβ Relocates a path using thepkgconf_path_relocateAPI. This is mainly used by the testsuite to provide a guaranteed interface to the system's path relocation backend. test-suite core fr π§ͺ--dont-relocate-pathsβ Disables the path relocation feature. relocation? cancelled π
π MODULE-SPECIFIC OPTIONS π
--atleast-version=VERSIONβ Exit with error if a module's version is less than the specified version. minimum version or it's a no π--exact-version=VERSIONβ Exit with error if a module's version is not exactly the specified version. exact match only, we're picky β--max-version=VERSIONβ Exit with error if a module's version is greater than the specified version. ceiling version, don't exceed it π«--existsβ Exit with a non-zero result if the dependency resolver was unable to find all of the requested modules. basically "does this even exist bestie" π--uninstalledβ Exit with a non-zero result if the dependency resolver uses an βuninstalledβ module as part of it's solution. spots the uninstalled ones π--no-uninstalledβ Forbids the dependency resolver from considering 'uninstalled' modules as part of a solution. uninstalled modules are BANNED from the solution π
π¦ QUERY-SPECIFIC OPTIONS π¦
--cflags,--cflags-only-I,--cflags-only-otherβ Display either all CFLAGS, only-ICFLAGS or only CFLAGS that are not-I. pick your cflags flavor π--libs,--libs-only-L,--libs-only-l,--libs-only-otherβ Display either all linker flags, only-Llinker flags, only-llinker flags or only linker flags that are not-Lor-l. all the linker flag combos you could ever want π₯--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. normally they'd get filtered out, but you said keep π--define-variable=VARNAME=VALUEβ DefineVARNAMEasVALUE. Variables are used in query output, and some modules' results may change based on the presence of a variable definition. set it and watch the output shift π--print-variablesβ Print all seen variables for a module to the output channel. every variable we've clocked ποΈ--print-providesβ Print all relevant βProvidesβ entries for a module to the output channel. the provides, served fresh β¨--variable=VARNAMEβ Print the value ofVARNAME. just the value pls π--print-requires,--print-requires-privateβ Print the modules included in either the Requires field or the Requires.private field. depends-on energy π«Ά--digraphβ Dump the dependency resolver's solution as a graphviz βdotβ file. This can be used with graphviz to visualize module interdependencies. literally a whole aesthetic diagram of your deps π§--pathβ Display the filenames of the β.pcβ files used by the dependency resolver for a given dependency set. show me the receipts (the.pcfiles) π--env=VARNAMEβ Print the requested values as variable declarations in a similar format as theenv(1)command.env(1)-core π--fragment-filter=TYPESβ Filter the fragment lists for the specified types. filtering, but make it fragments πΈ--modversionβ Print the version of the queried module. version reveal β
π ENVIRONMENT π
PKG_CONFIG_PATHβ List of secondary directories where β.pcβ files are looked up. the backup squad πPKG_CONFIG_LIBDIRβ List of primary directories where β.pcβ files are looked up. the main characters πPKG_CONFIG_SYSROOT_DIRβ βsysrootβ directory, will be prepended to every path defined inPKG_CONFIG_PATH. Useful for cross compilation. cross-compilation bestie πPKG_CONFIG_TOP_BUILD_DIRβ Provides an alternative setting for the βpc_top_builddirβ global variable. swaps out the global π¦PKG_CONFIG_PURE_DEPGRAPHβ If set, enables the same behaviour as the--pureflag. same energy as--pureβ¨PKG_CONFIG_SYSTEM_INCLUDE_PATHβ List of paths that are considered system include paths by the toolchain. This is a pkgconf-specific extension. pkgconf-only, iykyk π₯PKG_CONFIG_SYSTEM_LIBRARY_PATHβ List of paths that are considered system library paths by the toolchain. This is a pkgconf-specific extension. also pkgconf-specific πPKG_CONFIG_DISABLE_UNINSTALLEDβ If set, enables the same behaviour as the--no-uninstalledflag. same energy as--no-uninstalledπPKG_CONFIG_LOGβ βlogfileβ which is used for dumping audit information concerning installed module versions. the audit trail, the receipts πPKG_CONFIG_DEBUG_SPEWβ If set, enables additional debug logging. The format of the debug log messages is implementation-specific. debug spew, format varies πPKG_CONFIG_DONT_RELOCATE_PATHSβ If set, disables the path relocation feature. relocation off π
πΈ EXAMPLES πΈ
Displaying the CFLAGS of a package:
$ pkgconf --cflags foo
-fPIC -I/usr/include/foo
look at those flags go π β¨
β SEE ALSO β
go read those too bestie, they're part of the lore π
and that's the page! brought to you by the Debian crew, dated November 15, 2016 β mwah, ily, go configure those build deps πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: mingw64-cross-pkgconf 1.6.3-bp160.1.4 Β· ISC
- opensuse-leap 16.0: mingw64-cross-pkgconf 1.6.3-bp160.1.4 Β· ISC
- opensuse-leap 16.0: mingw64-cross-pkgconf 1.6.3-bp160.1.4 Β· ISC
- opensuse-leap 16.0: mingw64-cross-pkgconf 1.6.3-bp160.1.4 Β· ISC
- Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016 pkgconf authors (see AUTHORS)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms