1 .\" Hey, Emacs! This is -*-nroff-*- you know...
3 .\" icu-config.1: manual page for the icu-config utility
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.
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
13 .TH ICU-CONFIG 1 "17 May 2004" "ICU MANPAGE" "ICU @VERSION@ Manual"
20 \- output ICU build options
36 .BI "\-\-cppflags\-searchpath"
45 .BI "\-\-detect\-prefix"
48 .BI "\-\-exec\-prefix"
54 .BI "\-\-help\fP, \fB\-?\fP,\fB"
61 .BI "\-\-icudata\-install\-dir"
64 .BI "\-\-icudata\-mode"
73 .BI "\-\-invoke=" "prog"
79 .BI "\-\-ldflags\-libsonly"
82 .BI "\-\-ldflags\-searchpath"
85 .BI "\-\-ldflags\-system"
88 .BI "\-\-ldflags\-icuio"
97 .BI "\-\-prefix=" "prefix"
103 .BI "\-\-shared\-datadir"
109 .BI "\-\-unicode\-version"
122 simplifies the task of building and linking against ICU as compared to
123 manually configuring user makefiles or equivalent. Because
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.
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)
133 `icu-config --cxx --cxxflags --cppflags --ldflags` -o props props.cpp
138 will be called from within a makefile, and used to set up variables. The
139 following example also builds the \fIprops\fR example.
142 CC=$(shell icu-config --cc)
144 CXX=$(shell icu-config --cxx)
146 CPPFLAGS=$(shell icu-config --cppflags)
148 CXXFLAGS=$(shell icu-config --cxxflags)
150 LDFLAGS =$(shell icu-config --ldflags)
157 make(1) will automatically use the above variables.
161 Prints the binary (executable) directory path. Normally equivalent to 'bin'.
162 ICU user-executable applications and scripts are found here.
165 Print the C compiler used. Equivalent to the $(CC) Makefile variable.
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
172 Print the C preprocessor flags. Equivalent to the $(CPPFLAGS) Makefile variable. Examples are \-I include paths and \-D define directives.
174 .BI "\-\-cppflags\-searchpath"
175 Print the C preprocessor flags, as above but only \-I search paths.
178 Print the C++ compiler. Equivalent to the $(CXX) Makefile variable.
181 Print the C++ compiler flags. Equivalent to the $(CXXFLAGS) Makefile variable.
183 .BI "\-\-detect\-prefix"
184 If ICU has been moved from its installed location, prepending this flag to
187 calls will attempt to locate ICU relative to where the
189 script has been located. Can be used as a last-chance effort if the ICU
190 install has been damaged.
192 .BI "\-\-exec\-prefix"
193 Print the prefix used for executable program directories (such as bin, sbin, etc). Normally the same as the prefix.
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
200 .BI "\-\-help\fP, \fB\-?\fP,\fB\-\-usage"
201 Print a help and usage message.
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
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.
210 .BI "\-\-icudata\-mode"
211 Print the default ICU pkgdata mode, such as dll or common. Can use as pkgdata(1)'s --mode option.
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.
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.
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
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.
239 .BI "\-\-ldflags\-layout"
240 Prints the link option for the ICU layout library.
242 .BI "\-\-ldflags\-icuio"
243 Prints the link option to add the ICU I/O package
245 .BI "\-\-ldflags\-libsonly"
246 Similar to \fI\-\-ldflags\fP but only includes the \-l options.
248 .BI "\-\-ldflags\-searchpath"
249 Similar to \fI\-\-ldflags\fP but only includes the \-L search path options.
251 .BI "\-\-ldflags\-system"
252 Similar to \fI\-\-ldflags\fP but only includes system libraries (such as pthreads)
254 Prints the location of the installed ICU man pages. Normally (man)
257 Prints the prefix (base directory) under which the installed ICU resides.
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.
264 Prints the location of ICU system binaries, normally (sbin)
266 .BI "\-\-shared\-datadir"
267 Prints the location of ICU shared data, normally (share)
270 Prints the location of ICU system configuration data, normally (etc)
272 .BI "\-\-unicode\-version"
273 Prints the Version of the Unicode Standard which the current ICU uses.
276 Prints the current version of ICU.
279 Prints the 'Makefile.inc' path, suitable for use with pkgdata(1)'s \-O option.
286 Copyright (C) 2002-2004 IBM, Inc. and others.