INSTALL revision 111ba1da
1d5d8cc55SmrgInstallation Instructions
2d5d8cc55Smrg*************************
3d5d8cc55Smrg
4111ba1daSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5111ba1daSmrgInc.
6d5d8cc55Smrg
7111ba1daSmrg   Copying and distribution of this file, with or without modification,
8111ba1daSmrgare permitted in any medium without royalty provided the copyright
9111ba1daSmrgnotice and this notice are preserved.  This file is offered as-is,
10111ba1daSmrgwithout warranty of any kind.
11d5d8cc55Smrg
12d5d8cc55SmrgBasic Installation
13d5d8cc55Smrg==================
14d5d8cc55Smrg
15d5d8cc55Smrg   Briefly, the shell commands `./configure; make; make install' should
16d5d8cc55Smrgconfigure, build, and install this package.  The following
17d5d8cc55Smrgmore-detailed instructions are generic; see the `README' file for
18111ba1daSmrginstructions specific to this package.  Some packages provide this
19111ba1daSmrg`INSTALL' file but do not implement all of the features documented
20111ba1daSmrgbelow.  The lack of an optional feature in a given package is not
21111ba1daSmrgnecessarily a bug.  More recommendations for GNU packages can be found
22111ba1daSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23d5d8cc55Smrg
24d5d8cc55Smrg   The `configure' shell script attempts to guess correct values for
25d5d8cc55Smrgvarious system-dependent variables used during compilation.  It uses
26d5d8cc55Smrgthose values to create a `Makefile' in each directory of the package.
27d5d8cc55SmrgIt may also create one or more `.h' files containing system-dependent
28d5d8cc55Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29d5d8cc55Smrgyou can run in the future to recreate the current configuration, and a
30d5d8cc55Smrgfile `config.log' containing compiler output (useful mainly for
31d5d8cc55Smrgdebugging `configure').
32d5d8cc55Smrg
33d5d8cc55Smrg   It can also use an optional file (typically called `config.cache'
34d5d8cc55Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35d5d8cc55Smrgthe results of its tests to speed up reconfiguring.  Caching is
36d5d8cc55Smrgdisabled by default to prevent problems with accidental use of stale
37d5d8cc55Smrgcache files.
38d5d8cc55Smrg
39d5d8cc55Smrg   If you need to do unusual things to compile the package, please try
40d5d8cc55Smrgto figure out how `configure' could check whether to do them, and mail
41d5d8cc55Smrgdiffs or instructions to the address given in the `README' so they can
42d5d8cc55Smrgbe considered for the next release.  If you are using the cache, and at
43d5d8cc55Smrgsome point `config.cache' contains results you don't want to keep, you
44d5d8cc55Smrgmay remove or edit it.
45d5d8cc55Smrg
46d5d8cc55Smrg   The file `configure.ac' (or `configure.in') is used to create
47d5d8cc55Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48d5d8cc55Smrgyou want to change it or regenerate `configure' using a newer version
49d5d8cc55Smrgof `autoconf'.
50d5d8cc55Smrg
51111ba1daSmrg   The simplest way to compile this package is:
52d5d8cc55Smrg
53d5d8cc55Smrg  1. `cd' to the directory containing the package's source code and type
54d5d8cc55Smrg     `./configure' to configure the package for your system.
55d5d8cc55Smrg
56d5d8cc55Smrg     Running `configure' might take a while.  While running, it prints
57d5d8cc55Smrg     some messages telling which features it is checking for.
58d5d8cc55Smrg
59d5d8cc55Smrg  2. Type `make' to compile the package.
60d5d8cc55Smrg
61d5d8cc55Smrg  3. Optionally, type `make check' to run any self-tests that come with
62111ba1daSmrg     the package, generally using the just-built uninstalled binaries.
63d5d8cc55Smrg
64d5d8cc55Smrg  4. Type `make install' to install the programs and any data files and
65111ba1daSmrg     documentation.  When installing into a prefix owned by root, it is
66111ba1daSmrg     recommended that the package be configured and built as a regular
67111ba1daSmrg     user, and only the `make install' phase executed with root
68111ba1daSmrg     privileges.
69111ba1daSmrg
70111ba1daSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71111ba1daSmrg     this time using the binaries in their final installed location.
72111ba1daSmrg     This target does not install anything.  Running this target as a
73111ba1daSmrg     regular user, particularly if the prior `make install' required
74111ba1daSmrg     root privileges, verifies that the installation completed
75111ba1daSmrg     correctly.
76111ba1daSmrg
77111ba1daSmrg  6. You can remove the program binaries and object files from the
78d5d8cc55Smrg     source code directory by typing `make clean'.  To also remove the
79d5d8cc55Smrg     files that `configure' created (so you can compile the package for
80d5d8cc55Smrg     a different kind of computer), type `make distclean'.  There is
81d5d8cc55Smrg     also a `make maintainer-clean' target, but that is intended mainly
82d5d8cc55Smrg     for the package's developers.  If you use it, you may have to get
83d5d8cc55Smrg     all sorts of other programs in order to regenerate files that came
84d5d8cc55Smrg     with the distribution.
85d5d8cc55Smrg
86111ba1daSmrg  7. Often, you can also type `make uninstall' to remove the installed
87111ba1daSmrg     files again.  In practice, not all packages have tested that
88111ba1daSmrg     uninstallation works correctly, even though it is required by the
89111ba1daSmrg     GNU Coding Standards.
90111ba1daSmrg
91111ba1daSmrg  8. Some packages, particularly those that use Automake, provide `make
92111ba1daSmrg     distcheck', which can by used by developers to test that all other
93111ba1daSmrg     targets like `make install' and `make uninstall' work correctly.
94111ba1daSmrg     This target is generally not run by end users.
95d5d8cc55Smrg
96d5d8cc55SmrgCompilers and Options
97d5d8cc55Smrg=====================
98d5d8cc55Smrg
99d5d8cc55Smrg   Some systems require unusual options for compilation or linking that
100d5d8cc55Smrgthe `configure' script does not know about.  Run `./configure --help'
101d5d8cc55Smrgfor details on some of the pertinent environment variables.
102d5d8cc55Smrg
103d5d8cc55Smrg   You can give `configure' initial values for configuration parameters
104d5d8cc55Smrgby setting variables in the command line or in the environment.  Here
105d5d8cc55Smrgis an example:
106d5d8cc55Smrg
107d5d8cc55Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108d5d8cc55Smrg
109d5d8cc55Smrg   *Note Defining Variables::, for more details.
110d5d8cc55Smrg
111d5d8cc55SmrgCompiling For Multiple Architectures
112d5d8cc55Smrg====================================
113d5d8cc55Smrg
114d5d8cc55Smrg   You can compile the package for more than one kind of computer at the
115d5d8cc55Smrgsame time, by placing the object files for each architecture in their
116d5d8cc55Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117d5d8cc55Smrgdirectory where you want the object files and executables to go and run
118d5d8cc55Smrgthe `configure' script.  `configure' automatically checks for the
119111ba1daSmrgsource code in the directory that `configure' is in and in `..'.  This
120111ba1daSmrgis known as a "VPATH" build.
121d5d8cc55Smrg
122d5d8cc55Smrg   With a non-GNU `make', it is safer to compile the package for one
123d5d8cc55Smrgarchitecture at a time in the source code directory.  After you have
124d5d8cc55Smrginstalled the package for one architecture, use `make distclean' before
125d5d8cc55Smrgreconfiguring for another architecture.
126d5d8cc55Smrg
127d5d8cc55Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128d5d8cc55Smrgexecutables that work on multiple system types--known as "fat" or
129d5d8cc55Smrg"universal" binaries--by specifying multiple `-arch' options to the
130d5d8cc55Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131d5d8cc55Smrgthis:
132d5d8cc55Smrg
133d5d8cc55Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134d5d8cc55Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135d5d8cc55Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136d5d8cc55Smrg
137d5d8cc55Smrg   This is not guaranteed to produce working output in all cases, you
138d5d8cc55Smrgmay have to build one architecture at a time and combine the results
139d5d8cc55Smrgusing the `lipo' tool if you have problems.
140d5d8cc55Smrg
141d5d8cc55SmrgInstallation Names
142d5d8cc55Smrg==================
143d5d8cc55Smrg
144d5d8cc55Smrg   By default, `make install' installs the package's commands under
145d5d8cc55Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146d5d8cc55Smrgcan specify an installation prefix other than `/usr/local' by giving
147111ba1daSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148111ba1daSmrgabsolute file name.
149d5d8cc55Smrg
150d5d8cc55Smrg   You can specify separate installation prefixes for
151d5d8cc55Smrgarchitecture-specific files and architecture-independent files.  If you
152d5d8cc55Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153d5d8cc55SmrgPREFIX as the prefix for installing programs and libraries.
154d5d8cc55SmrgDocumentation and other data files still use the regular prefix.
155d5d8cc55Smrg
156d5d8cc55Smrg   In addition, if you use an unusual directory layout you can give
157d5d8cc55Smrgoptions like `--bindir=DIR' to specify different values for particular
158d5d8cc55Smrgkinds of files.  Run `configure --help' for a list of the directories
159111ba1daSmrgyou can set and what kinds of files go in them.  In general, the
160111ba1daSmrgdefault for these options is expressed in terms of `${prefix}', so that
161111ba1daSmrgspecifying just `--prefix' will affect all of the other directory
162111ba1daSmrgspecifications that were not explicitly provided.
163111ba1daSmrg
164111ba1daSmrg   The most portable way to affect installation locations is to pass the
165111ba1daSmrgcorrect locations to `configure'; however, many packages provide one or
166111ba1daSmrgboth of the following shortcuts of passing variable assignments to the
167111ba1daSmrg`make install' command line to change installation locations without
168111ba1daSmrghaving to reconfigure or recompile.
169111ba1daSmrg
170111ba1daSmrg   The first method involves providing an override variable for each
171111ba1daSmrgaffected directory.  For example, `make install
172111ba1daSmrgprefix=/alternate/directory' will choose an alternate location for all
173111ba1daSmrgdirectory configuration variables that were expressed in terms of
174111ba1daSmrg`${prefix}'.  Any directories that were specified during `configure',
175111ba1daSmrgbut not in terms of `${prefix}', must each be overridden at install
176111ba1daSmrgtime for the entire installation to be relocated.  The approach of
177111ba1daSmrgmakefile variable overrides for each directory variable is required by
178111ba1daSmrgthe GNU Coding Standards, and ideally causes no recompilation.
179111ba1daSmrgHowever, some platforms have known limitations with the semantics of
180111ba1daSmrgshared libraries that end up requiring recompilation when using this
181111ba1daSmrgmethod, particularly noticeable in packages that use GNU Libtool.
182111ba1daSmrg
183111ba1daSmrg   The second method involves providing the `DESTDIR' variable.  For
184111ba1daSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
185111ba1daSmrg`/alternate/directory' before all installation names.  The approach of
186111ba1daSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187111ba1daSmrgdoes not work on platforms that have drive letters.  On the other hand,
188111ba1daSmrgit does better at avoiding recompilation issues, and works well even
189111ba1daSmrgwhen some directory options were not specified in terms of `${prefix}'
190111ba1daSmrgat `configure' time.
191111ba1daSmrg
192111ba1daSmrgOptional Features
193111ba1daSmrg=================
194d5d8cc55Smrg
195d5d8cc55Smrg   If the package supports it, you can cause programs to be installed
196d5d8cc55Smrgwith an extra prefix or suffix on their names by giving `configure' the
197d5d8cc55Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198d5d8cc55Smrg
199d5d8cc55Smrg   Some packages pay attention to `--enable-FEATURE' options to
200d5d8cc55Smrg`configure', where FEATURE indicates an optional part of the package.
201d5d8cc55SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202d5d8cc55Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203d5d8cc55Smrg`README' should mention any `--enable-' and `--with-' options that the
204d5d8cc55Smrgpackage recognizes.
205d5d8cc55Smrg
206d5d8cc55Smrg   For packages that use the X Window System, `configure' can usually
207d5d8cc55Smrgfind the X include and library files automatically, but if it doesn't,
208d5d8cc55Smrgyou can use the `configure' options `--x-includes=DIR' and
209d5d8cc55Smrg`--x-libraries=DIR' to specify their locations.
210d5d8cc55Smrg
211111ba1daSmrg   Some packages offer the ability to configure how verbose the
212111ba1daSmrgexecution of `make' will be.  For these packages, running `./configure
213111ba1daSmrg--enable-silent-rules' sets the default to minimal output, which can be
214111ba1daSmrgoverridden with `make V=1'; while running `./configure
215111ba1daSmrg--disable-silent-rules' sets the default to verbose, which can be
216111ba1daSmrgoverridden with `make V=0'.
217111ba1daSmrg
218d5d8cc55SmrgParticular systems
219d5d8cc55Smrg==================
220d5d8cc55Smrg
221d5d8cc55Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222d5d8cc55SmrgCC is not installed, it is recommended to use the following options in
223d5d8cc55Smrgorder to use an ANSI C compiler:
224d5d8cc55Smrg
225111ba1daSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226d5d8cc55Smrg
227d5d8cc55Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228d5d8cc55Smrg
229111ba1daSmrg   HP-UX `make' updates targets which have the same time stamps as
230111ba1daSmrgtheir prerequisites, which makes it generally unusable when shipped
231111ba1daSmrggenerated files such as `configure' are involved.  Use GNU `make'
232111ba1daSmrginstead.
233111ba1daSmrg
234d5d8cc55Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235d5d8cc55Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236d5d8cc55Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237d5d8cc55Smrgto try
238d5d8cc55Smrg
239d5d8cc55Smrg     ./configure CC="cc"
240d5d8cc55Smrg
241d5d8cc55Smrgand if that doesn't work, try
242d5d8cc55Smrg
243d5d8cc55Smrg     ./configure CC="cc -nodtk"
244d5d8cc55Smrg
245111ba1daSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246111ba1daSmrgdirectory contains several dysfunctional programs; working variants of
247111ba1daSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248111ba1daSmrgin your `PATH', put it _after_ `/usr/bin'.
249111ba1daSmrg
250111ba1daSmrg   On Haiku, software installed for all users goes in `/boot/common',
251111ba1daSmrgnot `/usr/local'.  It is recommended to use the following options:
252111ba1daSmrg
253111ba1daSmrg     ./configure --prefix=/boot/common
254111ba1daSmrg
255d5d8cc55SmrgSpecifying the System Type
256d5d8cc55Smrg==========================
257d5d8cc55Smrg
258d5d8cc55Smrg   There may be some features `configure' cannot figure out
259d5d8cc55Smrgautomatically, but needs to determine by the type of machine the package
260d5d8cc55Smrgwill run on.  Usually, assuming the package is built to be run on the
261d5d8cc55Smrg_same_ architectures, `configure' can figure that out, but if it prints
262d5d8cc55Smrga message saying it cannot guess the machine type, give it the
263d5d8cc55Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264d5d8cc55Smrgtype, such as `sun4', or a canonical name which has the form:
265d5d8cc55Smrg
266d5d8cc55Smrg     CPU-COMPANY-SYSTEM
267d5d8cc55Smrg
268d5d8cc55Smrgwhere SYSTEM can have one of these forms:
269d5d8cc55Smrg
270111ba1daSmrg     OS
271111ba1daSmrg     KERNEL-OS
272d5d8cc55Smrg
273d5d8cc55Smrg   See the file `config.sub' for the possible values of each field.  If
274d5d8cc55Smrg`config.sub' isn't included in this package, then this package doesn't
275d5d8cc55Smrgneed to know the machine type.
276d5d8cc55Smrg
277d5d8cc55Smrg   If you are _building_ compiler tools for cross-compiling, you should
278d5d8cc55Smrguse the option `--target=TYPE' to select the type of system they will
279d5d8cc55Smrgproduce code for.
280d5d8cc55Smrg
281d5d8cc55Smrg   If you want to _use_ a cross compiler, that generates code for a
282d5d8cc55Smrgplatform different from the build platform, you should specify the
283d5d8cc55Smrg"host" platform (i.e., that on which the generated programs will
284d5d8cc55Smrgeventually be run) with `--host=TYPE'.
285d5d8cc55Smrg
286d5d8cc55SmrgSharing Defaults
287d5d8cc55Smrg================
288d5d8cc55Smrg
289d5d8cc55Smrg   If you want to set default values for `configure' scripts to share,
290d5d8cc55Smrgyou can create a site shell script called `config.site' that gives
291d5d8cc55Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292d5d8cc55Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293d5d8cc55Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294d5d8cc55Smrg`CONFIG_SITE' environment variable to the location of the site script.
295d5d8cc55SmrgA warning: not all `configure' scripts look for a site script.
296d5d8cc55Smrg
297d5d8cc55SmrgDefining Variables
298d5d8cc55Smrg==================
299d5d8cc55Smrg
300d5d8cc55Smrg   Variables not defined in a site shell script can be set in the
301d5d8cc55Smrgenvironment passed to `configure'.  However, some packages may run
302d5d8cc55Smrgconfigure again during the build, and the customized values of these
303d5d8cc55Smrgvariables may be lost.  In order to avoid this problem, you should set
304d5d8cc55Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305d5d8cc55Smrg
306d5d8cc55Smrg     ./configure CC=/usr/local2/bin/gcc
307d5d8cc55Smrg
308d5d8cc55Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309d5d8cc55Smrgoverridden in the site shell script).
310d5d8cc55Smrg
311d5d8cc55SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312d5d8cc55Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313d5d8cc55Smrg
314d5d8cc55Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315d5d8cc55Smrg
316d5d8cc55Smrg`configure' Invocation
317d5d8cc55Smrg======================
318d5d8cc55Smrg
319d5d8cc55Smrg   `configure' recognizes the following options to control how it
320d5d8cc55Smrgoperates.
321d5d8cc55Smrg
322d5d8cc55Smrg`--help'
323d5d8cc55Smrg`-h'
324d5d8cc55Smrg     Print a summary of all of the options to `configure', and exit.
325d5d8cc55Smrg
326d5d8cc55Smrg`--help=short'
327d5d8cc55Smrg`--help=recursive'
328d5d8cc55Smrg     Print a summary of the options unique to this package's
329d5d8cc55Smrg     `configure', and exit.  The `short' variant lists options used
330d5d8cc55Smrg     only in the top level, while the `recursive' variant lists options
331d5d8cc55Smrg     also present in any nested packages.
332d5d8cc55Smrg
333d5d8cc55Smrg`--version'
334d5d8cc55Smrg`-V'
335d5d8cc55Smrg     Print the version of Autoconf used to generate the `configure'
336d5d8cc55Smrg     script, and exit.
337d5d8cc55Smrg
338d5d8cc55Smrg`--cache-file=FILE'
339d5d8cc55Smrg     Enable the cache: use and save the results of the tests in FILE,
340d5d8cc55Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341d5d8cc55Smrg     disable caching.
342d5d8cc55Smrg
343d5d8cc55Smrg`--config-cache'
344d5d8cc55Smrg`-C'
345d5d8cc55Smrg     Alias for `--cache-file=config.cache'.
346d5d8cc55Smrg
347d5d8cc55Smrg`--quiet'
348d5d8cc55Smrg`--silent'
349d5d8cc55Smrg`-q'
350d5d8cc55Smrg     Do not print messages saying which checks are being made.  To
351d5d8cc55Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352d5d8cc55Smrg     messages will still be shown).
353d5d8cc55Smrg
354d5d8cc55Smrg`--srcdir=DIR'
355d5d8cc55Smrg     Look for the package's source code in directory DIR.  Usually
356d5d8cc55Smrg     `configure' can determine that directory automatically.
357d5d8cc55Smrg
358d5d8cc55Smrg`--prefix=DIR'
359111ba1daSmrg     Use DIR as the installation prefix.  *note Installation Names::
360d5d8cc55Smrg     for more details, including other options available for fine-tuning
361d5d8cc55Smrg     the installation locations.
362d5d8cc55Smrg
363d5d8cc55Smrg`--no-create'
364d5d8cc55Smrg`-n'
365d5d8cc55Smrg     Run the configure checks, but stop before creating any output
366d5d8cc55Smrg     files.
367d5d8cc55Smrg
368d5d8cc55Smrg`configure' also accepts some other, not widely useful, options.  Run
369d5d8cc55Smrg`configure --help' for more details.
370d5d8cc55Smrg
371