]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/icu-config.1.in
ICU-64243.0.1.tar.gz
[apple/icu.git] / icuSources / config / icu-config.1.in
CommitLineData
b75a7d8f
A
1.\" Hey, Emacs! This is -*-nroff-*- you know...
2.\"
3.\" icu-config.1: manual page for the icu-config utility
4.\"
f3c0d7a5
A
5.\" Copyright (C) 2016 and later: Unicode, Inc. and others.
6.\" License & terms of use: http://www.unicode.org/copyright.html
46f4442e 7.\" Copyright (C) 2002-2008 IBM, Inc. and others.
b75a7d8f
A
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
374ca955
A
13.TH ICU-CONFIG 1 "17 May 2004" "ICU MANPAGE" "ICU @VERSION@ Manual"
14.\".Dd "17 May 2004"
b75a7d8f
A
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[
46f4442e 61.BI "\-\-icudata\-install\-dir"
b75a7d8f
A
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[
b75a7d8f
A
79.BI "\-\-ldflags\-libsonly"
80]
81[
82.BI "\-\-ldflags\-searchpath"
83]
84[
85.BI "\-\-ldflags\-system"
86]
87[
374ca955 88.BI "\-\-ldflags\-icuio"
b75a7d8f
A
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
122simplifies the task of building and linking against ICU as compared to
123manually configuring user makefiles or equivalent. Because
124.B icu-config
125is an executable script, it also solves the problem of locating the ICU
126libraries and headers, by allowing the system PATH to locate it.
127.SH EXAMPLES
128.B icu-config
129can be used without a makefile. The command line below is sufficient for
130building 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
136More commonly,
137.B icu-config
138will be called from within a makefile, and used to set up variables. The
139following example also builds the \fIprops\fR example.
140.PP
141.RS
142CC=$(shell icu-config --cc)
143
144CXX=$(shell icu-config --cxx)
145
146CPPFLAGS=$(shell icu-config --cppflags)
147
148CXXFLAGS=$(shell icu-config --cxxflags)
149
150LDFLAGS =$(shell icu-config --ldflags)
151
152all: props
153
154props.o: props.cpp
155.RE
156.PP
157make(1) will automatically use the above variables.
158.SH OPTIONS
159.TP
160.BI "\-\-bindir"
161Prints the binary (executable) directory path. Normally equivalent to 'bin'.
162ICU user-executable applications and scripts are found here.
163.TP
164.BI "\-\-cc"
165Print the C compiler used. Equivalent to the $(CC) Makefile variable.
166.TP
167.BI "\-\-cflags"
168Print the C compiler flags. Equivalent to the $(CFLAGS) Makefile variable.
169Does NOT include preprocessor directives such as include path or defined symbols. Examples include debugging (\-g) and optimization flags
170.TP
171.BI "\-\-cppflags"
172Print 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"
175Print the C preprocessor flags, as above but only \-I search paths.
176.TP
177.BI "\-\-cxx"
178Print the C++ compiler. Equivalent to the $(CXX) Makefile variable.
179.TP
180.BI "\-\-cxxflags"
181Print the C++ compiler flags. Equivalent to the $(CXXFLAGS) Makefile variable.
182.TP
183.BI "\-\-detect\-prefix"
184If ICU has been moved from its installed location, prepending this flag to
185other
186.B icu-config
187calls will attempt to locate ICU relative to where the
188.B icu-config
189script has been located. Can be used as a last-chance effort if the ICU
190install has been damaged.
191.TP
192.BI "\-\-exec\-prefix"
193Print the prefix used for executable program directories (such as bin, sbin, etc). Normally the same as the prefix.
194.TP
195.BI "\-\-exists"
196Script will return with a successful (0) status if ICU seems to be installed
197and located correctly, otherwise an error message and nonzero status will
198be displayed.
199.TP
200.BI "\-\-help\fP, \fB\-?\fP,\fB\-\-usage"
201Print a help and usage message.
202.TP
203.BI "\-\-icudata"
46f4442e 204Print 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
b75a7d8f 205.TP
46f4442e 206.BI "\-\-icudata\-install\-dir"
b75a7d8f
A
207Print the directory where ICU packaged data should
208be installed. Can use as pkgdata(1)'s --install option.
209.TP
210.BI "\-\-icudata\-mode"
211Print the default ICU pkgdata mode, such as dll or common. Can use as pkgdata(1)'s --mode option.
212.TP
213.BI "\-\-icudatadir"
214Print the path to packaged archive data. (should be where $ICU_DATA
215or equivalent default path points.) Will NOT point to the libdir.
216.TP
217.BI "\-\-invoke"
218If ICU is not installed in a location where the operating system will locate
219its shared libraries, this option will print out commands so as to set the
220appropriate environment variables to load ICU's shared libraries. For example,
221on many systems a variable named LD_LIBRARY_PATH or equivalent must be set.
222.TP
223.BI "\-\-invoke=" "prog"
224Same as the \fB\-\-invoke\fP option, except includes options for invoking
225a program named \fIprog\fP. If \fIprog\fP is the name of an ICU tool,
226such as genrb(1), then \fBicu-config\fP will also include the full path
227to that tool.
228.TP
229.BI "\-\-ldflags"
230Print 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,
232this option will attempt to link in the "common" (libicuuc) and "i18n"
233(libicui18n) libraries, as well as the data library. If additional libraries
234are required, any of the following two flags may be added in conjunction with this one,
374ca955 235for example "\-\-ldflags \-\-ldflags-icuio" if the icuio library is required
b75a7d8f
A
236in addition to the standard ICU libraries.
237Equivalent to the $(LDFLAGS) Makefile variable.
238.TP
239.BI "\-\-ldflags\-layout"
240Prints the link option for the ICU layout library.
241.TP
374ca955
A
242.BI "\-\-ldflags\-icuio"
243Prints the link option to add the ICU I/O package
b75a7d8f
A
244.TP
245.BI "\-\-ldflags\-libsonly"
246Similar to \fI\-\-ldflags\fP but only includes the \-l options.
247.TP
248.BI "\-\-ldflags\-searchpath"
249Similar to \fI\-\-ldflags\fP but only includes the \-L search path options.
250.TP
251.BI "\-\-ldflags\-system"
252Similar to \fI\-\-ldflags\fP but only includes system libraries (such as pthreads)
253.BI "\-\-mandir"
254Prints the location of the installed ICU man pages. Normally (man)
255.TP
256.BI "\-\-prefix"
257Prints the prefix (base directory) under which the installed ICU resides.
258.TP
259.BI "\-\-prefix=" "prefix"
260Sets the ICU prefix to \fIprefix\fP for the remainder of this command line.
261Does test whether the new prefix is valid.
262.TP
263.BI "\-\-sbindir"
264Prints the location of ICU system binaries, normally (sbin)
265.TP
266.BI "\-\-shared\-datadir"
267Prints the location of ICU shared data, normally (share)
268.TP
269.BI "\-\-sysconfdir"
270Prints the location of ICU system configuration data, normally (etc)
271.TP
272.BI "\-\-unicode\-version"
273Prints the Version of the Unicode Standard which the current ICU uses.
274.TP
275.BI "\-\-version"
276Prints the current version of ICU.
277.TP
278.BI "\-\-incfile"
279Prints the 'Makefile.inc' path, suitable for use with pkgdata(1)'s \-O option.
280.PP
281.SH AUTHORS
282Steven Loomis
283.SH VERSION
284@VERSION@
285.SH COPYRIGHT
374ca955 286Copyright (C) 2002-2004 IBM, Inc. and others.
b75a7d8f 287