PKGCONF(1)

πŸ“¦ version 1.6.3, in opensuse-leap 16.0

✨ 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 the PKG_CONFIG_PATH environmental 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 denoting pkgconf'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 about pkgconf'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 --static flag. 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 to pkgconf'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 the pkgconf_path_relocate API. 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 -I CFLAGS 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 -L linker flags, only -l linker flags or only linker flags that are not -L or -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 β€” Define VARNAME as VALUE. 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 of VARNAME. 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 .pc files) πŸ“
  • --env=VARNAME β€” Print the requested values as variable declarations in a similar format as the env(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 in PKG_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 --pure flag. 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-uninstalled flag. 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 ⭐

pc(5), pkg.m4(7)

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