1
2ICU-CONFIG(1)                  ICU 4.2.1 Manual                  ICU-CONFIG(1)
3
4
5

NAME

7       icu-config - output ICU build options
8

SYNOPSIS

10       icu-config  [  --bindir  ]  [  --cc  ]  [  --cflags  ] [ --cppflags ] [
11       --cppflags-searchpath ] [ --cxx ] [ --cxxflags ] [ --detect-prefix ]  [
12       --exec-prefix  ]  [  --exists ] [ --help, -?, --usage ] [ --icudata ] [
13       --icudata-install-dir ] [ --icudata-mode ] [ --icudatadir ] [  --invoke
14       ] [ --invoke=prog ] [ --ldflags ] [ --ldflags-layout ] [ --ldflags-lib‐
15       sonly ] [ --ldflags-searchpath ] [ --ldflags-system ] [ --ldflags-icuio
16       ]  [  --mandir  ]  [  --prefix  ]  [  --prefix=prefix ] [ --sbindir ] [
17       --shared-datadir ] [ --sysconfdir ] [ --unicode-version ] [ --version ]
18       [ --incfile ]
19
20
21
22

DESCRIPTION

24       icu-config  simplifies  the task of building and linking against ICU as
25       compared to manually configuring user makefiles or equivalent.  Because
26       icu-config  is  an  executable  script,  it  also solves the problem of
27       locating the ICU libraries and headers, by allowing the system PATH  to
28       locate it.
29

EXAMPLES

31       icu-config  can  be  used without a makefile. The command line below is
32       sufficient for building a single-file c++  program  against  ICU.  (For
33       example, icu/source/samples/props/props.cpp)
34
35              `icu-config  --cxx  --cxxflags  --cppflags  --ldflags`  -o props
36              props.cpp
37
38       More commonly, icu-config will be called from within  a  makefile,  and
39       used  to  set up variables. The following example also builds the props
40       example.
41
42              CC=$(shell icu-config --cc)
43
44              CXX=$(shell icu-config --cxx)
45
46              CPPFLAGS=$(shell icu-config --cppflags)
47
48              CXXFLAGS=$(shell icu-config --cxxflags)
49
50              LDFLAGS =$(shell icu-config --ldflags)
51
52              all: props
53
54              props.o: props.cpp
55
56       make(1) will automatically use the above variables.
57

OPTIONS

59       --bindir
60              Prints the binary (executable) directory path. Normally  equiva‐
61              lent to 'bin'.  ICU user-executable applications and scripts are
62              found here.
63
64       --cc   Print the C compiler used.  Equivalent  to  the  $(CC)  Makefile
65              variable.
66
67       --cflags
68              Print the C compiler flags. Equivalent to the $(CFLAGS) Makefile
69              variable.  Does NOT  include  preprocessor  directives  such  as
70              include path or defined symbols. Examples include debugging (-g)
71              and optimization flags
72
73       --cppflags
74              Print the C preprocessor flags. Equivalent  to  the  $(CPPFLAGS)
75              Makefile  variable. Examples are -I include paths  and -D define
76              directives.
77
78       --cppflags-searchpath
79              Print the C preprocessor flags, as  above  but  only  -I  search
80              paths.
81
82       --cxx  Print  the C++ compiler. Equivalent to the $(CXX) Makefile vari‐
83              able.
84
85       --cxxflags
86              Print the C++ compiler  flags.  Equivalent  to  the  $(CXXFLAGS)
87              Makefile variable.
88
89       --detect-prefix
90              If  ICU  has  been moved from its installed location, prepending
91              this flag to other icu-config calls will attempt to  locate  ICU
92              relative to where the icu-config script has been located. Can be
93              used as a last-chance effort if the ICU install  has  been  dam‐
94              aged.
95
96       --exec-prefix
97              Print  the  prefix used for executable program directories (such
98              as bin, sbin, etc). Normally the same as the prefix.
99
100       --exists
101              Script will return with a successful (0) status if ICU seems  to
102              be  installed  and located correctly, otherwise an error message
103              and nonzero status will be displayed.
104
105       --help, -?,--usage
106              Print a help and usage message.
107
108       --icudata
109              Print the shortname of the ICU data file. This does not  include
110              any  suffix  such  as .dat, .dll, .so, .lib, .a, etc nor does it
111              include prefixes such as 'lib'.  It may be in the form icudt21b
112
113       --icudata-install-dir
114              Print the directory where ICU packaged data should be installed.
115              Can use as pkgdata(1)'s --install option.
116
117       --icudata-mode
118              Print  the default ICU pkgdata mode, such as dll or common.  Can
119              use as pkgdata(1)'s --mode option.
120
121       --icudatadir
122              Print the path to  packaged  archive  data.   (should  be  where
123              $ICU_DATA or equivalent default path points.)  Will NOT point to
124              the libdir.
125
126       --invoke
127              If ICU is not installed in a location where the operating system
128              will  locate  its  shared  libraries, this option will print out
129              commands so as to set the appropriate environment  variables  to
130              load  ICU's  shared  libraries.  For  example, on many systems a
131              variable named LD_LIBRARY_PATH or equivalent must be set.
132
133       --invoke=prog
134              Same as the --invoke option, except includes options for  invok‐
135              ing  a  program named prog.  If prog is the name of an ICU tool,
136              such as genrb(1), then icu-config will  also  include  the  full
137              path to that tool.
138
139       --ldflags
140              Print  any flags which should be passed to the linker. These may
141              include -L for library search paths, and -l  for  including  ICU
142              libraries.  By  default, this option will attempt to link in the
143              "common" (libicuuc) and "i18n" (libicui18n) libraries,  as  well
144              as  the  data library. If additional libraries are required, any
145              of the following two flags may be added in conjunction with this
146              one,  for  example  "--ldflags  --ldflags-icuio"  if  the  icuio
147              library is required in addition to the standard  ICU  libraries.
148              Equivalent to the $(LDFLAGS) Makefile variable.
149
150       --ldflags-layout
151              Prints the link option for the ICU layout library.
152
153       --ldflags-icuio
154              Prints the link option to add the ICU I/O package
155
156       --ldflags-libsonly
157              Similar to --ldflags but only includes the -l options.
158
159       --ldflags-searchpath
160              Similar  to  --ldflags  but  only  includes  the  -L search path
161              options.
162
163       --ldflags-system
164              Similar to --ldflags but only includes system libraries (such as
165              pthreads)  --mandir Prints the location of the installed ICU man
166              pages. Normally (man)
167
168       --prefix
169              Prints the prefix (base directory) under which the installed ICU
170              resides.
171
172       --prefix=prefix
173              Sets  the ICU prefix to prefix for the remainder of this command
174              line.  Does test whether the new prefix is valid.
175
176       --sbindir
177              Prints the location of ICU system binaries, normally (sbin)
178
179       --shared-datadir
180              Prints the location of ICU shared data, normally (share)
181
182       --sysconfdir
183              Prints the location of ICU system configuration  data,  normally
184              (etc)
185
186       --unicode-version
187              Prints the Version of the Unicode Standard which the current ICU
188              uses.
189
190       --version
191              Prints the current version of ICU.
192
193       --incfile
194              Prints the 'Makefile.inc'  path,  suitable  for  use  with  pkg‐
195              data(1)'s -O option.
196

AUTHORS

198       Steven Loomis
199

VERSION

201       4.2.1
202
204       Copyright (C) 2002-2004 IBM, Inc. and others.
205
206
207
208
209ICU MANPAGE                       17 May 2004                    ICU-CONFIG(1)
Impressum