1
2ICU-CONFIG(1)                   ICU 69.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-libsonly ] [ --ld‐
15       flags-searchpath ] [ --ldflags-system ] [ --ldflags-icuio ] [  --mandir
16       ] [ --prefix ] [ --prefix=prefix ] [ --sbindir ] [ --shared-datadir ] [
17       --sysconfdir ] [ --unicode-version ] [ --version ] [ --incfile ]
18
19
20
21

DESCRIPTION

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

EXAMPLES

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

OPTIONS

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

AUTHORS

197       Steven Loomis
198

VERSION

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