.\" $OpenBSD: pkg-config.1,v 1.1 2006/11/28 00:48:08 ckuethe Exp $ .\" .\" Copyright (c) 2006 Chris Kuethe .\" .\" Permission to use, copy, modify, and 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. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd November 27, 2006 .Dt pkg-config 1 .Os .Sh NAME .Nm pkg-config .Nd fetch metadata about installed software packages .Sh SYNOPSIS .Nm pkg-config .Op Ar options .Ar pkg-name Op Ar pkg-name ... .Sh DESCRIPTION The .Nm utility retreives metadata about the installation of software packages. This metadata includes version, compiler and linker flags, and dependency information. .Pp Metadata is stored in files named after the package they describe; the Yoyodyne package would likely be described by "yoyodyne.pc". Packages controlled by the .Xr ports 7 system store their metadata in .Pa ${LOCALBASE}/lib/pkgconfig and X stores its metadata in .Pa ${X11BASE}/lib/pkgconfig. .Pp .Pp The options are as follows: .Bl -tag -width Ds .It Fl -debug Enable internal development and debugging messages. .It Fl -help Print a help message and exit. .It Fl -usage Print a help message and exit. .It Fl -list-all List all installed packages and exit. .It Fl -version Print version of .Nm and exit. .It Fl -errors-to-stdout Direct error messages to stdout rather than stderr. .It Fl -atleast-pkgconfig-version Ar version Exit with error if .Nm is not new enough. .It Fl -cflags Return all compiler flags required to compile against the package. .It Fl -cflags-only-I Return only the include path flags required to compile against the package. .It Fl -cflags-only-other Return all compiler flags, other than the include path flags, required to compile against the package. .It Fl -libs Return all linker flags required to linker against the package. .It Fl -libs-only-l Return only the library (-lwhatever) flags required to link against the package. .It Fl -libs-only-L Return only the library path (-L/path/to/lib) flags required to link against the package. .It Fl -libs-only-other Return linker flags, other than the library and path flags, required to compile against the package. .It Fl -exists Return true if all the specified packages are installed. .It Fl -uninstalled Allow packages not controlled by .Nm to be used. .It Fl -static Return the compiler and/or linker flags required for static linking. .It Fl -atleast-version Ar version Exit with error if the specified package is not new enough .It Fl -modversion Fetch package version .It Fl -variable Ar name Fetch the value of the named variable. .El .Sh ENVIRONMENT .Bl -tag -width PKG_CONFIG_PATH .It Ev PKG_CONFIG_PATH This can be used to specify a colon-separated list of paths to search for package files. If given, this list of paths is prepended to the standard search path. .El .Pp The .Nm utility aims to be a replacement for the program of the same name available from freedesktop.org. .Sh SEE ALSO .Xr pkg_info 1 , .Xr ports 7 .Sh HISTORY The .Nm utility first appeared in .Ox 4.1