mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-05 00:38:04 +02:00
2008-03-23 Stepan Kasal <skasal@redhat.com>
* pkg-config.1: Fix a few typos--add two omitted .TP tags and two omitted full stops; and empty lines do influence the formatting in nroff.
This commit is contained in:
parent
dce0339076
commit
a3701dc44f
2 changed files with 18 additions and 39 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2008-03-23 Stepan Kasal <skasal@redhat.com>
|
||||
|
||||
* pkg-config.1: Fix a few typos--add two omitted .TP tags and two
|
||||
omitted full stops; and empty lines do influence the formatting in
|
||||
nroff.
|
||||
|
||||
2008-03-23 Tollef Fog Heen <tfheen@err.no>
|
||||
|
||||
* main.c (main): Fix small portability problem by defining all the
|
||||
|
|
|
|||
51
pkg-config.1
51
pkg-config.1
|
|
@ -47,8 +47,6 @@ scenario in a Makefile:
|
|||
program: program.c
|
||||
cc program.c `pkg-config --cflags --libs gnomeui`
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.PP
|
||||
\fIpkg-config\fP retrieves information about packages from
|
||||
special metadata files. These files are named after the package,
|
||||
|
|
@ -57,14 +55,13 @@ the directory \fIprefix\fP/lib/pkgconfig for these files; it will also
|
|||
look in the colon-separated (on Windows, semicolon-separated)
|
||||
list of directories specified by the
|
||||
PKG_CONFIG_PATH environment variable.
|
||||
|
||||
.PP
|
||||
The package name specified on the \fIpkg-config\fP command line is
|
||||
defined to be the name of the metadata file, minus the \fI.pc\fP
|
||||
extension. If a library can install multiple versions simultaneously,
|
||||
it must give each version its own name (for example, GTK 1.2 might
|
||||
have the package name "gtk+" while GTK 2.0 has "gtk+-2.0").
|
||||
|
||||
.\"
|
||||
.SH OPTIONS
|
||||
The following options are supported:
|
||||
.TP
|
||||
|
|
@ -79,7 +76,6 @@ are undefined.
|
|||
.TP
|
||||
.I "--help"
|
||||
Displays a help message and terminates.
|
||||
|
||||
.TP
|
||||
.I "--print-errors"
|
||||
If one or more of the modules on the command line, or their
|
||||
|
|
@ -91,7 +87,6 @@ in scripts that want to control what's output. This option can be used
|
|||
alone (to just print errors encountered locating modules on the
|
||||
command line) or with other options. The PKG_CONFIG_DEBUG_SPEW
|
||||
environment variable overrides this option.
|
||||
|
||||
.TP
|
||||
.I "--silence-errors"
|
||||
If one or more of the modules on the command line, or their
|
||||
|
|
@ -103,7 +98,6 @@ usually used in scripts that want to control what's output. So this
|
|||
option is only useful with options such as "--cflags" or
|
||||
"--modversion" that print errors by default. The PKG_CONFIG_DEBUG_SPEW
|
||||
environment variable overrides this option.
|
||||
|
||||
.TP
|
||||
.I "--errors-to-stdout"
|
||||
If printing errors, print them to stdout rather than the default stderr
|
||||
|
|
@ -134,7 +128,6 @@ This prints the -l part of "--libs" for the libraries specified on
|
|||
the command line. Note that the union of "--libs-only-l" and
|
||||
"--libs-only-L" may be smaller than "--libs", due to flags such as
|
||||
-rdynamic.
|
||||
|
||||
.TP
|
||||
.I "--variable=VARIABLENAME"
|
||||
This returns the value of a variable defined in a package's \fI.pc\fP
|
||||
|
|
@ -154,7 +147,6 @@ example, so you can say:
|
|||
--variable=prefix glib-2.0
|
||||
/foo
|
||||
.fi
|
||||
|
||||
.TP
|
||||
.I "--uninstalled"
|
||||
Normally if you request the package "foo" and the package
|
||||
|
|
@ -167,7 +159,6 @@ packages are being used, and return failure (false) otherwise.
|
|||
\fIpkg-config\fP from implicitly choosing "-uninstalled" packages, so
|
||||
if that variable is set, they will only have been used if you pass
|
||||
a name like "foo-uninstalled" on the command line explicitly.)
|
||||
|
||||
.TP
|
||||
.I "--exists"
|
||||
.TP
|
||||
|
|
@ -188,7 +179,6 @@ constraint after each package name, for example:
|
|||
$ pkg-config --exists 'glib-2.0 >= 1.3.4 libxml = 1.8.3'
|
||||
.fi
|
||||
Remember to use \-\-print-errors if you want error messages.
|
||||
|
||||
.TP
|
||||
.I "--msvc-syntax"
|
||||
This option is available only on Windows. It causes \fIpkg-config\fP
|
||||
|
|
@ -198,27 +188,23 @@ Visual C++ command-line compiler, \fIcl\fP. Specifically, instead of
|
|||
of \fI-lfoo\fP it prints \fIfoo.lib\fP. Note that the --libs output
|
||||
consists of flags for the linker, and should be placed on the cl
|
||||
command line after a /link switch.
|
||||
|
||||
.TP
|
||||
.I "--dont-define-prefix"
|
||||
This option is available only on Windows. It prevents \fIpkg-config\fP
|
||||
from automatically trying to override the value of the variable
|
||||
"prefix" in each .pc file.
|
||||
|
||||
.TP
|
||||
.I "--prefix-variable=PREFIX"
|
||||
Also this option is available only on Windows. It sets the name of the
|
||||
variable that \fIpkg-config\fP automatically sets as described above.
|
||||
|
||||
.TP
|
||||
.I "--static"
|
||||
Output libraries suitable for static linking. That means including
|
||||
any private libraries in the output. This relies on proper tagging in
|
||||
the .pc files, else a too large number of libraries will ordinarily be
|
||||
output.
|
||||
|
||||
.\"
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_PATH"
|
||||
A colon-separated (on Windows, semicolon-separated) list of
|
||||
|
|
@ -227,12 +213,10 @@ always be searched after searching the path; the default is
|
|||
\fIlibdir\fP/pkgconfig:\fIdatadir\fP/pkgconfig where \fIlibdir\fP is
|
||||
the libdir where \fIpkg-config\fP and \fIdatadir\fP is the datadir
|
||||
where \fIpkg-config\fP was installed.
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_DEBUG_SPEW"
|
||||
If set, causes \fIpkg-config\fP to print all kinds of
|
||||
debugging information and report all errors.
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_TOP_BUILD_DIR"
|
||||
A value to set for the magic variable \fIpc_top_builddir\fP
|
||||
|
|
@ -242,7 +226,6 @@ variable should refer to the top builddir of the Makefile where the
|
|||
compile/link flags reported by \fIpkg-config\fP will be used.
|
||||
This only matters when compiling/linking against a package that hasn't
|
||||
yet been installed.
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_DISABLE_UNINSTALLED"
|
||||
Normally if you request the package "foo" and the package
|
||||
|
|
@ -250,15 +233,12 @@ Normally if you request the package "foo" and the package
|
|||
"-uninstalled" variant. This allows compilation/linking against
|
||||
uninstalled packages. If this environment variable is set, it
|
||||
disables said behavior.
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_ALLOW_SYSTEM_CFLAGS"
|
||||
Don't strip -I/usr/include out of cflags.
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_ALLOW_SYSTEM_LIBS"
|
||||
Don't strip -L/usr/lib out of libs
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_SYSROOT_DIR"
|
||||
Modify -I and -L to use the directories located in target sysroot.
|
||||
|
|
@ -267,20 +247,18 @@ to determine CFLAGS anf LDFLAGS. -I and -L are modified to point to
|
|||
the new system root. this means that a -I/usr/include/libfoo will
|
||||
become -I/var/target/usr/include/libfoo with a PKG_CONFIG_SYSROOT_DIR
|
||||
equal to /var/target (same rule apply to -L)
|
||||
|
||||
.TP
|
||||
.I "PKG_CONFIG_LIBDIR"
|
||||
Replaces the default \fIpkg-config\fP search directory.
|
||||
|
||||
.\"
|
||||
.SH WINDOWS SPECIALITIES
|
||||
If a .pc file is found in a directory that matches the usual
|
||||
conventions (i.e., ends with \\lib\\pkgconfig or \\share\\pkgconfig),
|
||||
the prefix for that package is assumed to be the grandparent of the
|
||||
directory where the file was found, and the \fIprefix\fP variable is
|
||||
overridden for that file accordingly.
|
||||
|
||||
.\"
|
||||
.SH AUTOCONF MACROS
|
||||
|
||||
.TP
|
||||
.I "PKG_CHECK_MODULES(VARIABLE-PREFIX,MODULES[,ACTION-IF-FOUND,[ACTION-IF-NOT-FOUND]])"
|
||||
|
||||
|
|
@ -301,13 +279,15 @@ use to display what went wrong.
|
|||
|
||||
Note that if there is a possibility the first call to
|
||||
PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
|
||||
explicit call to PKG_PROG_PKG_CONFIG in your configure.ac.
|
||||
.\"
|
||||
.TP
|
||||
.I "PKG_PROG_PKG_CONFIG([MIN-VERSION])"
|
||||
|
||||
Defines the PKG_CONFIG variable to the best pkg-config available,
|
||||
useful if you need pkg-config but don't want to use PKG_CHECK_MODULES.
|
||||
|
||||
.\"
|
||||
.TP
|
||||
.I "PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])"
|
||||
|
||||
Check to see whether a particular set of modules exists. Similar
|
||||
|
|
@ -315,13 +295,12 @@ to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
|||
|
||||
Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
||||
this or PKG_CHECK_MODULES is called, or make sure to call
|
||||
PKG_CHECK_EXISTS manually
|
||||
PKG_CHECK_EXISTS manually.
|
||||
|
||||
.SH METADATA FILE SYNTAX
|
||||
To add a library to the set of packages \fIpkg-config\fP knows about,
|
||||
simply install a \fI.pc\fP file. You should install this file to
|
||||
\fIlibdir\fP/pkgconfig.
|
||||
|
||||
.PP
|
||||
Here is an example file:
|
||||
.nf
|
||||
|
|
@ -341,11 +320,9 @@ Libs: -L${libdir} -lgobject-1.3
|
|||
Libs.private: -lm
|
||||
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib/include
|
||||
.fi
|
||||
|
||||
.PP
|
||||
You would normally generate the file using configure, of course, so
|
||||
that the prefix, etc. are set to the proper values.
|
||||
|
||||
.PP
|
||||
Files have two kinds of line: keyword lines start with a keyword plus
|
||||
a colon, and variable definitions start with an alphanumeric string
|
||||
|
|
@ -353,11 +330,9 @@ plus an equals sign. Keywords are defined in advance and have special
|
|||
meaning to \fIpkg-config\fP; variables do not, you can have any
|
||||
variables that you wish (however, users may expect to retrieve the
|
||||
usual directory name variables).
|
||||
|
||||
.PP
|
||||
Note that variable references are written "${foo}"; you can escape
|
||||
literal "${" as "$${".
|
||||
|
||||
.TP
|
||||
.I "Name:"
|
||||
This field should be a human-readable name for the package. Note that
|
||||
|
|
@ -400,19 +375,17 @@ same time, then \fIpkg-config\fP will complain.
|
|||
This line should give the link flags specific to your package.
|
||||
Don't add any flags for required packages; \fIpkg-config\fP will
|
||||
add those automatically.
|
||||
|
||||
.TP
|
||||
.I "Libs.private:"
|
||||
This line should list any private libraries in use. Private libraries
|
||||
are libraries which are not exposed through your library, but are
|
||||
needed in the case of static linking.
|
||||
|
||||
.TP
|
||||
.I "Cflags:"
|
||||
This line should list the compile flags specific to your package.
|
||||
Don't add any flags for required packages; \fIpkg-config\fP will
|
||||
add those automatically.
|
||||
|
||||
.\"
|
||||
.SH AUTHOR
|
||||
|
||||
\fIpkg-config\fP was written by James Henstridge, rewritten by Martijn
|
||||
|
|
@ -421,7 +394,7 @@ Taylor, and Raja Harinath submitted suggestions and some code.
|
|||
\fIgnome-config\fP was written by Miguel de Icaza, Raja Harinath and
|
||||
various hackers in the GNOME team. It was inspired by Owen Taylor's
|
||||
\fIgtk-config\fP program.
|
||||
|
||||
.\"
|
||||
.SH BUGS
|
||||
|
||||
\fIpkg-config\fP does not handle mixing of parameters with and without
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue