186bbecbeSmrgInstallation Instructions
286bbecbeSmrg*************************
386bbecbeSmrg
4ecb85c42SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5ecb85c42SmrgInc.
686bbecbeSmrg
7ecb85c42Smrg   Copying and distribution of this file, with or without modification,
8ecb85c42Smrgare permitted in any medium without royalty provided the copyright
9ecb85c42Smrgnotice and this notice are preserved.  This file is offered as-is,
10ecb85c42Smrgwithout warranty of any kind.
1186bbecbeSmrg
1286bbecbeSmrgBasic Installation
1386bbecbeSmrg==================
1486bbecbeSmrg
1586bbecbeSmrg   Briefly, the shell commands `./configure; make; make install' should
1686bbecbeSmrgconfigure, build, and install this package.  The following
1786bbecbeSmrgmore-detailed instructions are generic; see the `README' file for
18ecb85c42Smrginstructions specific to this package.  Some packages provide this
19ecb85c42Smrg`INSTALL' file but do not implement all of the features documented
20ecb85c42Smrgbelow.  The lack of an optional feature in a given package is not
21ecb85c42Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22ecb85c42Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2386bbecbeSmrg
2486bbecbeSmrg   The `configure' shell script attempts to guess correct values for
2586bbecbeSmrgvarious system-dependent variables used during compilation.  It uses
2686bbecbeSmrgthose values to create a `Makefile' in each directory of the package.
2786bbecbeSmrgIt may also create one or more `.h' files containing system-dependent
2886bbecbeSmrgdefinitions.  Finally, it creates a shell script `config.status' that
2986bbecbeSmrgyou can run in the future to recreate the current configuration, and a
3086bbecbeSmrgfile `config.log' containing compiler output (useful mainly for
3186bbecbeSmrgdebugging `configure').
3286bbecbeSmrg
3386bbecbeSmrg   It can also use an optional file (typically called `config.cache'
3486bbecbeSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3586bbecbeSmrgthe results of its tests to speed up reconfiguring.  Caching is
3686bbecbeSmrgdisabled by default to prevent problems with accidental use of stale
3786bbecbeSmrgcache files.
3886bbecbeSmrg
3986bbecbeSmrg   If you need to do unusual things to compile the package, please try
4086bbecbeSmrgto figure out how `configure' could check whether to do them, and mail
4186bbecbeSmrgdiffs or instructions to the address given in the `README' so they can
4286bbecbeSmrgbe considered for the next release.  If you are using the cache, and at
4386bbecbeSmrgsome point `config.cache' contains results you don't want to keep, you
4486bbecbeSmrgmay remove or edit it.
4586bbecbeSmrg
4686bbecbeSmrg   The file `configure.ac' (or `configure.in') is used to create
4786bbecbeSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4886bbecbeSmrgyou want to change it or regenerate `configure' using a newer version
4986bbecbeSmrgof `autoconf'.
5086bbecbeSmrg
51ecb85c42Smrg   The simplest way to compile this package is:
5286bbecbeSmrg
5386bbecbeSmrg  1. `cd' to the directory containing the package's source code and type
5486bbecbeSmrg     `./configure' to configure the package for your system.
5586bbecbeSmrg
5686bbecbeSmrg     Running `configure' might take a while.  While running, it prints
5786bbecbeSmrg     some messages telling which features it is checking for.
5886bbecbeSmrg
5986bbecbeSmrg  2. Type `make' to compile the package.
6086bbecbeSmrg
6186bbecbeSmrg  3. Optionally, type `make check' to run any self-tests that come with
62ecb85c42Smrg     the package, generally using the just-built uninstalled binaries.
6386bbecbeSmrg
6486bbecbeSmrg  4. Type `make install' to install the programs and any data files and
65ecb85c42Smrg     documentation.  When installing into a prefix owned by root, it is
66ecb85c42Smrg     recommended that the package be configured and built as a regular
67ecb85c42Smrg     user, and only the `make install' phase executed with root
68ecb85c42Smrg     privileges.
69ecb85c42Smrg
70ecb85c42Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71ecb85c42Smrg     this time using the binaries in their final installed location.
72ecb85c42Smrg     This target does not install anything.  Running this target as a
73ecb85c42Smrg     regular user, particularly if the prior `make install' required
74ecb85c42Smrg     root privileges, verifies that the installation completed
75ecb85c42Smrg     correctly.
76ecb85c42Smrg
77ecb85c42Smrg  6. You can remove the program binaries and object files from the
7886bbecbeSmrg     source code directory by typing `make clean'.  To also remove the
7986bbecbeSmrg     files that `configure' created (so you can compile the package for
8086bbecbeSmrg     a different kind of computer), type `make distclean'.  There is
8186bbecbeSmrg     also a `make maintainer-clean' target, but that is intended mainly
8286bbecbeSmrg     for the package's developers.  If you use it, you may have to get
8386bbecbeSmrg     all sorts of other programs in order to regenerate files that came
8486bbecbeSmrg     with the distribution.
8586bbecbeSmrg
86ecb85c42Smrg  7. Often, you can also type `make uninstall' to remove the installed
87ecb85c42Smrg     files again.  In practice, not all packages have tested that
88ecb85c42Smrg     uninstallation works correctly, even though it is required by the
89ecb85c42Smrg     GNU Coding Standards.
90ecb85c42Smrg
91ecb85c42Smrg  8. Some packages, particularly those that use Automake, provide `make
92ecb85c42Smrg     distcheck', which can by used by developers to test that all other
93ecb85c42Smrg     targets like `make install' and `make uninstall' work correctly.
94ecb85c42Smrg     This target is generally not run by end users.
9586bbecbeSmrg
9686bbecbeSmrgCompilers and Options
9786bbecbeSmrg=====================
9886bbecbeSmrg
9986bbecbeSmrg   Some systems require unusual options for compilation or linking that
10086bbecbeSmrgthe `configure' script does not know about.  Run `./configure --help'
10186bbecbeSmrgfor details on some of the pertinent environment variables.
10286bbecbeSmrg
10386bbecbeSmrg   You can give `configure' initial values for configuration parameters
10486bbecbeSmrgby setting variables in the command line or in the environment.  Here
10586bbecbeSmrgis an example:
10686bbecbeSmrg
10786bbecbeSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10886bbecbeSmrg
10986bbecbeSmrg   *Note Defining Variables::, for more details.
11086bbecbeSmrg
11186bbecbeSmrgCompiling For Multiple Architectures
11286bbecbeSmrg====================================
11386bbecbeSmrg
11486bbecbeSmrg   You can compile the package for more than one kind of computer at the
11586bbecbeSmrgsame time, by placing the object files for each architecture in their
11686bbecbeSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11786bbecbeSmrgdirectory where you want the object files and executables to go and run
11886bbecbeSmrgthe `configure' script.  `configure' automatically checks for the
119ecb85c42Smrgsource code in the directory that `configure' is in and in `..'.  This
120ecb85c42Smrgis known as a "VPATH" build.
12186bbecbeSmrg
12286bbecbeSmrg   With a non-GNU `make', it is safer to compile the package for one
12386bbecbeSmrgarchitecture at a time in the source code directory.  After you have
12486bbecbeSmrginstalled the package for one architecture, use `make distclean' before
12586bbecbeSmrgreconfiguring for another architecture.
12686bbecbeSmrg
12786bbecbeSmrg   On MacOS X 10.5 and later systems, you can create libraries and
12886bbecbeSmrgexecutables that work on multiple system types--known as "fat" or
12986bbecbeSmrg"universal" binaries--by specifying multiple `-arch' options to the
13086bbecbeSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
13186bbecbeSmrgthis:
13286bbecbeSmrg
13386bbecbeSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13486bbecbeSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13586bbecbeSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
13686bbecbeSmrg
13786bbecbeSmrg   This is not guaranteed to produce working output in all cases, you
13886bbecbeSmrgmay have to build one architecture at a time and combine the results
13986bbecbeSmrgusing the `lipo' tool if you have problems.
14086bbecbeSmrg
14186bbecbeSmrgInstallation Names
14286bbecbeSmrg==================
14386bbecbeSmrg
14486bbecbeSmrg   By default, `make install' installs the package's commands under
14586bbecbeSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14686bbecbeSmrgcan specify an installation prefix other than `/usr/local' by giving
147ecb85c42Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148ecb85c42Smrgabsolute file name.
14986bbecbeSmrg
15086bbecbeSmrg   You can specify separate installation prefixes for
15186bbecbeSmrgarchitecture-specific files and architecture-independent files.  If you
15286bbecbeSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15386bbecbeSmrgPREFIX as the prefix for installing programs and libraries.
15486bbecbeSmrgDocumentation and other data files still use the regular prefix.
15586bbecbeSmrg
15686bbecbeSmrg   In addition, if you use an unusual directory layout you can give
15786bbecbeSmrgoptions like `--bindir=DIR' to specify different values for particular
15886bbecbeSmrgkinds of files.  Run `configure --help' for a list of the directories
159ecb85c42Smrgyou can set and what kinds of files go in them.  In general, the
160ecb85c42Smrgdefault for these options is expressed in terms of `${prefix}', so that
161ecb85c42Smrgspecifying just `--prefix' will affect all of the other directory
162ecb85c42Smrgspecifications that were not explicitly provided.
163ecb85c42Smrg
164ecb85c42Smrg   The most portable way to affect installation locations is to pass the
165ecb85c42Smrgcorrect locations to `configure'; however, many packages provide one or
166ecb85c42Smrgboth of the following shortcuts of passing variable assignments to the
167ecb85c42Smrg`make install' command line to change installation locations without
168ecb85c42Smrghaving to reconfigure or recompile.
169ecb85c42Smrg
170ecb85c42Smrg   The first method involves providing an override variable for each
171ecb85c42Smrgaffected directory.  For example, `make install
172ecb85c42Smrgprefix=/alternate/directory' will choose an alternate location for all
173ecb85c42Smrgdirectory configuration variables that were expressed in terms of
174ecb85c42Smrg`${prefix}'.  Any directories that were specified during `configure',
175ecb85c42Smrgbut not in terms of `${prefix}', must each be overridden at install
176ecb85c42Smrgtime for the entire installation to be relocated.  The approach of
177ecb85c42Smrgmakefile variable overrides for each directory variable is required by
178ecb85c42Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179ecb85c42SmrgHowever, some platforms have known limitations with the semantics of
180ecb85c42Smrgshared libraries that end up requiring recompilation when using this
181ecb85c42Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182ecb85c42Smrg
183ecb85c42Smrg   The second method involves providing the `DESTDIR' variable.  For
184ecb85c42Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185ecb85c42Smrg`/alternate/directory' before all installation names.  The approach of
186ecb85c42Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187ecb85c42Smrgdoes not work on platforms that have drive letters.  On the other hand,
188ecb85c42Smrgit does better at avoiding recompilation issues, and works well even
189ecb85c42Smrgwhen some directory options were not specified in terms of `${prefix}'
190ecb85c42Smrgat `configure' time.
191ecb85c42Smrg
192ecb85c42SmrgOptional Features
193ecb85c42Smrg=================
19486bbecbeSmrg
19586bbecbeSmrg   If the package supports it, you can cause programs to be installed
19686bbecbeSmrgwith an extra prefix or suffix on their names by giving `configure' the
19786bbecbeSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19886bbecbeSmrg
19986bbecbeSmrg   Some packages pay attention to `--enable-FEATURE' options to
20086bbecbeSmrg`configure', where FEATURE indicates an optional part of the package.
20186bbecbeSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20286bbecbeSmrgis something like `gnu-as' or `x' (for the X Window System).  The
20386bbecbeSmrg`README' should mention any `--enable-' and `--with-' options that the
20486bbecbeSmrgpackage recognizes.
20586bbecbeSmrg
20686bbecbeSmrg   For packages that use the X Window System, `configure' can usually
20786bbecbeSmrgfind the X include and library files automatically, but if it doesn't,
20886bbecbeSmrgyou can use the `configure' options `--x-includes=DIR' and
20986bbecbeSmrg`--x-libraries=DIR' to specify their locations.
21086bbecbeSmrg
211ecb85c42Smrg   Some packages offer the ability to configure how verbose the
212ecb85c42Smrgexecution of `make' will be.  For these packages, running `./configure
213ecb85c42Smrg--enable-silent-rules' sets the default to minimal output, which can be
214ecb85c42Smrgoverridden with `make V=1'; while running `./configure
215ecb85c42Smrg--disable-silent-rules' sets the default to verbose, which can be
216ecb85c42Smrgoverridden with `make V=0'.
217ecb85c42Smrg
21886bbecbeSmrgParticular systems
21986bbecbeSmrg==================
22086bbecbeSmrg
22186bbecbeSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22286bbecbeSmrgCC is not installed, it is recommended to use the following options in
22386bbecbeSmrgorder to use an ANSI C compiler:
22486bbecbeSmrg
225ecb85c42Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22686bbecbeSmrg
22786bbecbeSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22886bbecbeSmrg
229ecb85c42Smrg   HP-UX `make' updates targets which have the same time stamps as
230ecb85c42Smrgtheir prerequisites, which makes it generally unusable when shipped
231ecb85c42Smrggenerated files such as `configure' are involved.  Use GNU `make'
232ecb85c42Smrginstead.
233ecb85c42Smrg
23486bbecbeSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23586bbecbeSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23686bbecbeSmrga workaround.  If GNU CC is not installed, it is therefore recommended
23786bbecbeSmrgto try
23886bbecbeSmrg
23986bbecbeSmrg     ./configure CC="cc"
24086bbecbeSmrg
24186bbecbeSmrgand if that doesn't work, try
24286bbecbeSmrg
24386bbecbeSmrg     ./configure CC="cc -nodtk"
24486bbecbeSmrg
245ecb85c42Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246ecb85c42Smrgdirectory contains several dysfunctional programs; working variants of
247ecb85c42Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248ecb85c42Smrgin your `PATH', put it _after_ `/usr/bin'.
249ecb85c42Smrg
250ecb85c42Smrg   On Haiku, software installed for all users goes in `/boot/common',
251ecb85c42Smrgnot `/usr/local'.  It is recommended to use the following options:
252ecb85c42Smrg
253ecb85c42Smrg     ./configure --prefix=/boot/common
254ecb85c42Smrg
25586bbecbeSmrgSpecifying the System Type
25686bbecbeSmrg==========================
25786bbecbeSmrg
25886bbecbeSmrg   There may be some features `configure' cannot figure out
25986bbecbeSmrgautomatically, but needs to determine by the type of machine the package
26086bbecbeSmrgwill run on.  Usually, assuming the package is built to be run on the
26186bbecbeSmrg_same_ architectures, `configure' can figure that out, but if it prints
26286bbecbeSmrga message saying it cannot guess the machine type, give it the
26386bbecbeSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
26486bbecbeSmrgtype, such as `sun4', or a canonical name which has the form:
26586bbecbeSmrg
26686bbecbeSmrg     CPU-COMPANY-SYSTEM
26786bbecbeSmrg
26886bbecbeSmrgwhere SYSTEM can have one of these forms:
26986bbecbeSmrg
270ecb85c42Smrg     OS
271ecb85c42Smrg     KERNEL-OS
27286bbecbeSmrg
27386bbecbeSmrg   See the file `config.sub' for the possible values of each field.  If
27486bbecbeSmrg`config.sub' isn't included in this package, then this package doesn't
27586bbecbeSmrgneed to know the machine type.
27686bbecbeSmrg
27786bbecbeSmrg   If you are _building_ compiler tools for cross-compiling, you should
27886bbecbeSmrguse the option `--target=TYPE' to select the type of system they will
27986bbecbeSmrgproduce code for.
28086bbecbeSmrg
28186bbecbeSmrg   If you want to _use_ a cross compiler, that generates code for a
28286bbecbeSmrgplatform different from the build platform, you should specify the
28386bbecbeSmrg"host" platform (i.e., that on which the generated programs will
28486bbecbeSmrgeventually be run) with `--host=TYPE'.
28586bbecbeSmrg
28686bbecbeSmrgSharing Defaults
28786bbecbeSmrg================
28886bbecbeSmrg
28986bbecbeSmrg   If you want to set default values for `configure' scripts to share,
29086bbecbeSmrgyou can create a site shell script called `config.site' that gives
29186bbecbeSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
29286bbecbeSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29386bbecbeSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29486bbecbeSmrg`CONFIG_SITE' environment variable to the location of the site script.
29586bbecbeSmrgA warning: not all `configure' scripts look for a site script.
29686bbecbeSmrg
29786bbecbeSmrgDefining Variables
29886bbecbeSmrg==================
29986bbecbeSmrg
30086bbecbeSmrg   Variables not defined in a site shell script can be set in the
30186bbecbeSmrgenvironment passed to `configure'.  However, some packages may run
30286bbecbeSmrgconfigure again during the build, and the customized values of these
30386bbecbeSmrgvariables may be lost.  In order to avoid this problem, you should set
30486bbecbeSmrgthem in the `configure' command line, using `VAR=value'.  For example:
30586bbecbeSmrg
30686bbecbeSmrg     ./configure CC=/usr/local2/bin/gcc
30786bbecbeSmrg
30886bbecbeSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
30986bbecbeSmrgoverridden in the site shell script).
31086bbecbeSmrg
31186bbecbeSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31286bbecbeSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31386bbecbeSmrg
31486bbecbeSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31586bbecbeSmrg
31686bbecbeSmrg`configure' Invocation
31786bbecbeSmrg======================
31886bbecbeSmrg
31986bbecbeSmrg   `configure' recognizes the following options to control how it
32086bbecbeSmrgoperates.
32186bbecbeSmrg
32286bbecbeSmrg`--help'
32386bbecbeSmrg`-h'
32486bbecbeSmrg     Print a summary of all of the options to `configure', and exit.
32586bbecbeSmrg
32686bbecbeSmrg`--help=short'
32786bbecbeSmrg`--help=recursive'
32886bbecbeSmrg     Print a summary of the options unique to this package's
32986bbecbeSmrg     `configure', and exit.  The `short' variant lists options used
33086bbecbeSmrg     only in the top level, while the `recursive' variant lists options
33186bbecbeSmrg     also present in any nested packages.
33286bbecbeSmrg
33386bbecbeSmrg`--version'
33486bbecbeSmrg`-V'
33586bbecbeSmrg     Print the version of Autoconf used to generate the `configure'
33686bbecbeSmrg     script, and exit.
33786bbecbeSmrg
33886bbecbeSmrg`--cache-file=FILE'
33986bbecbeSmrg     Enable the cache: use and save the results of the tests in FILE,
34086bbecbeSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34186bbecbeSmrg     disable caching.
34286bbecbeSmrg
34386bbecbeSmrg`--config-cache'
34486bbecbeSmrg`-C'
34586bbecbeSmrg     Alias for `--cache-file=config.cache'.
34686bbecbeSmrg
34786bbecbeSmrg`--quiet'
34886bbecbeSmrg`--silent'
34986bbecbeSmrg`-q'
35086bbecbeSmrg     Do not print messages saying which checks are being made.  To
35186bbecbeSmrg     suppress all normal output, redirect it to `/dev/null' (any error
35286bbecbeSmrg     messages will still be shown).
35386bbecbeSmrg
35486bbecbeSmrg`--srcdir=DIR'
35586bbecbeSmrg     Look for the package's source code in directory DIR.  Usually
35686bbecbeSmrg     `configure' can determine that directory automatically.
35786bbecbeSmrg
35886bbecbeSmrg`--prefix=DIR'
359ecb85c42Smrg     Use DIR as the installation prefix.  *note Installation Names::
36086bbecbeSmrg     for more details, including other options available for fine-tuning
36186bbecbeSmrg     the installation locations.
36286bbecbeSmrg
36386bbecbeSmrg`--no-create'
36486bbecbeSmrg`-n'
36586bbecbeSmrg     Run the configure checks, but stop before creating any output
36686bbecbeSmrg     files.
36786bbecbeSmrg
36886bbecbeSmrg`configure' also accepts some other, not widely useful, options.  Run
36986bbecbeSmrg`configure --help' for more details.
37086bbecbeSmrg
371