pkgconf/pkgconf.1

136 lines
4.5 KiB
Groff

.\" Copyright (c) 2011, 2012, 2013, 2014 pkgconf authors (see AUTHORS).
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" This software is provided 'as is' and without any warranty, express or
.\" implied. In no event shall the authors be liable for any damages arising
.\" from the use of this software.
.Dd February 2, 2015
.Dt PKGCONF 1
.Os
.Sh NAME
.Nm pkgconf
.Nd a system for configuring build dependency information
.Sh SYNOPSIS
.Nm
.Op Ar options
.Op Ar list of modules
.Sh DESCRIPTION
.Nm
is a program which helps to configure compiler and linker flags for
development frameworks. This allows build systems to detect other dependencies
and use them with the system toolchain.
.Sh GENERAL OPTIONS
.Bl -tag -width indent
.It Fl -version
Display the supported pkg-config version and exit.
.It Fl -atleast-pkgconfig-version Ns = Ns Ar VERSION
Exit with error if we do not support the requested pkg-config version.
.It Fl -errors-to-stdout
Print all errors on the main output stream instead of the error output stream.
.It Fl -silence-errors
Do not display any errors at all.
.It Fl -list-all
Walk all directories listed in the
.Va PKG_CONFIG_PATH
environmental variable and display information on packages which have registered
information there.
.It Fl -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 Fl -no-cache
Skip caching packages when they are loaded into the internal resolver. This may
result in an alternate dependency graph being computed.
.It Fl -ignore-conflicts
Ignore
.Sq Conflicts
rules in modules.
.It Fl -env-only
Learn about pkgconf's configuration strictly from environmental variables.
.It Fl -maximum-traverse-depth Ns = Ns Ar 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.
.It Fl -static
Compute a deeper dependency graph and use compiler/linker flags intended for
static linking.
.El
.Sh MODULE-SPECIFIC OPTIONS
.Bl -tag -width indent
.It Fl -atleast-version Ns = Ns Ar VERSION
Exit with error if a module's version is less than the specified version.
.It Fl -exact-version Ns = Ns Ar VERSION
Exit with error if a module's version is not exactly the specified version.
.It Fl -max-version Ns = Ns Ar VERSION
Exit with error if a module's version is greater than the specified version.
.It Fl -exists
Exit with a non-zero result if the dependency resolver was able to find all of
the requested modules.
.It Fl -uninstalled
Exit with a non-zero result if the dependency resolver uses an
.Sq uninstalled
module as part of it's solution.
.It Fl -no-uninstalled
Forbids the dependency resolver from considering 'uninstalled' modules as part
of a solution.
.El
.Sh QUERY-SPECIFIC OPTIONS
.Bl -tag -width indent
.It Fl -cflags Ns , Fl -cflags-only-I Ns , Fl -cflags-only-other
Display either all CFLAGS, only
.Fl I
CFLAGS or only CFLAGS that are not
.Fl I .
.It Fl -libs Ns , Fl -libs-only-L Ns , Fl -libs-only-l Ns , Fl -libs-only-other
Display either all linker flags, only
.Fl L
linker flags, only
.Fl l
linker flags or only linker flags that are not
.Fl L
or
.Fl l .
.It Fl -keep-system-cflags Ns , Fl -keep-system-libs
Keep CFLAGS or linker flag fragments that would be filtered due to being
included by default in the compiler.
.It Fl -define-variable Ns = Ns Ar VARNAME Ns = Ns Ar VALUE
Define
.Va VARNAME
as
.Va VALUE .
Variables are used in query output, and some modules' results may change based
on the presence of a variable definition.
.It Fl -print-variables
Print all seen variables for a module to the output channel.
.It Fl -variable Ns = Ns Ar VARNAME
Print the value of
.Va VARNAME .
.It Fl -print-requires Ns , Fl -print-requires-private
Print the modules included in either the
.Va Requires
field or the
.Va Requires.private
field.
.It Fl -digraph
Dump the dependency resolver's solution as a graphviz
.Sq dot
file. This can be used with graphviz to visualize module interdependencies.
.El
.Sh EXAMPLES
Displaying the CFLAGS of a package:
.Dl $ pkgconf --cflags foo
.Dl -fPIC -I/usr/include/foo
.Sh ENVIRONMENT
.Bl -tag -width indent
.It Va PKG_CONFIG_PATH
List of directories where
.Sq .pc
files are looked up.
.It Va PKG_CONFIG_SYSROOT_DIR
.Sq sysroot
directory, will be prepended to every path defined in
.Va PKG_CONFIG_PATH .
Useful for cross compilation.