155de1df9SmrgInstallation Instructions
255de1df9Smrg*************************
355de1df9Smrg
416e5c272SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
516e5c272SmrgInc.
655de1df9Smrg
716e5c272Smrg   Copying and distribution of this file, with or without modification,
816e5c272Smrgare permitted in any medium without royalty provided the copyright
916e5c272Smrgnotice and this notice are preserved.  This file is offered as-is,
1016e5c272Smrgwithout warranty of any kind.
1155de1df9Smrg
1255de1df9SmrgBasic Installation
1355de1df9Smrg==================
1455de1df9Smrg
1555de1df9Smrg   Briefly, the shell commands `./configure; make; make install' should
1655de1df9Smrgconfigure, build, and install this package.  The following
1755de1df9Smrgmore-detailed instructions are generic; see the `README' file for
1816e5c272Smrginstructions specific to this package.  Some packages provide this
1916e5c272Smrg`INSTALL' file but do not implement all of the features documented
2016e5c272Smrgbelow.  The lack of an optional feature in a given package is not
2116e5c272Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2216e5c272Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2355de1df9Smrg
2455de1df9Smrg   The `configure' shell script attempts to guess correct values for
2555de1df9Smrgvarious system-dependent variables used during compilation.  It uses
2655de1df9Smrgthose values to create a `Makefile' in each directory of the package.
2755de1df9SmrgIt may also create one or more `.h' files containing system-dependent
2855de1df9Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2955de1df9Smrgyou can run in the future to recreate the current configuration, and a
3055de1df9Smrgfile `config.log' containing compiler output (useful mainly for
3155de1df9Smrgdebugging `configure').
3255de1df9Smrg
3355de1df9Smrg   It can also use an optional file (typically called `config.cache'
3455de1df9Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3555de1df9Smrgthe results of its tests to speed up reconfiguring.  Caching is
3655de1df9Smrgdisabled by default to prevent problems with accidental use of stale
3755de1df9Smrgcache files.
3855de1df9Smrg
3955de1df9Smrg   If you need to do unusual things to compile the package, please try
4055de1df9Smrgto figure out how `configure' could check whether to do them, and mail
4155de1df9Smrgdiffs or instructions to the address given in the `README' so they can
4255de1df9Smrgbe considered for the next release.  If you are using the cache, and at
4355de1df9Smrgsome point `config.cache' contains results you don't want to keep, you
4455de1df9Smrgmay remove or edit it.
4555de1df9Smrg
4655de1df9Smrg   The file `configure.ac' (or `configure.in') is used to create
4755de1df9Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4855de1df9Smrgyou want to change it or regenerate `configure' using a newer version
4955de1df9Smrgof `autoconf'.
5055de1df9Smrg
5116e5c272Smrg   The simplest way to compile this package is:
5255de1df9Smrg
5355de1df9Smrg  1. `cd' to the directory containing the package's source code and type
5455de1df9Smrg     `./configure' to configure the package for your system.
5555de1df9Smrg
5655de1df9Smrg     Running `configure' might take a while.  While running, it prints
5755de1df9Smrg     some messages telling which features it is checking for.
5855de1df9Smrg
5955de1df9Smrg  2. Type `make' to compile the package.
6055de1df9Smrg
6155de1df9Smrg  3. Optionally, type `make check' to run any self-tests that come with
6216e5c272Smrg     the package, generally using the just-built uninstalled binaries.
6355de1df9Smrg
6455de1df9Smrg  4. Type `make install' to install the programs and any data files and
6516e5c272Smrg     documentation.  When installing into a prefix owned by root, it is
6616e5c272Smrg     recommended that the package be configured and built as a regular
6716e5c272Smrg     user, and only the `make install' phase executed with root
6816e5c272Smrg     privileges.
6916e5c272Smrg
7016e5c272Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7116e5c272Smrg     this time using the binaries in their final installed location.
7216e5c272Smrg     This target does not install anything.  Running this target as a
7316e5c272Smrg     regular user, particularly if the prior `make install' required
7416e5c272Smrg     root privileges, verifies that the installation completed
7516e5c272Smrg     correctly.
7616e5c272Smrg
7716e5c272Smrg  6. You can remove the program binaries and object files from the
7855de1df9Smrg     source code directory by typing `make clean'.  To also remove the
7955de1df9Smrg     files that `configure' created (so you can compile the package for
8055de1df9Smrg     a different kind of computer), type `make distclean'.  There is
8155de1df9Smrg     also a `make maintainer-clean' target, but that is intended mainly
8255de1df9Smrg     for the package's developers.  If you use it, you may have to get
8355de1df9Smrg     all sorts of other programs in order to regenerate files that came
8455de1df9Smrg     with the distribution.
8555de1df9Smrg
8616e5c272Smrg  7. Often, you can also type `make uninstall' to remove the installed
8716e5c272Smrg     files again.  In practice, not all packages have tested that
8816e5c272Smrg     uninstallation works correctly, even though it is required by the
8916e5c272Smrg     GNU Coding Standards.
9016e5c272Smrg
9116e5c272Smrg  8. Some packages, particularly those that use Automake, provide `make
9216e5c272Smrg     distcheck', which can by used by developers to test that all other
9316e5c272Smrg     targets like `make install' and `make uninstall' work correctly.
9416e5c272Smrg     This target is generally not run by end users.
9555de1df9Smrg
9655de1df9SmrgCompilers and Options
9755de1df9Smrg=====================
9855de1df9Smrg
9955de1df9Smrg   Some systems require unusual options for compilation or linking that
10055de1df9Smrgthe `configure' script does not know about.  Run `./configure --help'
10155de1df9Smrgfor details on some of the pertinent environment variables.
10255de1df9Smrg
10355de1df9Smrg   You can give `configure' initial values for configuration parameters
10455de1df9Smrgby setting variables in the command line or in the environment.  Here
10555de1df9Smrgis an example:
10655de1df9Smrg
10755de1df9Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10855de1df9Smrg
10955de1df9Smrg   *Note Defining Variables::, for more details.
11055de1df9Smrg
11155de1df9SmrgCompiling For Multiple Architectures
11255de1df9Smrg====================================
11355de1df9Smrg
11455de1df9Smrg   You can compile the package for more than one kind of computer at the
11555de1df9Smrgsame time, by placing the object files for each architecture in their
11655de1df9Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11755de1df9Smrgdirectory where you want the object files and executables to go and run
11855de1df9Smrgthe `configure' script.  `configure' automatically checks for the
11916e5c272Smrgsource code in the directory that `configure' is in and in `..'.  This
12016e5c272Smrgis known as a "VPATH" build.
12155de1df9Smrg
12255de1df9Smrg   With a non-GNU `make', it is safer to compile the package for one
12355de1df9Smrgarchitecture at a time in the source code directory.  After you have
12455de1df9Smrginstalled the package for one architecture, use `make distclean' before
12555de1df9Smrgreconfiguring for another architecture.
12655de1df9Smrg
12755de1df9Smrg   On MacOS X 10.5 and later systems, you can create libraries and
12855de1df9Smrgexecutables that work on multiple system types--known as "fat" or
12955de1df9Smrg"universal" binaries--by specifying multiple `-arch' options to the
13055de1df9Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
13155de1df9Smrgthis:
13255de1df9Smrg
13355de1df9Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13455de1df9Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13555de1df9Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
13655de1df9Smrg
13755de1df9Smrg   This is not guaranteed to produce working output in all cases, you
13855de1df9Smrgmay have to build one architecture at a time and combine the results
13955de1df9Smrgusing the `lipo' tool if you have problems.
14055de1df9Smrg
14155de1df9SmrgInstallation Names
14255de1df9Smrg==================
14355de1df9Smrg
14455de1df9Smrg   By default, `make install' installs the package's commands under
14555de1df9Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14655de1df9Smrgcan specify an installation prefix other than `/usr/local' by giving
14716e5c272Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14816e5c272Smrgabsolute file name.
14955de1df9Smrg
15055de1df9Smrg   You can specify separate installation prefixes for
15155de1df9Smrgarchitecture-specific files and architecture-independent files.  If you
15255de1df9Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15355de1df9SmrgPREFIX as the prefix for installing programs and libraries.
15455de1df9SmrgDocumentation and other data files still use the regular prefix.
15555de1df9Smrg
15655de1df9Smrg   In addition, if you use an unusual directory layout you can give
15755de1df9Smrgoptions like `--bindir=DIR' to specify different values for particular
15855de1df9Smrgkinds of files.  Run `configure --help' for a list of the directories
15916e5c272Smrgyou can set and what kinds of files go in them.  In general, the
16016e5c272Smrgdefault for these options is expressed in terms of `${prefix}', so that
16116e5c272Smrgspecifying just `--prefix' will affect all of the other directory
16216e5c272Smrgspecifications that were not explicitly provided.
16316e5c272Smrg
16416e5c272Smrg   The most portable way to affect installation locations is to pass the
16516e5c272Smrgcorrect locations to `configure'; however, many packages provide one or
16616e5c272Smrgboth of the following shortcuts of passing variable assignments to the
16716e5c272Smrg`make install' command line to change installation locations without
16816e5c272Smrghaving to reconfigure or recompile.
16916e5c272Smrg
17016e5c272Smrg   The first method involves providing an override variable for each
17116e5c272Smrgaffected directory.  For example, `make install
17216e5c272Smrgprefix=/alternate/directory' will choose an alternate location for all
17316e5c272Smrgdirectory configuration variables that were expressed in terms of
17416e5c272Smrg`${prefix}'.  Any directories that were specified during `configure',
17516e5c272Smrgbut not in terms of `${prefix}', must each be overridden at install
17616e5c272Smrgtime for the entire installation to be relocated.  The approach of
17716e5c272Smrgmakefile variable overrides for each directory variable is required by
17816e5c272Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17916e5c272SmrgHowever, some platforms have known limitations with the semantics of
18016e5c272Smrgshared libraries that end up requiring recompilation when using this
18116e5c272Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18216e5c272Smrg
18316e5c272Smrg   The second method involves providing the `DESTDIR' variable.  For
18416e5c272Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18516e5c272Smrg`/alternate/directory' before all installation names.  The approach of
18616e5c272Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18716e5c272Smrgdoes not work on platforms that have drive letters.  On the other hand,
18816e5c272Smrgit does better at avoiding recompilation issues, and works well even
18916e5c272Smrgwhen some directory options were not specified in terms of `${prefix}'
19016e5c272Smrgat `configure' time.
19116e5c272Smrg
19216e5c272SmrgOptional Features
19316e5c272Smrg=================
19455de1df9Smrg
19555de1df9Smrg   If the package supports it, you can cause programs to be installed
19655de1df9Smrgwith an extra prefix or suffix on their names by giving `configure' the
19755de1df9Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19855de1df9Smrg
19955de1df9Smrg   Some packages pay attention to `--enable-FEATURE' options to
20055de1df9Smrg`configure', where FEATURE indicates an optional part of the package.
20155de1df9SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20255de1df9Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20355de1df9Smrg`README' should mention any `--enable-' and `--with-' options that the
20455de1df9Smrgpackage recognizes.
20555de1df9Smrg
20655de1df9Smrg   For packages that use the X Window System, `configure' can usually
20755de1df9Smrgfind the X include and library files automatically, but if it doesn't,
20855de1df9Smrgyou can use the `configure' options `--x-includes=DIR' and
20955de1df9Smrg`--x-libraries=DIR' to specify their locations.
21055de1df9Smrg
21116e5c272Smrg   Some packages offer the ability to configure how verbose the
21216e5c272Smrgexecution of `make' will be.  For these packages, running `./configure
21316e5c272Smrg--enable-silent-rules' sets the default to minimal output, which can be
21416e5c272Smrgoverridden with `make V=1'; while running `./configure
21516e5c272Smrg--disable-silent-rules' sets the default to verbose, which can be
21616e5c272Smrgoverridden with `make V=0'.
21716e5c272Smrg
21855de1df9SmrgParticular systems
21955de1df9Smrg==================
22055de1df9Smrg
22155de1df9Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22255de1df9SmrgCC is not installed, it is recommended to use the following options in
22355de1df9Smrgorder to use an ANSI C compiler:
22455de1df9Smrg
22516e5c272Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22655de1df9Smrg
22755de1df9Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22855de1df9Smrg
22916e5c272Smrg   HP-UX `make' updates targets which have the same time stamps as
23016e5c272Smrgtheir prerequisites, which makes it generally unusable when shipped
23116e5c272Smrggenerated files such as `configure' are involved.  Use GNU `make'
23216e5c272Smrginstead.
23316e5c272Smrg
23455de1df9Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23555de1df9Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23655de1df9Smrga workaround.  If GNU CC is not installed, it is therefore recommended
23755de1df9Smrgto try
23855de1df9Smrg
23955de1df9Smrg     ./configure CC="cc"
24055de1df9Smrg
24155de1df9Smrgand if that doesn't work, try
24255de1df9Smrg
24355de1df9Smrg     ./configure CC="cc -nodtk"
24455de1df9Smrg
24516e5c272Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24616e5c272Smrgdirectory contains several dysfunctional programs; working variants of
24716e5c272Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24816e5c272Smrgin your `PATH', put it _after_ `/usr/bin'.
24916e5c272Smrg
25016e5c272Smrg   On Haiku, software installed for all users goes in `/boot/common',
25116e5c272Smrgnot `/usr/local'.  It is recommended to use the following options:
25216e5c272Smrg
25316e5c272Smrg     ./configure --prefix=/boot/common
25416e5c272Smrg
25555de1df9SmrgSpecifying the System Type
25655de1df9Smrg==========================
25755de1df9Smrg
25855de1df9Smrg   There may be some features `configure' cannot figure out
25955de1df9Smrgautomatically, but needs to determine by the type of machine the package
26055de1df9Smrgwill run on.  Usually, assuming the package is built to be run on the
26155de1df9Smrg_same_ architectures, `configure' can figure that out, but if it prints
26255de1df9Smrga message saying it cannot guess the machine type, give it the
26355de1df9Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26455de1df9Smrgtype, such as `sun4', or a canonical name which has the form:
26555de1df9Smrg
26655de1df9Smrg     CPU-COMPANY-SYSTEM
26755de1df9Smrg
26855de1df9Smrgwhere SYSTEM can have one of these forms:
26955de1df9Smrg
27016e5c272Smrg     OS
27116e5c272Smrg     KERNEL-OS
27255de1df9Smrg
27355de1df9Smrg   See the file `config.sub' for the possible values of each field.  If
27455de1df9Smrg`config.sub' isn't included in this package, then this package doesn't
27555de1df9Smrgneed to know the machine type.
27655de1df9Smrg
27755de1df9Smrg   If you are _building_ compiler tools for cross-compiling, you should
27855de1df9Smrguse the option `--target=TYPE' to select the type of system they will
27955de1df9Smrgproduce code for.
28055de1df9Smrg
28155de1df9Smrg   If you want to _use_ a cross compiler, that generates code for a
28255de1df9Smrgplatform different from the build platform, you should specify the
28355de1df9Smrg"host" platform (i.e., that on which the generated programs will
28455de1df9Smrgeventually be run) with `--host=TYPE'.
28555de1df9Smrg
28655de1df9SmrgSharing Defaults
28755de1df9Smrg================
28855de1df9Smrg
28955de1df9Smrg   If you want to set default values for `configure' scripts to share,
29055de1df9Smrgyou can create a site shell script called `config.site' that gives
29155de1df9Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
29255de1df9Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29355de1df9Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29455de1df9Smrg`CONFIG_SITE' environment variable to the location of the site script.
29555de1df9SmrgA warning: not all `configure' scripts look for a site script.
29655de1df9Smrg
29755de1df9SmrgDefining Variables
29855de1df9Smrg==================
29955de1df9Smrg
30055de1df9Smrg   Variables not defined in a site shell script can be set in the
30155de1df9Smrgenvironment passed to `configure'.  However, some packages may run
30255de1df9Smrgconfigure again during the build, and the customized values of these
30355de1df9Smrgvariables may be lost.  In order to avoid this problem, you should set
30455de1df9Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30555de1df9Smrg
30655de1df9Smrg     ./configure CC=/usr/local2/bin/gcc
30755de1df9Smrg
30855de1df9Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30955de1df9Smrgoverridden in the site shell script).
31055de1df9Smrg
31155de1df9SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31255de1df9Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31355de1df9Smrg
31455de1df9Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31555de1df9Smrg
31655de1df9Smrg`configure' Invocation
31755de1df9Smrg======================
31855de1df9Smrg
31955de1df9Smrg   `configure' recognizes the following options to control how it
32055de1df9Smrgoperates.
32155de1df9Smrg
32255de1df9Smrg`--help'
32355de1df9Smrg`-h'
32455de1df9Smrg     Print a summary of all of the options to `configure', and exit.
32555de1df9Smrg
32655de1df9Smrg`--help=short'
32755de1df9Smrg`--help=recursive'
32855de1df9Smrg     Print a summary of the options unique to this package's
32955de1df9Smrg     `configure', and exit.  The `short' variant lists options used
33055de1df9Smrg     only in the top level, while the `recursive' variant lists options
33155de1df9Smrg     also present in any nested packages.
33255de1df9Smrg
33355de1df9Smrg`--version'
33455de1df9Smrg`-V'
33555de1df9Smrg     Print the version of Autoconf used to generate the `configure'
33655de1df9Smrg     script, and exit.
33755de1df9Smrg
33855de1df9Smrg`--cache-file=FILE'
33955de1df9Smrg     Enable the cache: use and save the results of the tests in FILE,
34055de1df9Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34155de1df9Smrg     disable caching.
34255de1df9Smrg
34355de1df9Smrg`--config-cache'
34455de1df9Smrg`-C'
34555de1df9Smrg     Alias for `--cache-file=config.cache'.
34655de1df9Smrg
34755de1df9Smrg`--quiet'
34855de1df9Smrg`--silent'
34955de1df9Smrg`-q'
35055de1df9Smrg     Do not print messages saying which checks are being made.  To
35155de1df9Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35255de1df9Smrg     messages will still be shown).
35355de1df9Smrg
35455de1df9Smrg`--srcdir=DIR'
35555de1df9Smrg     Look for the package's source code in directory DIR.  Usually
35655de1df9Smrg     `configure' can determine that directory automatically.
35755de1df9Smrg
35855de1df9Smrg`--prefix=DIR'
35916e5c272Smrg     Use DIR as the installation prefix.  *note Installation Names::
36055de1df9Smrg     for more details, including other options available for fine-tuning
36155de1df9Smrg     the installation locations.
36255de1df9Smrg
36355de1df9Smrg`--no-create'
36455de1df9Smrg`-n'
36555de1df9Smrg     Run the configure checks, but stop before creating any output
36655de1df9Smrg     files.
36755de1df9Smrg
36855de1df9Smrg`configure' also accepts some other, not widely useful, options.  Run
36955de1df9Smrg`configure --help' for more details.
37055de1df9Smrg
371