INSTALL revision 4a8d91dc
1a73423d7SmrgInstallation Instructions
2a73423d7Smrg*************************
3a73423d7Smrg
44a8d91dcSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
54a8d91dcSmrgInc.
6a73423d7Smrg
74a8d91dcSmrg   Copying and distribution of this file, with or without modification,
84a8d91dcSmrgare permitted in any medium without royalty provided the copyright
94a8d91dcSmrgnotice and this notice are preserved.  This file is offered as-is,
104a8d91dcSmrgwithout warranty of any kind.
11a73423d7Smrg
12a73423d7SmrgBasic Installation
13a73423d7Smrg==================
14a73423d7Smrg
15a73423d7Smrg   Briefly, the shell commands `./configure; make; make install' should
16a73423d7Smrgconfigure, build, and install this package.  The following
17a73423d7Smrgmore-detailed instructions are generic; see the `README' file for
184a8d91dcSmrginstructions specific to this package.  Some packages provide this
194a8d91dcSmrg`INSTALL' file but do not implement all of the features documented
204a8d91dcSmrgbelow.  The lack of an optional feature in a given package is not
214a8d91dcSmrgnecessarily a bug.  More recommendations for GNU packages can be found
224a8d91dcSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23a73423d7Smrg
24a73423d7Smrg   The `configure' shell script attempts to guess correct values for
25a73423d7Smrgvarious system-dependent variables used during compilation.  It uses
26a73423d7Smrgthose values to create a `Makefile' in each directory of the package.
27a73423d7SmrgIt may also create one or more `.h' files containing system-dependent
28a73423d7Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29a73423d7Smrgyou can run in the future to recreate the current configuration, and a
30a73423d7Smrgfile `config.log' containing compiler output (useful mainly for
31a73423d7Smrgdebugging `configure').
32a73423d7Smrg
33a73423d7Smrg   It can also use an optional file (typically called `config.cache'
34a73423d7Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35a73423d7Smrgthe results of its tests to speed up reconfiguring.  Caching is
36a73423d7Smrgdisabled by default to prevent problems with accidental use of stale
37a73423d7Smrgcache files.
38a73423d7Smrg
39a73423d7Smrg   If you need to do unusual things to compile the package, please try
40a73423d7Smrgto figure out how `configure' could check whether to do them, and mail
41a73423d7Smrgdiffs or instructions to the address given in the `README' so they can
42a73423d7Smrgbe considered for the next release.  If you are using the cache, and at
43a73423d7Smrgsome point `config.cache' contains results you don't want to keep, you
44a73423d7Smrgmay remove or edit it.
45a73423d7Smrg
46a73423d7Smrg   The file `configure.ac' (or `configure.in') is used to create
47a73423d7Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48a73423d7Smrgyou want to change it or regenerate `configure' using a newer version
49a73423d7Smrgof `autoconf'.
50a73423d7Smrg
514a8d91dcSmrg   The simplest way to compile this package is:
52a73423d7Smrg
53a73423d7Smrg  1. `cd' to the directory containing the package's source code and type
54a73423d7Smrg     `./configure' to configure the package for your system.
55a73423d7Smrg
56a73423d7Smrg     Running `configure' might take a while.  While running, it prints
57a73423d7Smrg     some messages telling which features it is checking for.
58a73423d7Smrg
59a73423d7Smrg  2. Type `make' to compile the package.
60a73423d7Smrg
61a73423d7Smrg  3. Optionally, type `make check' to run any self-tests that come with
624a8d91dcSmrg     the package, generally using the just-built uninstalled binaries.
63a73423d7Smrg
64a73423d7Smrg  4. Type `make install' to install the programs and any data files and
654a8d91dcSmrg     documentation.  When installing into a prefix owned by root, it is
664a8d91dcSmrg     recommended that the package be configured and built as a regular
674a8d91dcSmrg     user, and only the `make install' phase executed with root
684a8d91dcSmrg     privileges.
694a8d91dcSmrg
704a8d91dcSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
714a8d91dcSmrg     this time using the binaries in their final installed location.
724a8d91dcSmrg     This target does not install anything.  Running this target as a
734a8d91dcSmrg     regular user, particularly if the prior `make install' required
744a8d91dcSmrg     root privileges, verifies that the installation completed
754a8d91dcSmrg     correctly.
764a8d91dcSmrg
774a8d91dcSmrg  6. You can remove the program binaries and object files from the
78a73423d7Smrg     source code directory by typing `make clean'.  To also remove the
79a73423d7Smrg     files that `configure' created (so you can compile the package for
80a73423d7Smrg     a different kind of computer), type `make distclean'.  There is
81a73423d7Smrg     also a `make maintainer-clean' target, but that is intended mainly
82a73423d7Smrg     for the package's developers.  If you use it, you may have to get
83a73423d7Smrg     all sorts of other programs in order to regenerate files that came
84a73423d7Smrg     with the distribution.
85a73423d7Smrg
864a8d91dcSmrg  7. Often, you can also type `make uninstall' to remove the installed
874a8d91dcSmrg     files again.  In practice, not all packages have tested that
884a8d91dcSmrg     uninstallation works correctly, even though it is required by the
894a8d91dcSmrg     GNU Coding Standards.
904a8d91dcSmrg
914a8d91dcSmrg  8. Some packages, particularly those that use Automake, provide `make
924a8d91dcSmrg     distcheck', which can by used by developers to test that all other
934a8d91dcSmrg     targets like `make install' and `make uninstall' work correctly.
944a8d91dcSmrg     This target is generally not run by end users.
95a73423d7Smrg
96a73423d7SmrgCompilers and Options
97a73423d7Smrg=====================
98a73423d7Smrg
99a73423d7Smrg   Some systems require unusual options for compilation or linking that
100a73423d7Smrgthe `configure' script does not know about.  Run `./configure --help'
101a73423d7Smrgfor details on some of the pertinent environment variables.
102a73423d7Smrg
103a73423d7Smrg   You can give `configure' initial values for configuration parameters
104a73423d7Smrgby setting variables in the command line or in the environment.  Here
105a73423d7Smrgis an example:
106a73423d7Smrg
107a73423d7Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108a73423d7Smrg
109a73423d7Smrg   *Note Defining Variables::, for more details.
110a73423d7Smrg
111a73423d7SmrgCompiling For Multiple Architectures
112a73423d7Smrg====================================
113a73423d7Smrg
114a73423d7Smrg   You can compile the package for more than one kind of computer at the
115a73423d7Smrgsame time, by placing the object files for each architecture in their
116a73423d7Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117a73423d7Smrgdirectory where you want the object files and executables to go and run
118a73423d7Smrgthe `configure' script.  `configure' automatically checks for the
1194a8d91dcSmrgsource code in the directory that `configure' is in and in `..'.  This
1204a8d91dcSmrgis known as a "VPATH" build.
121a73423d7Smrg
122a73423d7Smrg   With a non-GNU `make', it is safer to compile the package for one
123a73423d7Smrgarchitecture at a time in the source code directory.  After you have
124a73423d7Smrginstalled the package for one architecture, use `make distclean' before
125a73423d7Smrgreconfiguring for another architecture.
126a73423d7Smrg
127a73423d7Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128a73423d7Smrgexecutables that work on multiple system types--known as "fat" or
129a73423d7Smrg"universal" binaries--by specifying multiple `-arch' options to the
130a73423d7Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131a73423d7Smrgthis:
132a73423d7Smrg
133a73423d7Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134a73423d7Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135a73423d7Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136a73423d7Smrg
137a73423d7Smrg   This is not guaranteed to produce working output in all cases, you
138a73423d7Smrgmay have to build one architecture at a time and combine the results
139a73423d7Smrgusing the `lipo' tool if you have problems.
140a73423d7Smrg
141a73423d7SmrgInstallation Names
142a73423d7Smrg==================
143a73423d7Smrg
144a73423d7Smrg   By default, `make install' installs the package's commands under
145a73423d7Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146a73423d7Smrgcan specify an installation prefix other than `/usr/local' by giving
1474a8d91dcSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1484a8d91dcSmrgabsolute file name.
149a73423d7Smrg
150a73423d7Smrg   You can specify separate installation prefixes for
151a73423d7Smrgarchitecture-specific files and architecture-independent files.  If you
152a73423d7Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153a73423d7SmrgPREFIX as the prefix for installing programs and libraries.
154a73423d7SmrgDocumentation and other data files still use the regular prefix.
155a73423d7Smrg
156a73423d7Smrg   In addition, if you use an unusual directory layout you can give
157a73423d7Smrgoptions like `--bindir=DIR' to specify different values for particular
158a73423d7Smrgkinds of files.  Run `configure --help' for a list of the directories
1594a8d91dcSmrgyou can set and what kinds of files go in them.  In general, the
1604a8d91dcSmrgdefault for these options is expressed in terms of `${prefix}', so that
1614a8d91dcSmrgspecifying just `--prefix' will affect all of the other directory
1624a8d91dcSmrgspecifications that were not explicitly provided.
1634a8d91dcSmrg
1644a8d91dcSmrg   The most portable way to affect installation locations is to pass the
1654a8d91dcSmrgcorrect locations to `configure'; however, many packages provide one or
1664a8d91dcSmrgboth of the following shortcuts of passing variable assignments to the
1674a8d91dcSmrg`make install' command line to change installation locations without
1684a8d91dcSmrghaving to reconfigure or recompile.
1694a8d91dcSmrg
1704a8d91dcSmrg   The first method involves providing an override variable for each
1714a8d91dcSmrgaffected directory.  For example, `make install
1724a8d91dcSmrgprefix=/alternate/directory' will choose an alternate location for all
1734a8d91dcSmrgdirectory configuration variables that were expressed in terms of
1744a8d91dcSmrg`${prefix}'.  Any directories that were specified during `configure',
1754a8d91dcSmrgbut not in terms of `${prefix}', must each be overridden at install
1764a8d91dcSmrgtime for the entire installation to be relocated.  The approach of
1774a8d91dcSmrgmakefile variable overrides for each directory variable is required by
1784a8d91dcSmrgthe GNU Coding Standards, and ideally causes no recompilation.
1794a8d91dcSmrgHowever, some platforms have known limitations with the semantics of
1804a8d91dcSmrgshared libraries that end up requiring recompilation when using this
1814a8d91dcSmrgmethod, particularly noticeable in packages that use GNU Libtool.
1824a8d91dcSmrg
1834a8d91dcSmrg   The second method involves providing the `DESTDIR' variable.  For
1844a8d91dcSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
1854a8d91dcSmrg`/alternate/directory' before all installation names.  The approach of
1864a8d91dcSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1874a8d91dcSmrgdoes not work on platforms that have drive letters.  On the other hand,
1884a8d91dcSmrgit does better at avoiding recompilation issues, and works well even
1894a8d91dcSmrgwhen some directory options were not specified in terms of `${prefix}'
1904a8d91dcSmrgat `configure' time.
1914a8d91dcSmrg
1924a8d91dcSmrgOptional Features
1934a8d91dcSmrg=================
194a73423d7Smrg
195a73423d7Smrg   If the package supports it, you can cause programs to be installed
196a73423d7Smrgwith an extra prefix or suffix on their names by giving `configure' the
197a73423d7Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198a73423d7Smrg
199a73423d7Smrg   Some packages pay attention to `--enable-FEATURE' options to
200a73423d7Smrg`configure', where FEATURE indicates an optional part of the package.
201a73423d7SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202a73423d7Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203a73423d7Smrg`README' should mention any `--enable-' and `--with-' options that the
204a73423d7Smrgpackage recognizes.
205a73423d7Smrg
206a73423d7Smrg   For packages that use the X Window System, `configure' can usually
207a73423d7Smrgfind the X include and library files automatically, but if it doesn't,
208a73423d7Smrgyou can use the `configure' options `--x-includes=DIR' and
209a73423d7Smrg`--x-libraries=DIR' to specify their locations.
210a73423d7Smrg
2114a8d91dcSmrg   Some packages offer the ability to configure how verbose the
2124a8d91dcSmrgexecution of `make' will be.  For these packages, running `./configure
2134a8d91dcSmrg--enable-silent-rules' sets the default to minimal output, which can be
2144a8d91dcSmrgoverridden with `make V=1'; while running `./configure
2154a8d91dcSmrg--disable-silent-rules' sets the default to verbose, which can be
2164a8d91dcSmrgoverridden with `make V=0'.
2174a8d91dcSmrg
218a73423d7SmrgParticular systems
219a73423d7Smrg==================
220a73423d7Smrg
221a73423d7Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222a73423d7SmrgCC is not installed, it is recommended to use the following options in
223a73423d7Smrgorder to use an ANSI C compiler:
224a73423d7Smrg
2254a8d91dcSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226a73423d7Smrg
227a73423d7Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228a73423d7Smrg
2294a8d91dcSmrg   HP-UX `make' updates targets which have the same time stamps as
2304a8d91dcSmrgtheir prerequisites, which makes it generally unusable when shipped
2314a8d91dcSmrggenerated files such as `configure' are involved.  Use GNU `make'
2324a8d91dcSmrginstead.
2334a8d91dcSmrg
234a73423d7Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235a73423d7Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236a73423d7Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237a73423d7Smrgto try
238a73423d7Smrg
239a73423d7Smrg     ./configure CC="cc"
240a73423d7Smrg
241a73423d7Smrgand if that doesn't work, try
242a73423d7Smrg
243a73423d7Smrg     ./configure CC="cc -nodtk"
244a73423d7Smrg
2454a8d91dcSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2464a8d91dcSmrgdirectory contains several dysfunctional programs; working variants of
2474a8d91dcSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2484a8d91dcSmrgin your `PATH', put it _after_ `/usr/bin'.
2494a8d91dcSmrg
2504a8d91dcSmrg   On Haiku, software installed for all users goes in `/boot/common',
2514a8d91dcSmrgnot `/usr/local'.  It is recommended to use the following options:
2524a8d91dcSmrg
2534a8d91dcSmrg     ./configure --prefix=/boot/common
2544a8d91dcSmrg
255a73423d7SmrgSpecifying the System Type
256a73423d7Smrg==========================
257a73423d7Smrg
258a73423d7Smrg   There may be some features `configure' cannot figure out
259a73423d7Smrgautomatically, but needs to determine by the type of machine the package
260a73423d7Smrgwill run on.  Usually, assuming the package is built to be run on the
261a73423d7Smrg_same_ architectures, `configure' can figure that out, but if it prints
262a73423d7Smrga message saying it cannot guess the machine type, give it the
263a73423d7Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264a73423d7Smrgtype, such as `sun4', or a canonical name which has the form:
265a73423d7Smrg
266a73423d7Smrg     CPU-COMPANY-SYSTEM
267a73423d7Smrg
268a73423d7Smrgwhere SYSTEM can have one of these forms:
269a73423d7Smrg
2704a8d91dcSmrg     OS
2714a8d91dcSmrg     KERNEL-OS
272a73423d7Smrg
273a73423d7Smrg   See the file `config.sub' for the possible values of each field.  If
274a73423d7Smrg`config.sub' isn't included in this package, then this package doesn't
275a73423d7Smrgneed to know the machine type.
276a73423d7Smrg
277a73423d7Smrg   If you are _building_ compiler tools for cross-compiling, you should
278a73423d7Smrguse the option `--target=TYPE' to select the type of system they will
279a73423d7Smrgproduce code for.
280a73423d7Smrg
281a73423d7Smrg   If you want to _use_ a cross compiler, that generates code for a
282a73423d7Smrgplatform different from the build platform, you should specify the
283a73423d7Smrg"host" platform (i.e., that on which the generated programs will
284a73423d7Smrgeventually be run) with `--host=TYPE'.
285a73423d7Smrg
286a73423d7SmrgSharing Defaults
287a73423d7Smrg================
288a73423d7Smrg
289a73423d7Smrg   If you want to set default values for `configure' scripts to share,
290a73423d7Smrgyou can create a site shell script called `config.site' that gives
291a73423d7Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292a73423d7Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293a73423d7Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294a73423d7Smrg`CONFIG_SITE' environment variable to the location of the site script.
295a73423d7SmrgA warning: not all `configure' scripts look for a site script.
296a73423d7Smrg
297a73423d7SmrgDefining Variables
298a73423d7Smrg==================
299a73423d7Smrg
300a73423d7Smrg   Variables not defined in a site shell script can be set in the
301a73423d7Smrgenvironment passed to `configure'.  However, some packages may run
302a73423d7Smrgconfigure again during the build, and the customized values of these
303a73423d7Smrgvariables may be lost.  In order to avoid this problem, you should set
304a73423d7Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305a73423d7Smrg
306a73423d7Smrg     ./configure CC=/usr/local2/bin/gcc
307a73423d7Smrg
308a73423d7Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309a73423d7Smrgoverridden in the site shell script).
310a73423d7Smrg
311a73423d7SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312a73423d7Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313a73423d7Smrg
314a73423d7Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315a73423d7Smrg
316a73423d7Smrg`configure' Invocation
317a73423d7Smrg======================
318a73423d7Smrg
319a73423d7Smrg   `configure' recognizes the following options to control how it
320a73423d7Smrgoperates.
321a73423d7Smrg
322a73423d7Smrg`--help'
323a73423d7Smrg`-h'
324a73423d7Smrg     Print a summary of all of the options to `configure', and exit.
325a73423d7Smrg
326a73423d7Smrg`--help=short'
327a73423d7Smrg`--help=recursive'
328a73423d7Smrg     Print a summary of the options unique to this package's
329a73423d7Smrg     `configure', and exit.  The `short' variant lists options used
330a73423d7Smrg     only in the top level, while the `recursive' variant lists options
331a73423d7Smrg     also present in any nested packages.
332a73423d7Smrg
333a73423d7Smrg`--version'
334a73423d7Smrg`-V'
335a73423d7Smrg     Print the version of Autoconf used to generate the `configure'
336a73423d7Smrg     script, and exit.
337a73423d7Smrg
338a73423d7Smrg`--cache-file=FILE'
339a73423d7Smrg     Enable the cache: use and save the results of the tests in FILE,
340a73423d7Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341a73423d7Smrg     disable caching.
342a73423d7Smrg
343a73423d7Smrg`--config-cache'
344a73423d7Smrg`-C'
345a73423d7Smrg     Alias for `--cache-file=config.cache'.
346a73423d7Smrg
347a73423d7Smrg`--quiet'
348a73423d7Smrg`--silent'
349a73423d7Smrg`-q'
350a73423d7Smrg     Do not print messages saying which checks are being made.  To
351a73423d7Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352a73423d7Smrg     messages will still be shown).
353a73423d7Smrg
354a73423d7Smrg`--srcdir=DIR'
355a73423d7Smrg     Look for the package's source code in directory DIR.  Usually
356a73423d7Smrg     `configure' can determine that directory automatically.
357a73423d7Smrg
358a73423d7Smrg`--prefix=DIR'
3594a8d91dcSmrg     Use DIR as the installation prefix.  *note Installation Names::
360a73423d7Smrg     for more details, including other options available for fine-tuning
361a73423d7Smrg     the installation locations.
362a73423d7Smrg
363a73423d7Smrg`--no-create'
364a73423d7Smrg`-n'
365a73423d7Smrg     Run the configure checks, but stop before creating any output
366a73423d7Smrg     files.
367a73423d7Smrg
368a73423d7Smrg`configure' also accepts some other, not widely useful, options.  Run
369a73423d7Smrg`configure --help' for more details.
370a73423d7Smrg
371