174c14cd6SmrgInstallation Instructions
274c14cd6Smrg*************************
374c14cd6Smrg
421525869SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
521525869SmrgInc.
674c14cd6Smrg
721525869Smrg   Copying and distribution of this file, with or without modification,
821525869Smrgare permitted in any medium without royalty provided the copyright
921525869Smrgnotice and this notice are preserved.  This file is offered as-is,
1021525869Smrgwithout warranty of any kind.
1174c14cd6Smrg
1274c14cd6SmrgBasic Installation
1374c14cd6Smrg==================
1474c14cd6Smrg
1574c14cd6Smrg   Briefly, the shell commands `./configure; make; make install' should
1674c14cd6Smrgconfigure, build, and install this package.  The following
1774c14cd6Smrgmore-detailed instructions are generic; see the `README' file for
1821525869Smrginstructions specific to this package.  Some packages provide this
1921525869Smrg`INSTALL' file but do not implement all of the features documented
2021525869Smrgbelow.  The lack of an optional feature in a given package is not
2121525869Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2221525869Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2374c14cd6Smrg
2474c14cd6Smrg   The `configure' shell script attempts to guess correct values for
2574c14cd6Smrgvarious system-dependent variables used during compilation.  It uses
2674c14cd6Smrgthose values to create a `Makefile' in each directory of the package.
2774c14cd6SmrgIt may also create one or more `.h' files containing system-dependent
2874c14cd6Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2974c14cd6Smrgyou can run in the future to recreate the current configuration, and a
3074c14cd6Smrgfile `config.log' containing compiler output (useful mainly for
3174c14cd6Smrgdebugging `configure').
3274c14cd6Smrg
3374c14cd6Smrg   It can also use an optional file (typically called `config.cache'
3474c14cd6Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3574c14cd6Smrgthe results of its tests to speed up reconfiguring.  Caching is
3674c14cd6Smrgdisabled by default to prevent problems with accidental use of stale
3774c14cd6Smrgcache files.
3874c14cd6Smrg
3974c14cd6Smrg   If you need to do unusual things to compile the package, please try
4074c14cd6Smrgto figure out how `configure' could check whether to do them, and mail
4174c14cd6Smrgdiffs or instructions to the address given in the `README' so they can
4274c14cd6Smrgbe considered for the next release.  If you are using the cache, and at
4374c14cd6Smrgsome point `config.cache' contains results you don't want to keep, you
4474c14cd6Smrgmay remove or edit it.
4574c14cd6Smrg
4674c14cd6Smrg   The file `configure.ac' (or `configure.in') is used to create
4774c14cd6Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4874c14cd6Smrgyou want to change it or regenerate `configure' using a newer version
4974c14cd6Smrgof `autoconf'.
5074c14cd6Smrg
5121525869Smrg   The simplest way to compile this package is:
5274c14cd6Smrg
5374c14cd6Smrg  1. `cd' to the directory containing the package's source code and type
5474c14cd6Smrg     `./configure' to configure the package for your system.
5574c14cd6Smrg
5674c14cd6Smrg     Running `configure' might take a while.  While running, it prints
5774c14cd6Smrg     some messages telling which features it is checking for.
5874c14cd6Smrg
5974c14cd6Smrg  2. Type `make' to compile the package.
6074c14cd6Smrg
6174c14cd6Smrg  3. Optionally, type `make check' to run any self-tests that come with
6221525869Smrg     the package, generally using the just-built uninstalled binaries.
6374c14cd6Smrg
6474c14cd6Smrg  4. Type `make install' to install the programs and any data files and
6521525869Smrg     documentation.  When installing into a prefix owned by root, it is
6621525869Smrg     recommended that the package be configured and built as a regular
6721525869Smrg     user, and only the `make install' phase executed with root
6821525869Smrg     privileges.
6921525869Smrg
7021525869Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7121525869Smrg     this time using the binaries in their final installed location.
7221525869Smrg     This target does not install anything.  Running this target as a
7321525869Smrg     regular user, particularly if the prior `make install' required
7421525869Smrg     root privileges, verifies that the installation completed
7521525869Smrg     correctly.
7621525869Smrg
7721525869Smrg  6. You can remove the program binaries and object files from the
7874c14cd6Smrg     source code directory by typing `make clean'.  To also remove the
7974c14cd6Smrg     files that `configure' created (so you can compile the package for
8074c14cd6Smrg     a different kind of computer), type `make distclean'.  There is
8174c14cd6Smrg     also a `make maintainer-clean' target, but that is intended mainly
8274c14cd6Smrg     for the package's developers.  If you use it, you may have to get
8374c14cd6Smrg     all sorts of other programs in order to regenerate files that came
8474c14cd6Smrg     with the distribution.
8574c14cd6Smrg
8621525869Smrg  7. Often, you can also type `make uninstall' to remove the installed
8721525869Smrg     files again.  In practice, not all packages have tested that
8821525869Smrg     uninstallation works correctly, even though it is required by the
8921525869Smrg     GNU Coding Standards.
9021525869Smrg
9121525869Smrg  8. Some packages, particularly those that use Automake, provide `make
9221525869Smrg     distcheck', which can by used by developers to test that all other
9321525869Smrg     targets like `make install' and `make uninstall' work correctly.
9421525869Smrg     This target is generally not run by end users.
9574c14cd6Smrg
9674c14cd6SmrgCompilers and Options
9774c14cd6Smrg=====================
9874c14cd6Smrg
9974c14cd6Smrg   Some systems require unusual options for compilation or linking that
10074c14cd6Smrgthe `configure' script does not know about.  Run `./configure --help'
10174c14cd6Smrgfor details on some of the pertinent environment variables.
10274c14cd6Smrg
10374c14cd6Smrg   You can give `configure' initial values for configuration parameters
10474c14cd6Smrgby setting variables in the command line or in the environment.  Here
10574c14cd6Smrgis an example:
10674c14cd6Smrg
10774c14cd6Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10874c14cd6Smrg
10974c14cd6Smrg   *Note Defining Variables::, for more details.
11074c14cd6Smrg
11174c14cd6SmrgCompiling For Multiple Architectures
11274c14cd6Smrg====================================
11374c14cd6Smrg
11474c14cd6Smrg   You can compile the package for more than one kind of computer at the
11574c14cd6Smrgsame time, by placing the object files for each architecture in their
11674c14cd6Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11774c14cd6Smrgdirectory where you want the object files and executables to go and run
11874c14cd6Smrgthe `configure' script.  `configure' automatically checks for the
11921525869Smrgsource code in the directory that `configure' is in and in `..'.  This
12021525869Smrgis known as a "VPATH" build.
12174c14cd6Smrg
12274c14cd6Smrg   With a non-GNU `make', it is safer to compile the package for one
12374c14cd6Smrgarchitecture at a time in the source code directory.  After you have
12474c14cd6Smrginstalled the package for one architecture, use `make distclean' before
12574c14cd6Smrgreconfiguring for another architecture.
12674c14cd6Smrg
12774c14cd6Smrg   On MacOS X 10.5 and later systems, you can create libraries and
12874c14cd6Smrgexecutables that work on multiple system types--known as "fat" or
12974c14cd6Smrg"universal" binaries--by specifying multiple `-arch' options to the
13074c14cd6Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
13174c14cd6Smrgthis:
13274c14cd6Smrg
13374c14cd6Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13474c14cd6Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13574c14cd6Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
13674c14cd6Smrg
13774c14cd6Smrg   This is not guaranteed to produce working output in all cases, you
13874c14cd6Smrgmay have to build one architecture at a time and combine the results
13974c14cd6Smrgusing the `lipo' tool if you have problems.
14074c14cd6Smrg
14174c14cd6SmrgInstallation Names
14274c14cd6Smrg==================
14374c14cd6Smrg
14474c14cd6Smrg   By default, `make install' installs the package's commands under
14574c14cd6Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14674c14cd6Smrgcan specify an installation prefix other than `/usr/local' by giving
14721525869Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14821525869Smrgabsolute file name.
14974c14cd6Smrg
15074c14cd6Smrg   You can specify separate installation prefixes for
15174c14cd6Smrgarchitecture-specific files and architecture-independent files.  If you
15274c14cd6Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15374c14cd6SmrgPREFIX as the prefix for installing programs and libraries.
15474c14cd6SmrgDocumentation and other data files still use the regular prefix.
15574c14cd6Smrg
15674c14cd6Smrg   In addition, if you use an unusual directory layout you can give
15774c14cd6Smrgoptions like `--bindir=DIR' to specify different values for particular
15874c14cd6Smrgkinds of files.  Run `configure --help' for a list of the directories
15921525869Smrgyou can set and what kinds of files go in them.  In general, the
16021525869Smrgdefault for these options is expressed in terms of `${prefix}', so that
16121525869Smrgspecifying just `--prefix' will affect all of the other directory
16221525869Smrgspecifications that were not explicitly provided.
16321525869Smrg
16421525869Smrg   The most portable way to affect installation locations is to pass the
16521525869Smrgcorrect locations to `configure'; however, many packages provide one or
16621525869Smrgboth of the following shortcuts of passing variable assignments to the
16721525869Smrg`make install' command line to change installation locations without
16821525869Smrghaving to reconfigure or recompile.
16921525869Smrg
17021525869Smrg   The first method involves providing an override variable for each
17121525869Smrgaffected directory.  For example, `make install
17221525869Smrgprefix=/alternate/directory' will choose an alternate location for all
17321525869Smrgdirectory configuration variables that were expressed in terms of
17421525869Smrg`${prefix}'.  Any directories that were specified during `configure',
17521525869Smrgbut not in terms of `${prefix}', must each be overridden at install
17621525869Smrgtime for the entire installation to be relocated.  The approach of
17721525869Smrgmakefile variable overrides for each directory variable is required by
17821525869Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17921525869SmrgHowever, some platforms have known limitations with the semantics of
18021525869Smrgshared libraries that end up requiring recompilation when using this
18121525869Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18221525869Smrg
18321525869Smrg   The second method involves providing the `DESTDIR' variable.  For
18421525869Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18521525869Smrg`/alternate/directory' before all installation names.  The approach of
18621525869Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18721525869Smrgdoes not work on platforms that have drive letters.  On the other hand,
18821525869Smrgit does better at avoiding recompilation issues, and works well even
18921525869Smrgwhen some directory options were not specified in terms of `${prefix}'
19021525869Smrgat `configure' time.
19121525869Smrg
19221525869SmrgOptional Features
19321525869Smrg=================
19474c14cd6Smrg
19574c14cd6Smrg   If the package supports it, you can cause programs to be installed
19674c14cd6Smrgwith an extra prefix or suffix on their names by giving `configure' the
19774c14cd6Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19874c14cd6Smrg
19974c14cd6Smrg   Some packages pay attention to `--enable-FEATURE' options to
20074c14cd6Smrg`configure', where FEATURE indicates an optional part of the package.
20174c14cd6SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20274c14cd6Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20374c14cd6Smrg`README' should mention any `--enable-' and `--with-' options that the
20474c14cd6Smrgpackage recognizes.
20574c14cd6Smrg
20674c14cd6Smrg   For packages that use the X Window System, `configure' can usually
20774c14cd6Smrgfind the X include and library files automatically, but if it doesn't,
20874c14cd6Smrgyou can use the `configure' options `--x-includes=DIR' and
20974c14cd6Smrg`--x-libraries=DIR' to specify their locations.
21074c14cd6Smrg
21121525869Smrg   Some packages offer the ability to configure how verbose the
21221525869Smrgexecution of `make' will be.  For these packages, running `./configure
21321525869Smrg--enable-silent-rules' sets the default to minimal output, which can be
21421525869Smrgoverridden with `make V=1'; while running `./configure
21521525869Smrg--disable-silent-rules' sets the default to verbose, which can be
21621525869Smrgoverridden with `make V=0'.
21721525869Smrg
21874c14cd6SmrgParticular systems
21974c14cd6Smrg==================
22074c14cd6Smrg
22174c14cd6Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22274c14cd6SmrgCC is not installed, it is recommended to use the following options in
22374c14cd6Smrgorder to use an ANSI C compiler:
22474c14cd6Smrg
22521525869Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22674c14cd6Smrg
22774c14cd6Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22874c14cd6Smrg
22921525869Smrg   HP-UX `make' updates targets which have the same time stamps as
23021525869Smrgtheir prerequisites, which makes it generally unusable when shipped
23121525869Smrggenerated files such as `configure' are involved.  Use GNU `make'
23221525869Smrginstead.
23321525869Smrg
23474c14cd6Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23574c14cd6Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23674c14cd6Smrga workaround.  If GNU CC is not installed, it is therefore recommended
23774c14cd6Smrgto try
23874c14cd6Smrg
23974c14cd6Smrg     ./configure CC="cc"
24074c14cd6Smrg
24174c14cd6Smrgand if that doesn't work, try
24274c14cd6Smrg
24374c14cd6Smrg     ./configure CC="cc -nodtk"
24474c14cd6Smrg
24521525869Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24621525869Smrgdirectory contains several dysfunctional programs; working variants of
24721525869Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24821525869Smrgin your `PATH', put it _after_ `/usr/bin'.
24921525869Smrg
25021525869Smrg   On Haiku, software installed for all users goes in `/boot/common',
25121525869Smrgnot `/usr/local'.  It is recommended to use the following options:
25221525869Smrg
25321525869Smrg     ./configure --prefix=/boot/common
25421525869Smrg
25574c14cd6SmrgSpecifying the System Type
25674c14cd6Smrg==========================
25774c14cd6Smrg
25874c14cd6Smrg   There may be some features `configure' cannot figure out
25974c14cd6Smrgautomatically, but needs to determine by the type of machine the package
26074c14cd6Smrgwill run on.  Usually, assuming the package is built to be run on the
26174c14cd6Smrg_same_ architectures, `configure' can figure that out, but if it prints
26274c14cd6Smrga message saying it cannot guess the machine type, give it the
26374c14cd6Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26474c14cd6Smrgtype, such as `sun4', or a canonical name which has the form:
26574c14cd6Smrg
26674c14cd6Smrg     CPU-COMPANY-SYSTEM
26774c14cd6Smrg
26874c14cd6Smrgwhere SYSTEM can have one of these forms:
26974c14cd6Smrg
27021525869Smrg     OS
27121525869Smrg     KERNEL-OS
27274c14cd6Smrg
27374c14cd6Smrg   See the file `config.sub' for the possible values of each field.  If
27474c14cd6Smrg`config.sub' isn't included in this package, then this package doesn't
27574c14cd6Smrgneed to know the machine type.
27674c14cd6Smrg
27774c14cd6Smrg   If you are _building_ compiler tools for cross-compiling, you should
27874c14cd6Smrguse the option `--target=TYPE' to select the type of system they will
27974c14cd6Smrgproduce code for.
28074c14cd6Smrg
28174c14cd6Smrg   If you want to _use_ a cross compiler, that generates code for a
28274c14cd6Smrgplatform different from the build platform, you should specify the
28374c14cd6Smrg"host" platform (i.e., that on which the generated programs will
28474c14cd6Smrgeventually be run) with `--host=TYPE'.
28574c14cd6Smrg
28674c14cd6SmrgSharing Defaults
28774c14cd6Smrg================
28874c14cd6Smrg
28974c14cd6Smrg   If you want to set default values for `configure' scripts to share,
29074c14cd6Smrgyou can create a site shell script called `config.site' that gives
29174c14cd6Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
29274c14cd6Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29374c14cd6Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29474c14cd6Smrg`CONFIG_SITE' environment variable to the location of the site script.
29574c14cd6SmrgA warning: not all `configure' scripts look for a site script.
29674c14cd6Smrg
29774c14cd6SmrgDefining Variables
29874c14cd6Smrg==================
29974c14cd6Smrg
30074c14cd6Smrg   Variables not defined in a site shell script can be set in the
30174c14cd6Smrgenvironment passed to `configure'.  However, some packages may run
30274c14cd6Smrgconfigure again during the build, and the customized values of these
30374c14cd6Smrgvariables may be lost.  In order to avoid this problem, you should set
30474c14cd6Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30574c14cd6Smrg
30674c14cd6Smrg     ./configure CC=/usr/local2/bin/gcc
30774c14cd6Smrg
30874c14cd6Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30974c14cd6Smrgoverridden in the site shell script).
31074c14cd6Smrg
31174c14cd6SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31274c14cd6Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31374c14cd6Smrg
31474c14cd6Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31574c14cd6Smrg
31674c14cd6Smrg`configure' Invocation
31774c14cd6Smrg======================
31874c14cd6Smrg
31974c14cd6Smrg   `configure' recognizes the following options to control how it
32074c14cd6Smrgoperates.
32174c14cd6Smrg
32274c14cd6Smrg`--help'
32374c14cd6Smrg`-h'
32474c14cd6Smrg     Print a summary of all of the options to `configure', and exit.
32574c14cd6Smrg
32674c14cd6Smrg`--help=short'
32774c14cd6Smrg`--help=recursive'
32874c14cd6Smrg     Print a summary of the options unique to this package's
32974c14cd6Smrg     `configure', and exit.  The `short' variant lists options used
33074c14cd6Smrg     only in the top level, while the `recursive' variant lists options
33174c14cd6Smrg     also present in any nested packages.
33274c14cd6Smrg
33374c14cd6Smrg`--version'
33474c14cd6Smrg`-V'
33574c14cd6Smrg     Print the version of Autoconf used to generate the `configure'
33674c14cd6Smrg     script, and exit.
33774c14cd6Smrg
33874c14cd6Smrg`--cache-file=FILE'
33974c14cd6Smrg     Enable the cache: use and save the results of the tests in FILE,
34074c14cd6Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34174c14cd6Smrg     disable caching.
34274c14cd6Smrg
34374c14cd6Smrg`--config-cache'
34474c14cd6Smrg`-C'
34574c14cd6Smrg     Alias for `--cache-file=config.cache'.
34674c14cd6Smrg
34774c14cd6Smrg`--quiet'
34874c14cd6Smrg`--silent'
34974c14cd6Smrg`-q'
35074c14cd6Smrg     Do not print messages saying which checks are being made.  To
35174c14cd6Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35274c14cd6Smrg     messages will still be shown).
35374c14cd6Smrg
35474c14cd6Smrg`--srcdir=DIR'
35574c14cd6Smrg     Look for the package's source code in directory DIR.  Usually
35674c14cd6Smrg     `configure' can determine that directory automatically.
35774c14cd6Smrg
35874c14cd6Smrg`--prefix=DIR'
35921525869Smrg     Use DIR as the installation prefix.  *note Installation Names::
36074c14cd6Smrg     for more details, including other options available for fine-tuning
36174c14cd6Smrg     the installation locations.
36274c14cd6Smrg
36374c14cd6Smrg`--no-create'
36474c14cd6Smrg`-n'
36574c14cd6Smrg     Run the configure checks, but stop before creating any output
36674c14cd6Smrg     files.
36774c14cd6Smrg
36874c14cd6Smrg`configure' also accepts some other, not widely useful, options.  Run
36974c14cd6Smrg`configure --help' for more details.
37074c14cd6Smrg
371