version 1.5, 2006/11/28 01:54:14 |
version 1.6, 2006/11/28 08:11:04 |
|
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
.\" |
.\" |
.Dd November 27, 2006 |
.Dd November 27, 2006 |
.Dt pkg-config 1 |
.Dt PKG-CONFIG 1 |
.Os |
.Os |
.Sh NAME |
.Sh NAME |
.Nm pkg-config |
.Nm pkg-config |
|
|
utility retreives metadata about the installation of software packages. |
utility retreives metadata about the installation of software packages. |
This metadata includes version, compiler and linker flags, and dependency |
This metadata includes version, compiler and linker flags, and dependency |
information. |
information. |
It is inspired by, and intended to operate as a drop-in replacement to the |
It is inspired by, and intended to operate as a drop-in replacement to, |
program of the same name available from freedesktop.org. |
the program of the same name available from freedesktop.org. |
.Pp |
.Pp |
Metadata is stored in files named after the package they describe; the |
Metadata is stored in files named after the package they describe; the |
Yoyodyne package would likely be described by "yoyodyne.pc". |
Yoyodyne package would likely be described by "yoyodyne.pc". |
Not all software packages provide |
Not all software packages provide |
.Nm |
.Nm |
metadata. Packages controlled by the |
metadata. |
|
Packages controlled by the |
.Xr ports 7 |
.Xr ports 7 |
system store their metadata, if provided, in |
system store their metadata, if provided, in |
.Pa ${LOCALBASE}/lib/pkgconfig ; |
.Pa ${LOCALBASE}/lib/pkgconfig ; |
the X Window System stores its metadata in |
the X Window System stores its metadata in |
.Pa ${X11BASE}/lib/pkgconfig. |
.Pa ${X11BASE}/lib/pkgconfig . |
The |
The |
.Nm |
.Nm |
utility will search these locations by default. |
utility will search these locations by default. |
|
|
attempts to output the full set of compiler or linker flags required to |
attempts to output the full set of compiler or linker flags required to |
use a package, it will also output the flags required for any prerequisite |
use a package, it will also output the flags required for any prerequisite |
packages. |
packages. |
If the "foo" package depends on the bar package, "pkg-config --cflags foo" |
If the "foo" package depends on the "bar" package, "pkg-config --cflags foo" |
might output something like "-I/usr/local/include/foo |
might output something like "-I/usr/local/include/foo |
-I/usr/local/include/bar", even though the compiler flags for "bar" were not |
-I/usr/local/include/bar", even though the compiler flags for "bar" were not |
explicitly requested. |
explicitly requested. |
|
|
Exit with error if the version of |
Exit with error if the version of |
.Nm |
.Nm |
is greater than or equal to the specified version. |
is greater than or equal to the specified version. |
|
|
.It Fl -cflags |
.It Fl -cflags |
Return all compiler flags required to compile against the package. |
Return all compiler flags required to compile against the package. |
.It Fl -cflags-only-I |
.It Fl -cflags-only-I |
|
|
.It Fl -cflags-only-other |
.It Fl -cflags-only-other |
Return all compiler flags, other than the include path flags, required to |
Return all compiler flags, other than the include path flags, required to |
compile against the package. |
compile against the package. |
|
|
.It Fl -libs |
.It Fl -libs |
Return all linker flags required to linker against the package. |
Return all linker flags required to linker against the package. |
.It Fl -libs-only-l |
.It Fl -libs-only-l |
|
|
.It Fl -libs-only-other |
.It Fl -libs-only-other |
Return linker flags, other than the library and path flags, required to |
Return linker flags, other than the library and path flags, required to |
compile against the package. |
compile against the package. |
|
|
.It Fl -exists |
.It Fl -exists |
Return true if all the specified packages are installed. |
Return true if all the specified packages are installed. |
This is the default if no other option is given. |
This is the default if no other option is given. |
|
|
package files. |
package files. |
If given, this list of paths is prepended to the standard search path. |
If given, this list of paths is prepended to the standard search path. |
.El |
.El |
.Pp |
|
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr pkg_info 1 , |
.Xr pkg_info 1 , |
.Xr ports 7 |
.Xr ports 7 |