144d8e951SmrgInstallation Instructions
244d8e951Smrg*************************
344d8e951Smrg
4414cce6aSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5414cce6aSmrgInc.
644d8e951Smrg
7414cce6aSmrg   Copying and distribution of this file, with or without modification,
8414cce6aSmrgare permitted in any medium without royalty provided the copyright
9414cce6aSmrgnotice and this notice are preserved.  This file is offered as-is,
10414cce6aSmrgwithout warranty of any kind.
1144d8e951Smrg
1244d8e951SmrgBasic Installation
1344d8e951Smrg==================
1444d8e951Smrg
1544d8e951Smrg   Briefly, the shell commands `./configure; make; make install' should
1644d8e951Smrgconfigure, build, and install this package.  The following
1744d8e951Smrgmore-detailed instructions are generic; see the `README' file for
18414cce6aSmrginstructions specific to this package.  Some packages provide this
19414cce6aSmrg`INSTALL' file but do not implement all of the features documented
20414cce6aSmrgbelow.  The lack of an optional feature in a given package is not
21414cce6aSmrgnecessarily a bug.  More recommendations for GNU packages can be found
22414cce6aSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
2344d8e951Smrg
2444d8e951Smrg   The `configure' shell script attempts to guess correct values for
2544d8e951Smrgvarious system-dependent variables used during compilation.  It uses
2644d8e951Smrgthose values to create a `Makefile' in each directory of the package.
2744d8e951SmrgIt may also create one or more `.h' files containing system-dependent
2844d8e951Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2944d8e951Smrgyou can run in the future to recreate the current configuration, and a
3044d8e951Smrgfile `config.log' containing compiler output (useful mainly for
3144d8e951Smrgdebugging `configure').
3244d8e951Smrg
3344d8e951Smrg   It can also use an optional file (typically called `config.cache'
3444d8e951Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3544d8e951Smrgthe results of its tests to speed up reconfiguring.  Caching is
3644d8e951Smrgdisabled by default to prevent problems with accidental use of stale
3744d8e951Smrgcache files.
3844d8e951Smrg
3944d8e951Smrg   If you need to do unusual things to compile the package, please try
4044d8e951Smrgto figure out how `configure' could check whether to do them, and mail
4144d8e951Smrgdiffs or instructions to the address given in the `README' so they can
4244d8e951Smrgbe considered for the next release.  If you are using the cache, and at
4344d8e951Smrgsome point `config.cache' contains results you don't want to keep, you
4444d8e951Smrgmay remove or edit it.
4544d8e951Smrg
4644d8e951Smrg   The file `configure.ac' (or `configure.in') is used to create
4744d8e951Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4844d8e951Smrgyou want to change it or regenerate `configure' using a newer version
4944d8e951Smrgof `autoconf'.
5044d8e951Smrg
51414cce6aSmrg   The simplest way to compile this package is:
5244d8e951Smrg
5344d8e951Smrg  1. `cd' to the directory containing the package's source code and type
5444d8e951Smrg     `./configure' to configure the package for your system.
5544d8e951Smrg
5644d8e951Smrg     Running `configure' might take a while.  While running, it prints
5744d8e951Smrg     some messages telling which features it is checking for.
5844d8e951Smrg
5944d8e951Smrg  2. Type `make' to compile the package.
6044d8e951Smrg
6144d8e951Smrg  3. Optionally, type `make check' to run any self-tests that come with
62414cce6aSmrg     the package, generally using the just-built uninstalled binaries.
6344d8e951Smrg
6444d8e951Smrg  4. Type `make install' to install the programs and any data files and
65414cce6aSmrg     documentation.  When installing into a prefix owned by root, it is
66414cce6aSmrg     recommended that the package be configured and built as a regular
67414cce6aSmrg     user, and only the `make install' phase executed with root
68414cce6aSmrg     privileges.
69414cce6aSmrg
70414cce6aSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71414cce6aSmrg     this time using the binaries in their final installed location.
72414cce6aSmrg     This target does not install anything.  Running this target as a
73414cce6aSmrg     regular user, particularly if the prior `make install' required
74414cce6aSmrg     root privileges, verifies that the installation completed
75414cce6aSmrg     correctly.
76414cce6aSmrg
77414cce6aSmrg  6. You can remove the program binaries and object files from the
7844d8e951Smrg     source code directory by typing `make clean'.  To also remove the
7944d8e951Smrg     files that `configure' created (so you can compile the package for
8044d8e951Smrg     a different kind of computer), type `make distclean'.  There is
8144d8e951Smrg     also a `make maintainer-clean' target, but that is intended mainly
8244d8e951Smrg     for the package's developers.  If you use it, you may have to get
8344d8e951Smrg     all sorts of other programs in order to regenerate files that came
8444d8e951Smrg     with the distribution.
8544d8e951Smrg
86414cce6aSmrg  7. Often, you can also type `make uninstall' to remove the installed
87414cce6aSmrg     files again.  In practice, not all packages have tested that
88414cce6aSmrg     uninstallation works correctly, even though it is required by the
89414cce6aSmrg     GNU Coding Standards.
90414cce6aSmrg
91414cce6aSmrg  8. Some packages, particularly those that use Automake, provide `make
92414cce6aSmrg     distcheck', which can by used by developers to test that all other
93414cce6aSmrg     targets like `make install' and `make uninstall' work correctly.
94414cce6aSmrg     This target is generally not run by end users.
9544d8e951Smrg
9644d8e951SmrgCompilers and Options
9744d8e951Smrg=====================
9844d8e951Smrg
9944d8e951Smrg   Some systems require unusual options for compilation or linking that
10044d8e951Smrgthe `configure' script does not know about.  Run `./configure --help'
10144d8e951Smrgfor details on some of the pertinent environment variables.
10244d8e951Smrg
10344d8e951Smrg   You can give `configure' initial values for configuration parameters
10444d8e951Smrgby setting variables in the command line or in the environment.  Here
10544d8e951Smrgis an example:
10644d8e951Smrg
10744d8e951Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10844d8e951Smrg
10944d8e951Smrg   *Note Defining Variables::, for more details.
11044d8e951Smrg
11144d8e951SmrgCompiling For Multiple Architectures
11244d8e951Smrg====================================
11344d8e951Smrg
11444d8e951Smrg   You can compile the package for more than one kind of computer at the
11544d8e951Smrgsame time, by placing the object files for each architecture in their
11644d8e951Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11744d8e951Smrgdirectory where you want the object files and executables to go and run
11844d8e951Smrgthe `configure' script.  `configure' automatically checks for the
119414cce6aSmrgsource code in the directory that `configure' is in and in `..'.  This
120414cce6aSmrgis known as a "VPATH" build.
12144d8e951Smrg
12244d8e951Smrg   With a non-GNU `make', it is safer to compile the package for one
12344d8e951Smrgarchitecture at a time in the source code directory.  After you have
12444d8e951Smrginstalled the package for one architecture, use `make distclean' before
12544d8e951Smrgreconfiguring for another architecture.
12644d8e951Smrg
12744d8e951Smrg   On MacOS X 10.5 and later systems, you can create libraries and
12844d8e951Smrgexecutables that work on multiple system types--known as "fat" or
12944d8e951Smrg"universal" binaries--by specifying multiple `-arch' options to the
13044d8e951Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
13144d8e951Smrgthis:
13244d8e951Smrg
13344d8e951Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13444d8e951Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13544d8e951Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
13644d8e951Smrg
13744d8e951Smrg   This is not guaranteed to produce working output in all cases, you
13844d8e951Smrgmay have to build one architecture at a time and combine the results
13944d8e951Smrgusing the `lipo' tool if you have problems.
14044d8e951Smrg
14144d8e951SmrgInstallation Names
14244d8e951Smrg==================
14344d8e951Smrg
14444d8e951Smrg   By default, `make install' installs the package's commands under
14544d8e951Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14644d8e951Smrgcan specify an installation prefix other than `/usr/local' by giving
147414cce6aSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148414cce6aSmrgabsolute file name.
14944d8e951Smrg
15044d8e951Smrg   You can specify separate installation prefixes for
15144d8e951Smrgarchitecture-specific files and architecture-independent files.  If you
15244d8e951Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15344d8e951SmrgPREFIX as the prefix for installing programs and libraries.
15444d8e951SmrgDocumentation and other data files still use the regular prefix.
15544d8e951Smrg
15644d8e951Smrg   In addition, if you use an unusual directory layout you can give
15744d8e951Smrgoptions like `--bindir=DIR' to specify different values for particular
15844d8e951Smrgkinds of files.  Run `configure --help' for a list of the directories
159414cce6aSmrgyou can set and what kinds of files go in them.  In general, the
160414cce6aSmrgdefault for these options is expressed in terms of `${prefix}', so that
161414cce6aSmrgspecifying just `--prefix' will affect all of the other directory
162414cce6aSmrgspecifications that were not explicitly provided.
163414cce6aSmrg
164414cce6aSmrg   The most portable way to affect installation locations is to pass the
165414cce6aSmrgcorrect locations to `configure'; however, many packages provide one or
166414cce6aSmrgboth of the following shortcuts of passing variable assignments to the
167414cce6aSmrg`make install' command line to change installation locations without
168414cce6aSmrghaving to reconfigure or recompile.
169414cce6aSmrg
170414cce6aSmrg   The first method involves providing an override variable for each
171414cce6aSmrgaffected directory.  For example, `make install
172414cce6aSmrgprefix=/alternate/directory' will choose an alternate location for all
173414cce6aSmrgdirectory configuration variables that were expressed in terms of
174414cce6aSmrg`${prefix}'.  Any directories that were specified during `configure',
175414cce6aSmrgbut not in terms of `${prefix}', must each be overridden at install
176414cce6aSmrgtime for the entire installation to be relocated.  The approach of
177414cce6aSmrgmakefile variable overrides for each directory variable is required by
178414cce6aSmrgthe GNU Coding Standards, and ideally causes no recompilation.
179414cce6aSmrgHowever, some platforms have known limitations with the semantics of
180414cce6aSmrgshared libraries that end up requiring recompilation when using this
181414cce6aSmrgmethod, particularly noticeable in packages that use GNU Libtool.
182414cce6aSmrg
183414cce6aSmrg   The second method involves providing the `DESTDIR' variable.  For
184414cce6aSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
185414cce6aSmrg`/alternate/directory' before all installation names.  The approach of
186414cce6aSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187414cce6aSmrgdoes not work on platforms that have drive letters.  On the other hand,
188414cce6aSmrgit does better at avoiding recompilation issues, and works well even
189414cce6aSmrgwhen some directory options were not specified in terms of `${prefix}'
190414cce6aSmrgat `configure' time.
191414cce6aSmrg
192414cce6aSmrgOptional Features
193414cce6aSmrg=================
19444d8e951Smrg
19544d8e951Smrg   If the package supports it, you can cause programs to be installed
19644d8e951Smrgwith an extra prefix or suffix on their names by giving `configure' the
19744d8e951Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19844d8e951Smrg
19944d8e951Smrg   Some packages pay attention to `--enable-FEATURE' options to
20044d8e951Smrg`configure', where FEATURE indicates an optional part of the package.
20144d8e951SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20244d8e951Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20344d8e951Smrg`README' should mention any `--enable-' and `--with-' options that the
20444d8e951Smrgpackage recognizes.
20544d8e951Smrg
20644d8e951Smrg   For packages that use the X Window System, `configure' can usually
20744d8e951Smrgfind the X include and library files automatically, but if it doesn't,
20844d8e951Smrgyou can use the `configure' options `--x-includes=DIR' and
20944d8e951Smrg`--x-libraries=DIR' to specify their locations.
21044d8e951Smrg
211414cce6aSmrg   Some packages offer the ability to configure how verbose the
212414cce6aSmrgexecution of `make' will be.  For these packages, running `./configure
213414cce6aSmrg--enable-silent-rules' sets the default to minimal output, which can be
214414cce6aSmrgoverridden with `make V=1'; while running `./configure
215414cce6aSmrg--disable-silent-rules' sets the default to verbose, which can be
216414cce6aSmrgoverridden with `make V=0'.
217414cce6aSmrg
21844d8e951SmrgParticular systems
21944d8e951Smrg==================
22044d8e951Smrg
22144d8e951Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22244d8e951SmrgCC is not installed, it is recommended to use the following options in
22344d8e951Smrgorder to use an ANSI C compiler:
22444d8e951Smrg
225414cce6aSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22644d8e951Smrg
22744d8e951Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22844d8e951Smrg
229414cce6aSmrg   HP-UX `make' updates targets which have the same time stamps as
230414cce6aSmrgtheir prerequisites, which makes it generally unusable when shipped
231414cce6aSmrggenerated files such as `configure' are involved.  Use GNU `make'
232414cce6aSmrginstead.
233414cce6aSmrg
23444d8e951Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23544d8e951Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23644d8e951Smrga workaround.  If GNU CC is not installed, it is therefore recommended
23744d8e951Smrgto try
23844d8e951Smrg
23944d8e951Smrg     ./configure CC="cc"
24044d8e951Smrg
24144d8e951Smrgand if that doesn't work, try
24244d8e951Smrg
24344d8e951Smrg     ./configure CC="cc -nodtk"
24444d8e951Smrg
245414cce6aSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246414cce6aSmrgdirectory contains several dysfunctional programs; working variants of
247414cce6aSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248414cce6aSmrgin your `PATH', put it _after_ `/usr/bin'.
249414cce6aSmrg
250414cce6aSmrg   On Haiku, software installed for all users goes in `/boot/common',
251414cce6aSmrgnot `/usr/local'.  It is recommended to use the following options:
252414cce6aSmrg
253414cce6aSmrg     ./configure --prefix=/boot/common
254414cce6aSmrg
25544d8e951SmrgSpecifying the System Type
25644d8e951Smrg==========================
25744d8e951Smrg
25844d8e951Smrg   There may be some features `configure' cannot figure out
25944d8e951Smrgautomatically, but needs to determine by the type of machine the package
26044d8e951Smrgwill run on.  Usually, assuming the package is built to be run on the
26144d8e951Smrg_same_ architectures, `configure' can figure that out, but if it prints
26244d8e951Smrga message saying it cannot guess the machine type, give it the
26344d8e951Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26444d8e951Smrgtype, such as `sun4', or a canonical name which has the form:
26544d8e951Smrg
26644d8e951Smrg     CPU-COMPANY-SYSTEM
26744d8e951Smrg
26844d8e951Smrgwhere SYSTEM can have one of these forms:
26944d8e951Smrg
270414cce6aSmrg     OS
271414cce6aSmrg     KERNEL-OS
27244d8e951Smrg
27344d8e951Smrg   See the file `config.sub' for the possible values of each field.  If
27444d8e951Smrg`config.sub' isn't included in this package, then this package doesn't
27544d8e951Smrgneed to know the machine type.
27644d8e951Smrg
27744d8e951Smrg   If you are _building_ compiler tools for cross-compiling, you should
27844d8e951Smrguse the option `--target=TYPE' to select the type of system they will
27944d8e951Smrgproduce code for.
28044d8e951Smrg
28144d8e951Smrg   If you want to _use_ a cross compiler, that generates code for a
28244d8e951Smrgplatform different from the build platform, you should specify the
28344d8e951Smrg"host" platform (i.e., that on which the generated programs will
28444d8e951Smrgeventually be run) with `--host=TYPE'.
28544d8e951Smrg
28644d8e951SmrgSharing Defaults
28744d8e951Smrg================
28844d8e951Smrg
28944d8e951Smrg   If you want to set default values for `configure' scripts to share,
29044d8e951Smrgyou can create a site shell script called `config.site' that gives
29144d8e951Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
29244d8e951Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29344d8e951Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29444d8e951Smrg`CONFIG_SITE' environment variable to the location of the site script.
29544d8e951SmrgA warning: not all `configure' scripts look for a site script.
29644d8e951Smrg
29744d8e951SmrgDefining Variables
29844d8e951Smrg==================
29944d8e951Smrg
30044d8e951Smrg   Variables not defined in a site shell script can be set in the
30144d8e951Smrgenvironment passed to `configure'.  However, some packages may run
30244d8e951Smrgconfigure again during the build, and the customized values of these
30344d8e951Smrgvariables may be lost.  In order to avoid this problem, you should set
30444d8e951Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30544d8e951Smrg
30644d8e951Smrg     ./configure CC=/usr/local2/bin/gcc
30744d8e951Smrg
30844d8e951Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30944d8e951Smrgoverridden in the site shell script).
31044d8e951Smrg
31144d8e951SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31244d8e951Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31344d8e951Smrg
31444d8e951Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31544d8e951Smrg
31644d8e951Smrg`configure' Invocation
31744d8e951Smrg======================
31844d8e951Smrg
31944d8e951Smrg   `configure' recognizes the following options to control how it
32044d8e951Smrgoperates.
32144d8e951Smrg
32244d8e951Smrg`--help'
32344d8e951Smrg`-h'
32444d8e951Smrg     Print a summary of all of the options to `configure', and exit.
32544d8e951Smrg
32644d8e951Smrg`--help=short'
32744d8e951Smrg`--help=recursive'
32844d8e951Smrg     Print a summary of the options unique to this package's
32944d8e951Smrg     `configure', and exit.  The `short' variant lists options used
33044d8e951Smrg     only in the top level, while the `recursive' variant lists options
33144d8e951Smrg     also present in any nested packages.
33244d8e951Smrg
33344d8e951Smrg`--version'
33444d8e951Smrg`-V'
33544d8e951Smrg     Print the version of Autoconf used to generate the `configure'
33644d8e951Smrg     script, and exit.
33744d8e951Smrg
33844d8e951Smrg`--cache-file=FILE'
33944d8e951Smrg     Enable the cache: use and save the results of the tests in FILE,
34044d8e951Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34144d8e951Smrg     disable caching.
34244d8e951Smrg
34344d8e951Smrg`--config-cache'
34444d8e951Smrg`-C'
34544d8e951Smrg     Alias for `--cache-file=config.cache'.
34644d8e951Smrg
34744d8e951Smrg`--quiet'
34844d8e951Smrg`--silent'
34944d8e951Smrg`-q'
35044d8e951Smrg     Do not print messages saying which checks are being made.  To
35144d8e951Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35244d8e951Smrg     messages will still be shown).
35344d8e951Smrg
35444d8e951Smrg`--srcdir=DIR'
35544d8e951Smrg     Look for the package's source code in directory DIR.  Usually
35644d8e951Smrg     `configure' can determine that directory automatically.
35744d8e951Smrg
35844d8e951Smrg`--prefix=DIR'
359414cce6aSmrg     Use DIR as the installation prefix.  *note Installation Names::
36044d8e951Smrg     for more details, including other options available for fine-tuning
36144d8e951Smrg     the installation locations.
36244d8e951Smrg
36344d8e951Smrg`--no-create'
36444d8e951Smrg`-n'
36544d8e951Smrg     Run the configure checks, but stop before creating any output
36644d8e951Smrg     files.
36744d8e951Smrg
36844d8e951Smrg`configure' also accepts some other, not widely useful, options.  Run
36944d8e951Smrg`configure --help' for more details.
37044d8e951Smrg
371