]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/icu-config.1.in
55b8e3f31ac7555ec1542e6ab9a9a042174b12d6
[apple/icu.git] / icuSources / config / icu-config.1.in
1 .\" Hey, Emacs! This is -*-nroff-*- you know...
2 .\"
3 .\" icu-config.1: manual page for the icu-config utility
4 .\"
5 .\" Copyright (C) 2016 and later: Unicode, Inc. and others.
6 .\" License & terms of use: http://www.unicode.org/copyright.html
7 .\" Copyright (C) 2002-2008 IBM, Inc. and others.
8 .\"
9 .\" Based on Yves Arrouye's pkgdata page <yves@arrouye.net>
10 .\" Modified by Steven R. Loomis <srl@jtcsv.com>.
11 .\" With help from http://www.igpm.rwth-aachen.de/~albrecht/manpage.html
12
13 .TH ICU-CONFIG 1 "17 May 2004" "ICU MANPAGE" "ICU @VERSION@ Manual"
14 .\".Dd "17 May 2004"
15 .\".Dt ICU-CONFIG 1
16 .\".Os
17
18 .SH NAME
19 .B icu-config
20 \- output ICU build options
21 .SH SYNOPSIS
22 .B icu-config
23 [
24 .BI "\-\-bindir"
25 ]
26 [
27 .BI "\-\-cc"
28 ]
29 [
30 .BI "\-\-cflags"
31 ]
32 [
33 .BI "\-\-cppflags"
34 ]
35 [
36 .BI "\-\-cppflags\-searchpath"
37 ]
38 [
39 .BI "\-\-cxx"
40 ]
41 [
42 .BI "\-\-cxxflags"
43 ]
44 [
45 .BI "\-\-detect\-prefix"
46 ]
47 [
48 .BI "\-\-exec\-prefix"
49 ]
50 [
51 .BI "\-\-exists"
52 ]
53 [
54 .BI "\-\-help\fP, \fB\-?\fP,\fB"
55 .BI "\-\-usage"
56 ]
57 [
58 .BI "\-\-icudata"
59 ]
60 [
61 .BI "\-\-icudata\-install\-dir"
62 ]
63 [
64 .BI "\-\-icudata\-mode"
65 ]
66 [
67 .BI "\-\-icudatadir"
68 ]
69 [
70 .BI "\-\-invoke"
71 ]
72 [
73 .BI "\-\-invoke=" "prog"
74 ]
75 [
76 .BI "\-\-ldflags"
77 ]
78 [
79 .BI "\-\-ldflags\-libsonly"
80 ]
81 [
82 .BI "\-\-ldflags\-searchpath"
83 ]
84 [
85 .BI "\-\-ldflags\-system"
86 ]
87 [
88 .BI "\-\-ldflags\-icuio"
89 ]
90 [
91 .BI "\-\-mandir"
92 ]
93 [
94 .BI "\-\-prefix"
95 ]
96 [
97 .BI "\-\-prefix=" "prefix"
98 ]
99 [
100 .BI "\-\-sbindir"
101 ]
102 [
103 .BI "\-\-shared\-datadir"
104 ]
105 [
106 .BI "\-\-sysconfdir"
107 ]
108 [
109 .BI "\-\-unicode\-version"
110 ]
111 [
112 .BI "\-\-version"
113 ]
114 [
115 .BI "\-\-incfile"
116 ]
117
118
119
120 .SH DESCRIPTION
121 .B icu-config
122 simplifies the task of building and linking against ICU as compared to
123 manually configuring user makefiles or equivalent. Because
124 .B icu-config
125 is an executable script, it also solves the problem of locating the ICU
126 libraries and headers, by allowing the system PATH to locate it.
127 .SH EXAMPLES
128 .B icu-config
129 can be used without a makefile. The command line below is sufficient for
130 building a single-file c++ program against ICU. (For example, \fBicu/source/samples/props/props.cpp\fR)
131 .PP
132 .RS
133 `icu-config --cxx --cxxflags --cppflags --ldflags` -o props props.cpp
134 .RE
135 .PP
136 More commonly,
137 .B icu-config
138 will be called from within a makefile, and used to set up variables. The
139 following example also builds the \fIprops\fR example.
140 .PP
141 .RS
142 CC=$(shell icu-config --cc)
143
144 CXX=$(shell icu-config --cxx)
145
146 CPPFLAGS=$(shell icu-config --cppflags)
147
148 CXXFLAGS=$(shell icu-config --cxxflags)
149
150 LDFLAGS =$(shell icu-config --ldflags)
151
152 all: props
153
154 props.o: props.cpp
155 .RE
156 .PP
157 make(1) will automatically use the above variables.
158 .SH OPTIONS
159 .TP
160 .BI "\-\-bindir"
161 Prints the binary (executable) directory path. Normally equivalent to 'bin'.
162 ICU user-executable applications and scripts are found here.
163 .TP
164 .BI "\-\-cc"
165 Print the C compiler used. Equivalent to the $(CC) Makefile variable.
166 .TP
167 .BI "\-\-cflags"
168 Print the C compiler flags. Equivalent to the $(CFLAGS) Makefile variable.
169 Does NOT include preprocessor directives such as include path or defined symbols. Examples include debugging (\-g) and optimization flags
170 .TP
171 .BI "\-\-cppflags"
172 Print the C preprocessor flags. Equivalent to the $(CPPFLAGS) Makefile variable. Examples are \-I include paths and \-D define directives.
173 .TP
174 .BI "\-\-cppflags\-searchpath"
175 Print the C preprocessor flags, as above but only \-I search paths.
176 .TP
177 .BI "\-\-cxx"
178 Print the C++ compiler. Equivalent to the $(CXX) Makefile variable.
179 .TP
180 .BI "\-\-cxxflags"
181 Print the C++ compiler flags. Equivalent to the $(CXXFLAGS) Makefile variable.
182 .TP
183 .BI "\-\-detect\-prefix"
184 If ICU has been moved from its installed location, prepending this flag to
185 other
186 .B icu-config
187 calls will attempt to locate ICU relative to where the
188 .B icu-config
189 script has been located. Can be used as a last-chance effort if the ICU
190 install has been damaged.
191 .TP
192 .BI "\-\-exec\-prefix"
193 Print the prefix used for executable program directories (such as bin, sbin, etc). Normally the same as the prefix.
194 .TP
195 .BI "\-\-exists"
196 Script will return with a successful (0) status if ICU seems to be installed
197 and located correctly, otherwise an error message and nonzero status will
198 be displayed.
199 .TP
200 .BI "\-\-help\fP, \fB\-?\fP,\fB\-\-usage"
201 Print a help and usage message.
202 .TP
203 .BI "\-\-icudata"
204 Print the \fIshortname\fP of the ICU data file. This does not include any suffix such as .dat, .dll, .so, .lib, .a, etc nor does it include prefixes such as 'lib'. It may be in the form \fBicudt21b\fP
205 .TP
206 .BI "\-\-icudata\-install\-dir"
207 Print the directory where ICU packaged data should
208 be installed. Can use as pkgdata(1)'s --install option.
209 .TP
210 .BI "\-\-icudata\-mode"
211 Print the default ICU pkgdata mode, such as dll or common. Can use as pkgdata(1)'s --mode option.
212 .TP
213 .BI "\-\-icudatadir"
214 Print the path to packaged archive data. (should be where $ICU_DATA
215 or equivalent default path points.) Will NOT point to the libdir.
216 .TP
217 .BI "\-\-invoke"
218 If ICU is not installed in a location where the operating system will locate
219 its shared libraries, this option will print out commands so as to set the
220 appropriate environment variables to load ICU's shared libraries. For example,
221 on many systems a variable named LD_LIBRARY_PATH or equivalent must be set.
222 .TP
223 .BI "\-\-invoke=" "prog"
224 Same as the \fB\-\-invoke\fP option, except includes options for invoking
225 a program named \fIprog\fP. If \fIprog\fP is the name of an ICU tool,
226 such as genrb(1), then \fBicu-config\fP will also include the full path
227 to that tool.
228 .TP
229 .BI "\-\-ldflags"
230 Print any flags which should be passed to the linker. These may include
231 -L for library search paths, and -l for including ICU libraries. By default,
232 this option will attempt to link in the "common" (libicuuc) and "i18n"
233 (libicui18n) libraries, as well as the data library. If additional libraries
234 are required, any of the following two flags may be added in conjunction with this one,
235 for example "\-\-ldflags \-\-ldflags-icuio" if the icuio library is required
236 in addition to the standard ICU libraries.
237 Equivalent to the $(LDFLAGS) Makefile variable.
238 .TP
239 .BI "\-\-ldflags\-layout"
240 Prints the link option for the ICU layout library.
241 .TP
242 .BI "\-\-ldflags\-icuio"
243 Prints the link option to add the ICU I/O package
244 .TP
245 .BI "\-\-ldflags\-libsonly"
246 Similar to \fI\-\-ldflags\fP but only includes the \-l options.
247 .TP
248 .BI "\-\-ldflags\-searchpath"
249 Similar to \fI\-\-ldflags\fP but only includes the \-L search path options.
250 .TP
251 .BI "\-\-ldflags\-system"
252 Similar to \fI\-\-ldflags\fP but only includes system libraries (such as pthreads)
253 .BI "\-\-mandir"
254 Prints the location of the installed ICU man pages. Normally (man)
255 .TP
256 .BI "\-\-prefix"
257 Prints the prefix (base directory) under which the installed ICU resides.
258 .TP
259 .BI "\-\-prefix=" "prefix"
260 Sets the ICU prefix to \fIprefix\fP for the remainder of this command line.
261 Does test whether the new prefix is valid.
262 .TP
263 .BI "\-\-sbindir"
264 Prints the location of ICU system binaries, normally (sbin)
265 .TP
266 .BI "\-\-shared\-datadir"
267 Prints the location of ICU shared data, normally (share)
268 .TP
269 .BI "\-\-sysconfdir"
270 Prints the location of ICU system configuration data, normally (etc)
271 .TP
272 .BI "\-\-unicode\-version"
273 Prints the Version of the Unicode Standard which the current ICU uses.
274 .TP
275 .BI "\-\-version"
276 Prints the current version of ICU.
277 .TP
278 .BI "\-\-incfile"
279 Prints the 'Makefile.inc' path, suitable for use with pkgdata(1)'s \-O option.
280 .PP
281 .SH AUTHORS
282 Steven Loomis
283 .SH VERSION
284 @VERSION@
285 .SH COPYRIGHT
286 Copyright (C) 2002-2004 IBM, Inc. and others.
287