resetting manifest requested domain to floor
[platform/upstream/libunistring.git] / INSTALL
1 Installation Instructions
2 *************************
3
4 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5 2006, 2007, 2008 Free Software Foundation, Inc.
6
7    This file is free documentation; the Free Software Foundation gives
8 unlimited permission to copy, distribute and modify it.
9
10 Prerequisites 
11 =============
12
13    This package depends on a few other packages.  They are listed in
14 the file ‘DEPENDENCIES’.  It is recommended to install the listed
15 packages before installing this package.
16
17 Basic Installation
18 ==================
19
20    Briefly, the shell commands ‘./configure; make; make install’ should
21 configure, build, and install this package.  The following
22 more-detailed instructions are generic; see the ‘README’ file for
23 instructions specific to this package.
24
25    The ‘configure’ shell script attempts to guess correct values for
26 various system-dependent variables used during compilation.  It uses
27 those values to create a ‘Makefile’ in each directory of the package.
28 It may also create one or more ‘.h’ files containing system-dependent
29 definitions.  Finally, it creates a shell script ‘config.status’ that
30 you can run in the future to recreate the current configuration, and a
31 file ‘config.log’ containing compiler output (useful mainly for
32 debugging ‘configure’).
33
34    It can also use an optional file (typically called ‘config.cache’
35 and enabled with ‘--cache-file=config.cache’ or simply ‘-C’) that saves
36 the results of its tests to speed up reconfiguring.  Caching is
37 disabled by default to prevent problems with accidental use of stale
38 cache files.
39
40    If you need to do unusual things to compile the package, please try
41 to figure out how ‘configure’ could check whether to do them, and mail
42 diffs or instructions to the address given in the ‘README’ so they can
43 be considered for the next release.  If you are using the cache, and at
44 some point ‘config.cache’ contains results you don't want to keep, you
45 may remove or edit it.
46
47    The file ‘configure.ac’ (or ‘configure.in’) is used to create
48 ‘configure’ by a program called ‘autoconf’.  You need ‘configure.ac’ if
49 you want to change it or regenerate ‘configure’ using a newer version
50 of ‘autoconf’.
51
52 The simplest way to compile this package is:
53
54   1. ‘cd’ to the directory containing the package's source code and type
55      ‘./configure’ to configure the package for your system.
56
57      Running ‘configure’ might take a while.  While running, it prints
58      some messages telling which features it is checking for.
59
60   2. Type ‘make’ to compile the package.
61
62   3. Optionally, type ‘make check’ to run any self-tests that come with
63      the package.
64
65   4. Type ‘make install’ to install the programs and any data files and
66      documentation.
67
68   5. You can remove the program binaries and object files from the
69      source code directory by typing ‘make clean’.  To also remove the
70      files that ‘configure’ created (so you can compile the package for
71      a different kind of computer), type ‘make distclean’.  There is
72      also a ‘make maintainer-clean’ target, but that is intended mainly
73      for the package's developers.  If you use it, you may have to get
74      all sorts of other programs in order to regenerate files that came
75      with the distribution.
76
77   6. Often, you can also type ‘make uninstall’ to remove the installed
78      files again.
79
80 Compilers and Options
81 =====================
82
83    Some systems require unusual options for compilation or linking that
84 the ‘configure’ script does not know about.  Run ‘./configure --help’
85 for details on some of the pertinent environment variables.
86
87    You can give ‘configure’ initial values for configuration parameters
88 by setting variables in the command line or in the environment.  Here
89 is an example:
90
91      ./configure CC=c99 CFLAGS=-g LIBS=-lposix
92
93    *Note Defining Variables::, for more details.
94
95 Compiling For Multiple Architectures
96 ====================================
97
98    You can compile the package for more than one kind of computer at the
99 same time, by placing the object files for each architecture in their
100 own directory.  To do this, you can use GNU ‘make’.  ‘cd’ to the
101 directory where you want the object files and executables to go and run
102 the ‘configure’ script.  ‘configure’ automatically checks for the
103 source code in the directory that ‘configure’ is in and in ‘..’.
104
105    With a non-GNU ‘make’, it is safer to compile the package for one
106 architecture at a time in the source code directory.  After you have
107 installed the package for one architecture, use ‘make distclean’ before
108 reconfiguring for another architecture.
109
110    On MacOS X 10.5 and later systems, you can create libraries and
111 executables that work on multiple system types--known as "fat" or
112 "universal" binaries--by specifying multiple ‘-arch’ options to the
113 compiler but only a single ‘-arch’ option to the preprocessor.  Like
114 this:
115
116      ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
117                  CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
118                  CPP="gcc -E" CXXCPP="g++ -E" \
119                  --disable-dependency-tracking
120
121    This is not guaranteed to produce working output in all cases.  You
122 may have to build one architecture at a time and combine the results
123 using the ‘lipo’ tool if you have problems.
124
125 Installation Names
126 ==================
127
128    By default, ‘make install’ installs the package's commands under
129 ‘/usr/local/bin’, include files under ‘/usr/local/include’, etc.  You
130 can specify an installation prefix other than ‘/usr/local’ by giving
131 ‘configure’ the option ‘--prefix=PREFIX’.
132
133    You can specify separate installation prefixes for
134 architecture-specific files and architecture-independent files.  If you
135 pass the option ‘--exec-prefix=PREFIX’ to ‘configure’, the package uses
136 PREFIX as the prefix for installing programs and libraries.
137 Documentation and other data files still use the regular prefix.
138
139    In addition, if you use an unusual directory layout you can give
140 options like ‘--bindir=DIR’ to specify different values for particular
141 kinds of files.  Run ‘configure --help’ for a list of the directories
142 you can set and what kinds of files go in them.
143
144    If the package supports it, you can cause programs to be installed
145 with an extra prefix or suffix on their names by giving ‘configure’ the
146 option ‘--program-prefix=PREFIX’ or ‘--program-suffix=SUFFIX’.
147
148 Optional Features
149 =================
150
151    Some packages pay attention to ‘--enable-FEATURE’ options to
152 ‘configure’, where FEATURE indicates an optional part of the package.
153 They may also pay attention to ‘--with-PACKAGE’ options, where PACKAGE
154 is something like ‘gnu-as’ or ‘x’ (for the X Window System).  The
155 ‘README’ should mention any ‘--enable-’ and ‘--with-’ options that the
156 package recognizes.
157
158    For packages that use the X Window System, ‘configure’ can usually
159 find the X include and library files automatically, but if it doesn't,
160 you can use the ‘configure’ options ‘--x-includes=DIR’ and
161 ‘--x-libraries=DIR’ to specify their locations.
162
163    For packages that use the GNU libiconv library, you can use the
164 ‘configure’ option ‘--with-libiconv-prefix’ to specify the prefix you
165 used while installing GNU libiconv.  This option is not necessary if
166 that other prefix is the same as the one now specified through --prefix.
167
168 Particular systems
169 ==================
170
171    On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
172 CC is not installed, it is recommended to use the following options in
173 order to use an ANSI C compiler:
174
175      ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
176
177 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
178
179    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
180 parse its ‘<wchar.h>’ header file.  The option ‘-nodtk’ can be used as
181 a workaround.  If GNU CC is not installed, it is therefore recommended
182 to try
183
184      ./configure CC="cc"
185
186 and if that doesn't work, try
187
188      ./configure CC="cc -nodtk"
189
190    On Solaris, don't put ‘/usr/ucb’ early in your ‘PATH’.  This
191 directory contains several dysfunctional programs; working variants of
192 these programs are available in ‘/usr/bin’.  So, if you need ‘/usr/ucb’
193 in your ‘PATH’, put it _after_ ‘/usr/bin’.
194
195    On Haiku, software installed for all users goes in ‘/boot/common’,
196 not ‘/usr/local’.  It is recommended to use the following options:
197
198      ./configure --prefix=/boot/common
199
200 Specifying the System Type
201 ==========================
202
203    There may be some features ‘configure’ cannot figure out
204 automatically, but needs to determine by the type of machine the package
205 will run on.  Usually, assuming the package is built to be run on the
206 _same_ architectures, ‘configure’ can figure that out, but if it prints
207 a message saying it cannot guess the machine type, give it the
208 ‘--build=TYPE’ option.  TYPE can either be a short name for the system
209 type, such as ‘sun4’, or a canonical name which has the form:
210
211      CPU-COMPANY-SYSTEM
212
213 where SYSTEM can have one of these forms:
214
215      OS KERNEL-OS
216
217    See the file ‘config.sub’ for the possible values of each field.  If
218 ‘config.sub’ isn't included in this package, then this package doesn't
219 need to know the machine type.
220
221    If you are _building_ compiler tools for cross-compiling, you should
222 use the option ‘--target=TYPE’ to select the type of system they will
223 produce code for.
224
225    If you want to _use_ a cross compiler, that generates code for a
226 platform different from the build platform, you should specify the
227 "host" platform (i.e., that on which the generated programs will
228 eventually be run) with ‘--host=TYPE’.
229
230 Sharing Defaults
231 ================
232
233    If you want to set default values for ‘configure’ scripts to share,
234 you can create a site shell script called ‘config.site’ that gives
235 default values for variables like ‘CC’, ‘cache_file’, and ‘prefix’.
236 ‘configure’ looks for ‘PREFIX/share/config.site’ if it exists, then
237 ‘PREFIX/etc/config.site’ if it exists.  Or, you can set the
238 ‘CONFIG_SITE’ environment variable to the location of the site script.
239 A warning: not all ‘configure’ scripts look for a site script.
240
241 Defining Variables
242 ==================
243
244    Variables not defined in a site shell script can be set in the
245 environment passed to ‘configure’.  However, some packages may run
246 configure again during the build, and the customized values of these
247 variables may be lost.  In order to avoid this problem, you should set
248 them in the ‘configure’ command line, using ‘VAR=value’.  For example:
249
250      ./configure CC=/usr/local2/bin/gcc
251
252 causes the specified ‘gcc’ to be used as the C compiler (unless it is
253 overridden in the site shell script).
254
255 Unfortunately, this technique does not work for ‘CONFIG_SHELL’ due to
256 an Autoconf bug.  Until the bug is fixed you can use this workaround:
257
258      CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
259
260 ‘configure’ Invocation
261 ======================
262
263    ‘configure’ recognizes the following options to control how it
264 operates.
265
266 ‘--help’
267 ‘-h’
268      Print a summary of all of the options to ‘configure’, and exit.
269
270 ‘--help=short’
271 ‘--help=recursive’
272      Print a summary of the options unique to this package's
273      ‘configure’, and exit.  The ‘short’ variant lists options used
274      only in the top level, while the ‘recursive’ variant lists options
275      also present in any nested packages.
276
277 ‘--version’
278 ‘-V’
279      Print the version of Autoconf used to generate the ‘configure’
280      script, and exit.
281
282 ‘--cache-file=FILE’
283      Enable the cache: use and save the results of the tests in FILE,
284      traditionally ‘config.cache’.  FILE defaults to ‘/dev/null’ to
285      disable caching.
286
287 ‘--config-cache’
288 ‘-C’
289      Alias for ‘--cache-file=config.cache’.
290
291 ‘--quiet’
292 ‘--silent’
293 ‘-q’
294      Do not print messages saying which checks are being made.  To
295      suppress all normal output, redirect it to ‘/dev/null’ (any error
296      messages will still be shown).
297
298 ‘--srcdir=DIR’
299      Look for the package's source code in directory DIR.  Usually
300      ‘configure’ can determine that directory automatically.
301
302 ‘--prefix=DIR’
303      Use DIR as the installation prefix.  *note Installation Names::
304      for more details, including other options available for fine-tuning
305      the installation locations.
306
307 ‘--no-create’
308 ‘-n’
309      Run the configure checks, but stop before creating any output
310      files.
311
312 ‘configure’ also accepts some other, not widely useful, options.  Run
313 ‘configure --help’ for more details.
314