141c30155SmrgInstallation Instructions
241c30155Smrg*************************
341c30155Smrg
461b3db43SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
561b3db43SmrgInc.
641c30155Smrg
761b3db43Smrg   Copying and distribution of this file, with or without modification,
861b3db43Smrgare permitted in any medium without royalty provided the copyright
961b3db43Smrgnotice and this notice are preserved.  This file is offered as-is,
1061b3db43Smrgwithout warranty of any kind.
1141c30155Smrg
1241c30155SmrgBasic Installation
1341c30155Smrg==================
1441c30155Smrg
1541c30155Smrg   Briefly, the shell commands `./configure; make; make install' should
1641c30155Smrgconfigure, build, and install this package.  The following
1741c30155Smrgmore-detailed instructions are generic; see the `README' file for
1861b3db43Smrginstructions specific to this package.  Some packages provide this
1961b3db43Smrg`INSTALL' file but do not implement all of the features documented
2061b3db43Smrgbelow.  The lack of an optional feature in a given package is not
2161b3db43Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2261b3db43Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2341c30155Smrg
2441c30155Smrg   The `configure' shell script attempts to guess correct values for
2541c30155Smrgvarious system-dependent variables used during compilation.  It uses
2641c30155Smrgthose values to create a `Makefile' in each directory of the package.
2741c30155SmrgIt may also create one or more `.h' files containing system-dependent
2841c30155Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2941c30155Smrgyou can run in the future to recreate the current configuration, and a
3041c30155Smrgfile `config.log' containing compiler output (useful mainly for
3141c30155Smrgdebugging `configure').
3241c30155Smrg
3341c30155Smrg   It can also use an optional file (typically called `config.cache'
3441c30155Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3541c30155Smrgthe results of its tests to speed up reconfiguring.  Caching is
3641c30155Smrgdisabled by default to prevent problems with accidental use of stale
3741c30155Smrgcache files.
3841c30155Smrg
3941c30155Smrg   If you need to do unusual things to compile the package, please try
4041c30155Smrgto figure out how `configure' could check whether to do them, and mail
4141c30155Smrgdiffs or instructions to the address given in the `README' so they can
4241c30155Smrgbe considered for the next release.  If you are using the cache, and at
4341c30155Smrgsome point `config.cache' contains results you don't want to keep, you
4441c30155Smrgmay remove or edit it.
4541c30155Smrg
4641c30155Smrg   The file `configure.ac' (or `configure.in') is used to create
4741c30155Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4841c30155Smrgyou want to change it or regenerate `configure' using a newer version
4941c30155Smrgof `autoconf'.
5041c30155Smrg
5161b3db43Smrg   The simplest way to compile this package is:
5241c30155Smrg
5341c30155Smrg  1. `cd' to the directory containing the package's source code and type
5441c30155Smrg     `./configure' to configure the package for your system.
5541c30155Smrg
5641c30155Smrg     Running `configure' might take a while.  While running, it prints
5741c30155Smrg     some messages telling which features it is checking for.
5841c30155Smrg
5941c30155Smrg  2. Type `make' to compile the package.
6041c30155Smrg
6141c30155Smrg  3. Optionally, type `make check' to run any self-tests that come with
6261b3db43Smrg     the package, generally using the just-built uninstalled binaries.
6341c30155Smrg
6441c30155Smrg  4. Type `make install' to install the programs and any data files and
6561b3db43Smrg     documentation.  When installing into a prefix owned by root, it is
6661b3db43Smrg     recommended that the package be configured and built as a regular
6761b3db43Smrg     user, and only the `make install' phase executed with root
6861b3db43Smrg     privileges.
6961b3db43Smrg
7061b3db43Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7161b3db43Smrg     this time using the binaries in their final installed location.
7261b3db43Smrg     This target does not install anything.  Running this target as a
7361b3db43Smrg     regular user, particularly if the prior `make install' required
7461b3db43Smrg     root privileges, verifies that the installation completed
7561b3db43Smrg     correctly.
7661b3db43Smrg
7761b3db43Smrg  6. You can remove the program binaries and object files from the
7841c30155Smrg     source code directory by typing `make clean'.  To also remove the
7941c30155Smrg     files that `configure' created (so you can compile the package for
8041c30155Smrg     a different kind of computer), type `make distclean'.  There is
8141c30155Smrg     also a `make maintainer-clean' target, but that is intended mainly
8241c30155Smrg     for the package's developers.  If you use it, you may have to get
8341c30155Smrg     all sorts of other programs in order to regenerate files that came
8441c30155Smrg     with the distribution.
8541c30155Smrg
8661b3db43Smrg  7. Often, you can also type `make uninstall' to remove the installed
8761b3db43Smrg     files again.  In practice, not all packages have tested that
8861b3db43Smrg     uninstallation works correctly, even though it is required by the
8961b3db43Smrg     GNU Coding Standards.
9061b3db43Smrg
9161b3db43Smrg  8. Some packages, particularly those that use Automake, provide `make
9261b3db43Smrg     distcheck', which can by used by developers to test that all other
9361b3db43Smrg     targets like `make install' and `make uninstall' work correctly.
9461b3db43Smrg     This target is generally not run by end users.
9541c30155Smrg
9641c30155SmrgCompilers and Options
9741c30155Smrg=====================
9841c30155Smrg
9941c30155Smrg   Some systems require unusual options for compilation or linking that
10041c30155Smrgthe `configure' script does not know about.  Run `./configure --help'
10141c30155Smrgfor details on some of the pertinent environment variables.
10241c30155Smrg
10341c30155Smrg   You can give `configure' initial values for configuration parameters
10441c30155Smrgby setting variables in the command line or in the environment.  Here
10541c30155Smrgis an example:
10641c30155Smrg
10741c30155Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10841c30155Smrg
10941c30155Smrg   *Note Defining Variables::, for more details.
11041c30155Smrg
11141c30155SmrgCompiling For Multiple Architectures
11241c30155Smrg====================================
11341c30155Smrg
11441c30155Smrg   You can compile the package for more than one kind of computer at the
11541c30155Smrgsame time, by placing the object files for each architecture in their
11641c30155Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11741c30155Smrgdirectory where you want the object files and executables to go and run
11841c30155Smrgthe `configure' script.  `configure' automatically checks for the
11961b3db43Smrgsource code in the directory that `configure' is in and in `..'.  This
12061b3db43Smrgis known as a "VPATH" build.
12141c30155Smrg
12241c30155Smrg   With a non-GNU `make', it is safer to compile the package for one
12341c30155Smrgarchitecture at a time in the source code directory.  After you have
12441c30155Smrginstalled the package for one architecture, use `make distclean' before
12541c30155Smrgreconfiguring for another architecture.
12641c30155Smrg
12741c30155Smrg   On MacOS X 10.5 and later systems, you can create libraries and
12841c30155Smrgexecutables that work on multiple system types--known as "fat" or
12941c30155Smrg"universal" binaries--by specifying multiple `-arch' options to the
13041c30155Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
13141c30155Smrgthis:
13241c30155Smrg
13341c30155Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13441c30155Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13541c30155Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
13641c30155Smrg
13741c30155Smrg   This is not guaranteed to produce working output in all cases, you
13841c30155Smrgmay have to build one architecture at a time and combine the results
13941c30155Smrgusing the `lipo' tool if you have problems.
14041c30155Smrg
14141c30155SmrgInstallation Names
14241c30155Smrg==================
14341c30155Smrg
14441c30155Smrg   By default, `make install' installs the package's commands under
14541c30155Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14641c30155Smrgcan specify an installation prefix other than `/usr/local' by giving
14761b3db43Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14861b3db43Smrgabsolute file name.
14941c30155Smrg
15041c30155Smrg   You can specify separate installation prefixes for
15141c30155Smrgarchitecture-specific files and architecture-independent files.  If you
15241c30155Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15341c30155SmrgPREFIX as the prefix for installing programs and libraries.
15441c30155SmrgDocumentation and other data files still use the regular prefix.
15541c30155Smrg
15641c30155Smrg   In addition, if you use an unusual directory layout you can give
15741c30155Smrgoptions like `--bindir=DIR' to specify different values for particular
15841c30155Smrgkinds of files.  Run `configure --help' for a list of the directories
15961b3db43Smrgyou can set and what kinds of files go in them.  In general, the
16061b3db43Smrgdefault for these options is expressed in terms of `${prefix}', so that
16161b3db43Smrgspecifying just `--prefix' will affect all of the other directory
16261b3db43Smrgspecifications that were not explicitly provided.
16361b3db43Smrg
16461b3db43Smrg   The most portable way to affect installation locations is to pass the
16561b3db43Smrgcorrect locations to `configure'; however, many packages provide one or
16661b3db43Smrgboth of the following shortcuts of passing variable assignments to the
16761b3db43Smrg`make install' command line to change installation locations without
16861b3db43Smrghaving to reconfigure or recompile.
16961b3db43Smrg
17061b3db43Smrg   The first method involves providing an override variable for each
17161b3db43Smrgaffected directory.  For example, `make install
17261b3db43Smrgprefix=/alternate/directory' will choose an alternate location for all
17361b3db43Smrgdirectory configuration variables that were expressed in terms of
17461b3db43Smrg`${prefix}'.  Any directories that were specified during `configure',
17561b3db43Smrgbut not in terms of `${prefix}', must each be overridden at install
17661b3db43Smrgtime for the entire installation to be relocated.  The approach of
17761b3db43Smrgmakefile variable overrides for each directory variable is required by
17861b3db43Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17961b3db43SmrgHowever, some platforms have known limitations with the semantics of
18061b3db43Smrgshared libraries that end up requiring recompilation when using this
18161b3db43Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18261b3db43Smrg
18361b3db43Smrg   The second method involves providing the `DESTDIR' variable.  For
18461b3db43Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18561b3db43Smrg`/alternate/directory' before all installation names.  The approach of
18661b3db43Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18761b3db43Smrgdoes not work on platforms that have drive letters.  On the other hand,
18861b3db43Smrgit does better at avoiding recompilation issues, and works well even
18961b3db43Smrgwhen some directory options were not specified in terms of `${prefix}'
19061b3db43Smrgat `configure' time.
19161b3db43Smrg
19261b3db43SmrgOptional Features
19361b3db43Smrg=================
19441c30155Smrg
19541c30155Smrg   If the package supports it, you can cause programs to be installed
19641c30155Smrgwith an extra prefix or suffix on their names by giving `configure' the
19741c30155Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19841c30155Smrg
19941c30155Smrg   Some packages pay attention to `--enable-FEATURE' options to
20041c30155Smrg`configure', where FEATURE indicates an optional part of the package.
20141c30155SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20241c30155Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20341c30155Smrg`README' should mention any `--enable-' and `--with-' options that the
20441c30155Smrgpackage recognizes.
20541c30155Smrg
20641c30155Smrg   For packages that use the X Window System, `configure' can usually
20741c30155Smrgfind the X include and library files automatically, but if it doesn't,
20841c30155Smrgyou can use the `configure' options `--x-includes=DIR' and
20941c30155Smrg`--x-libraries=DIR' to specify their locations.
21041c30155Smrg
21161b3db43Smrg   Some packages offer the ability to configure how verbose the
21261b3db43Smrgexecution of `make' will be.  For these packages, running `./configure
21361b3db43Smrg--enable-silent-rules' sets the default to minimal output, which can be
21461b3db43Smrgoverridden with `make V=1'; while running `./configure
21561b3db43Smrg--disable-silent-rules' sets the default to verbose, which can be
21661b3db43Smrgoverridden with `make V=0'.
21761b3db43Smrg
21841c30155SmrgParticular systems
21941c30155Smrg==================
22041c30155Smrg
22141c30155Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22241c30155SmrgCC is not installed, it is recommended to use the following options in
22341c30155Smrgorder to use an ANSI C compiler:
22441c30155Smrg
22561b3db43Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22641c30155Smrg
22741c30155Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22841c30155Smrg
22961b3db43Smrg   HP-UX `make' updates targets which have the same time stamps as
23061b3db43Smrgtheir prerequisites, which makes it generally unusable when shipped
23161b3db43Smrggenerated files such as `configure' are involved.  Use GNU `make'
23261b3db43Smrginstead.
23361b3db43Smrg
23441c30155Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23541c30155Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23641c30155Smrga workaround.  If GNU CC is not installed, it is therefore recommended
23741c30155Smrgto try
23841c30155Smrg
23941c30155Smrg     ./configure CC="cc"
24041c30155Smrg
24141c30155Smrgand if that doesn't work, try
24241c30155Smrg
24341c30155Smrg     ./configure CC="cc -nodtk"
24441c30155Smrg
24561b3db43Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24661b3db43Smrgdirectory contains several dysfunctional programs; working variants of
24761b3db43Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24861b3db43Smrgin your `PATH', put it _after_ `/usr/bin'.
24961b3db43Smrg
25061b3db43Smrg   On Haiku, software installed for all users goes in `/boot/common',
25161b3db43Smrgnot `/usr/local'.  It is recommended to use the following options:
25261b3db43Smrg
25361b3db43Smrg     ./configure --prefix=/boot/common
25461b3db43Smrg
25541c30155SmrgSpecifying the System Type
25641c30155Smrg==========================
25741c30155Smrg
25841c30155Smrg   There may be some features `configure' cannot figure out
25941c30155Smrgautomatically, but needs to determine by the type of machine the package
26041c30155Smrgwill run on.  Usually, assuming the package is built to be run on the
26141c30155Smrg_same_ architectures, `configure' can figure that out, but if it prints
26241c30155Smrga message saying it cannot guess the machine type, give it the
26341c30155Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26441c30155Smrgtype, such as `sun4', or a canonical name which has the form:
26541c30155Smrg
26641c30155Smrg     CPU-COMPANY-SYSTEM
26741c30155Smrg
26841c30155Smrgwhere SYSTEM can have one of these forms:
26941c30155Smrg
27061b3db43Smrg     OS
27161b3db43Smrg     KERNEL-OS
27241c30155Smrg
27341c30155Smrg   See the file `config.sub' for the possible values of each field.  If
27441c30155Smrg`config.sub' isn't included in this package, then this package doesn't
27541c30155Smrgneed to know the machine type.
27641c30155Smrg
27741c30155Smrg   If you are _building_ compiler tools for cross-compiling, you should
27841c30155Smrguse the option `--target=TYPE' to select the type of system they will
27941c30155Smrgproduce code for.
28041c30155Smrg
28141c30155Smrg   If you want to _use_ a cross compiler, that generates code for a
28241c30155Smrgplatform different from the build platform, you should specify the
28341c30155Smrg"host" platform (i.e., that on which the generated programs will
28441c30155Smrgeventually be run) with `--host=TYPE'.
28541c30155Smrg
28641c30155SmrgSharing Defaults
28741c30155Smrg================
28841c30155Smrg
28941c30155Smrg   If you want to set default values for `configure' scripts to share,
29041c30155Smrgyou can create a site shell script called `config.site' that gives
29141c30155Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
29241c30155Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29341c30155Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29441c30155Smrg`CONFIG_SITE' environment variable to the location of the site script.
29541c30155SmrgA warning: not all `configure' scripts look for a site script.
29641c30155Smrg
29741c30155SmrgDefining Variables
29841c30155Smrg==================
29941c30155Smrg
30041c30155Smrg   Variables not defined in a site shell script can be set in the
30141c30155Smrgenvironment passed to `configure'.  However, some packages may run
30241c30155Smrgconfigure again during the build, and the customized values of these
30341c30155Smrgvariables may be lost.  In order to avoid this problem, you should set
30441c30155Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30541c30155Smrg
30641c30155Smrg     ./configure CC=/usr/local2/bin/gcc
30741c30155Smrg
30841c30155Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30941c30155Smrgoverridden in the site shell script).
31041c30155Smrg
31141c30155SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31241c30155Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31341c30155Smrg
31441c30155Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31541c30155Smrg
31641c30155Smrg`configure' Invocation
31741c30155Smrg======================
31841c30155Smrg
31941c30155Smrg   `configure' recognizes the following options to control how it
32041c30155Smrgoperates.
32141c30155Smrg
32241c30155Smrg`--help'
32341c30155Smrg`-h'
32441c30155Smrg     Print a summary of all of the options to `configure', and exit.
32541c30155Smrg
32641c30155Smrg`--help=short'
32741c30155Smrg`--help=recursive'
32841c30155Smrg     Print a summary of the options unique to this package's
32941c30155Smrg     `configure', and exit.  The `short' variant lists options used
33041c30155Smrg     only in the top level, while the `recursive' variant lists options
33141c30155Smrg     also present in any nested packages.
33241c30155Smrg
33341c30155Smrg`--version'
33441c30155Smrg`-V'
33541c30155Smrg     Print the version of Autoconf used to generate the `configure'
33641c30155Smrg     script, and exit.
33741c30155Smrg
33841c30155Smrg`--cache-file=FILE'
33941c30155Smrg     Enable the cache: use and save the results of the tests in FILE,
34041c30155Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34141c30155Smrg     disable caching.
34241c30155Smrg
34341c30155Smrg`--config-cache'
34441c30155Smrg`-C'
34541c30155Smrg     Alias for `--cache-file=config.cache'.
34641c30155Smrg
34741c30155Smrg`--quiet'
34841c30155Smrg`--silent'
34941c30155Smrg`-q'
35041c30155Smrg     Do not print messages saying which checks are being made.  To
35141c30155Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35241c30155Smrg     messages will still be shown).
35341c30155Smrg
35441c30155Smrg`--srcdir=DIR'
35541c30155Smrg     Look for the package's source code in directory DIR.  Usually
35641c30155Smrg     `configure' can determine that directory automatically.
35741c30155Smrg
35841c30155Smrg`--prefix=DIR'
35961b3db43Smrg     Use DIR as the installation prefix.  *note Installation Names::
36041c30155Smrg     for more details, including other options available for fine-tuning
36141c30155Smrg     the installation locations.
36241c30155Smrg
36341c30155Smrg`--no-create'
36441c30155Smrg`-n'
36541c30155Smrg     Run the configure checks, but stop before creating any output
36641c30155Smrg     files.
36741c30155Smrg
36841c30155Smrg`configure' also accepts some other, not widely useful, options.  Run
36941c30155Smrg`configure --help' for more details.
37041c30155Smrg
371