1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
NAME
librarian - Return flags for compiling against libraries
SYNOPSIS
librarian [OPTION]... [--] [VARIABLE]... [LIBRARY]...
DESCRIPTION
librarian is used to print flags required when compiling
or linking, and want to use library that requires
non-trival flags.
librarian shall output the flags, required by the
selected libraries, LIBRARY, that are listed under the
selected variables, VARIABLE.
LIBRARY can either be the name of the required library,
the name of the required library and a version of said
library, or the name of the required library and an
accepted version range of said library. If the same
library name is used more than once, the versions and
version ranges are unioned. Recognised formats are:
NAME Any version of the library NAME will do.
NAME=VERSION Only version VERSION of the library NAME
is acceptable. (Multiple version can be
used by specifying more than once.)
NAME<=MAX Any versions up to and including MAX
of the library NAME will do.
NAME<MAX Any versions up to but excluding MAX
of the library NAME will do.
NAME>=MIN At least version MIN of the library
NAME is required.
NAME>MIN A greater version than version MIN of
the library NAME is required.
NAME>=MIN<=MAX Combines NAME>=MIN and NAME<=MAX.
NAME>=MIN<MAX Combines NAME>=MIN and NAME<MAX.
NAME>MIN<=MAX Combines NAME>MIN and NAME<=MAX.
NAME>MIN<MAX Combines NAME>MIN and NAME<MAX.
The are not predefined values for VARIABLE, but the
standardised ones are:
CFLAGS Flags required by the compiler to compile
the if the library LIBRARY is used. The
library is a C library.
CPPFLAGS Flags required by the C preprocessor to
compile the if the library LIBRARY is used.
LDFLAGS Flags required by the linker to link the
program when the library LIBRARY is used.
CXXFLAGS Flags required by the compiler to compile
the if the library LIBRARY is used. The
library is a C++ library.
deps Libraries the library LIBRARY is dependent
on. Flags from these libraries should not
appear in the other variables unless the
library LIBRARY requires them directly.
All variables should be in upper case unless they are
reserved. In the latter case, the are lower cased.
If VARIABLE is omitted, the process will exit with the
value 0 if all listed libraries, LIBRARY, are available,
and otherwise exit with the value 2.
librarian files should be stored in PREFIX/share/librarian/.
Its filename should be the name of the library, followed
by an = (equals-sign) and the version number.
Empty lines and lines starting with a # (she) in a
librarian files is ignored. Other lines should begin
with a variable name and be followed by the required
flags relevant to that variable. For the variable deps,
libraries that the library requires should be listed
in the same format the LIBRARY argument uses.
OPTIONS
-d Add output for dependencies too.
Should be used for LDFLAGS when linking
statically.
-l Print the location of the files specified by
LIBRARY.
-o Prefer older libraries, when multiple versions
are available.
ENVIRONMENT
LIBRARIAN_PATH
Colon separated list of directories to search
for librarian files.
EXIT STATUS
0 Program was successful.
1 An error occurred.
2 A library was not found.
3 Usage error.
RATIONALE
pkg-config(1) sucks.
SEE ALSO
pkg-config(1)
|