INSTALL revision 75b29833
175b29833SmrgInstallation Instructions
275b29833Smrg*************************
375b29833Smrg
475b29833SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
575b29833SmrgInc.
675b29833Smrg
775b29833Smrg   Copying and distribution of this file, with or without modification,
875b29833Smrgare permitted in any medium without royalty provided the copyright
975b29833Smrgnotice and this notice are preserved.  This file is offered as-is,
1075b29833Smrgwithout warranty of any kind.
1175b29833Smrg
1275b29833SmrgBasic Installation
1375b29833Smrg==================
1475b29833Smrg
1575b29833Smrg   Briefly, the shell commands `./configure; make; make install' should
1675b29833Smrgconfigure, build, and install this package.  The following
1775b29833Smrgmore-detailed instructions are generic; see the `README' file for
1875b29833Smrginstructions specific to this package.  Some packages provide this
1975b29833Smrg`INSTALL' file but do not implement all of the features documented
2075b29833Smrgbelow.  The lack of an optional feature in a given package is not
2175b29833Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2275b29833Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2375b29833Smrg
2475b29833Smrg   The `configure' shell script attempts to guess correct values for
2575b29833Smrgvarious system-dependent variables used during compilation.  It uses
2675b29833Smrgthose values to create a `Makefile' in each directory of the package.
2775b29833SmrgIt may also create one or more `.h' files containing system-dependent
2875b29833Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2975b29833Smrgyou can run in the future to recreate the current configuration, and a
3075b29833Smrgfile `config.log' containing compiler output (useful mainly for
3175b29833Smrgdebugging `configure').
3275b29833Smrg
3375b29833Smrg   It can also use an optional file (typically called `config.cache'
3475b29833Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3575b29833Smrgthe results of its tests to speed up reconfiguring.  Caching is
3675b29833Smrgdisabled by default to prevent problems with accidental use of stale
3775b29833Smrgcache files.
3875b29833Smrg
3975b29833Smrg   If you need to do unusual things to compile the package, please try
4075b29833Smrgto figure out how `configure' could check whether to do them, and mail
4175b29833Smrgdiffs or instructions to the address given in the `README' so they can
4275b29833Smrgbe considered for the next release.  If you are using the cache, and at
4375b29833Smrgsome point `config.cache' contains results you don't want to keep, you
4475b29833Smrgmay remove or edit it.
4575b29833Smrg
4675b29833Smrg   The file `configure.ac' (or `configure.in') is used to create
4775b29833Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4875b29833Smrgyou want to change it or regenerate `configure' using a newer version
4975b29833Smrgof `autoconf'.
5075b29833Smrg
5175b29833Smrg   The simplest way to compile this package is:
5275b29833Smrg
5375b29833Smrg  1. `cd' to the directory containing the package's source code and type
5475b29833Smrg     `./configure' to configure the package for your system.
5575b29833Smrg
5675b29833Smrg     Running `configure' might take a while.  While running, it prints
5775b29833Smrg     some messages telling which features it is checking for.
5875b29833Smrg
5975b29833Smrg  2. Type `make' to compile the package.
6075b29833Smrg
6175b29833Smrg  3. Optionally, type `make check' to run any self-tests that come with
6275b29833Smrg     the package, generally using the just-built uninstalled binaries.
6375b29833Smrg
6475b29833Smrg  4. Type `make install' to install the programs and any data files and
6575b29833Smrg     documentation.  When installing into a prefix owned by root, it is
6675b29833Smrg     recommended that the package be configured and built as a regular
6775b29833Smrg     user, and only the `make install' phase executed with root
6875b29833Smrg     privileges.
6975b29833Smrg
7075b29833Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7175b29833Smrg     this time using the binaries in their final installed location.
7275b29833Smrg     This target does not install anything.  Running this target as a
7375b29833Smrg     regular user, particularly if the prior `make install' required
7475b29833Smrg     root privileges, verifies that the installation completed
7575b29833Smrg     correctly.
7675b29833Smrg
7775b29833Smrg  6. You can remove the program binaries and object files from the
7875b29833Smrg     source code directory by typing `make clean'.  To also remove the
7975b29833Smrg     files that `configure' created (so you can compile the package for
8075b29833Smrg     a different kind of computer), type `make distclean'.  There is
8175b29833Smrg     also a `make maintainer-clean' target, but that is intended mainly
8275b29833Smrg     for the package's developers.  If you use it, you may have to get
8375b29833Smrg     all sorts of other programs in order to regenerate files that came
8475b29833Smrg     with the distribution.
8575b29833Smrg
8675b29833Smrg  7. Often, you can also type `make uninstall' to remove the installed
8775b29833Smrg     files again.  In practice, not all packages have tested that
8875b29833Smrg     uninstallation works correctly, even though it is required by the
8975b29833Smrg     GNU Coding Standards.
9075b29833Smrg
9175b29833Smrg  8. Some packages, particularly those that use Automake, provide `make
9275b29833Smrg     distcheck', which can by used by developers to test that all other
9375b29833Smrg     targets like `make install' and `make uninstall' work correctly.
9475b29833Smrg     This target is generally not run by end users.
9575b29833Smrg
9675b29833SmrgCompilers and Options
9775b29833Smrg=====================
9875b29833Smrg
9975b29833Smrg   Some systems require unusual options for compilation or linking that
10075b29833Smrgthe `configure' script does not know about.  Run `./configure --help'
10175b29833Smrgfor details on some of the pertinent environment variables.
10275b29833Smrg
10375b29833Smrg   You can give `configure' initial values for configuration parameters
10475b29833Smrgby setting variables in the command line or in the environment.  Here
10575b29833Smrgis an example:
10675b29833Smrg
10775b29833Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10875b29833Smrg
10975b29833Smrg   *Note Defining Variables::, for more details.
11075b29833Smrg
11175b29833SmrgCompiling For Multiple Architectures
11275b29833Smrg====================================
11375b29833Smrg
11475b29833Smrg   You can compile the package for more than one kind of computer at the
11575b29833Smrgsame time, by placing the object files for each architecture in their
11675b29833Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11775b29833Smrgdirectory where you want the object files and executables to go and run
11875b29833Smrgthe `configure' script.  `configure' automatically checks for the
11975b29833Smrgsource code in the directory that `configure' is in and in `..'.  This
12075b29833Smrgis known as a "VPATH" build.
12175b29833Smrg
12275b29833Smrg   With a non-GNU `make', it is safer to compile the package for one
12375b29833Smrgarchitecture at a time in the source code directory.  After you have
12475b29833Smrginstalled the package for one architecture, use `make distclean' before
12575b29833Smrgreconfiguring for another architecture.
12675b29833Smrg
12775b29833Smrg   On MacOS X 10.5 and later systems, you can create libraries and
12875b29833Smrgexecutables that work on multiple system types--known as "fat" or
12975b29833Smrg"universal" binaries--by specifying multiple `-arch' options to the
13075b29833Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
13175b29833Smrgthis:
13275b29833Smrg
13375b29833Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13475b29833Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13575b29833Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
13675b29833Smrg
13775b29833Smrg   This is not guaranteed to produce working output in all cases, you
13875b29833Smrgmay have to build one architecture at a time and combine the results
13975b29833Smrgusing the `lipo' tool if you have problems.
14075b29833Smrg
14175b29833SmrgInstallation Names
14275b29833Smrg==================
14375b29833Smrg
14475b29833Smrg   By default, `make install' installs the package's commands under
14575b29833Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14675b29833Smrgcan specify an installation prefix other than `/usr/local' by giving
14775b29833Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14875b29833Smrgabsolute file name.
14975b29833Smrg
15075b29833Smrg   You can specify separate installation prefixes for
15175b29833Smrgarchitecture-specific files and architecture-independent files.  If you
15275b29833Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15375b29833SmrgPREFIX as the prefix for installing programs and libraries.
15475b29833SmrgDocumentation and other data files still use the regular prefix.
15575b29833Smrg
15675b29833Smrg   In addition, if you use an unusual directory layout you can give
15775b29833Smrgoptions like `--bindir=DIR' to specify different values for particular
15875b29833Smrgkinds of files.  Run `configure --help' for a list of the directories
15975b29833Smrgyou can set and what kinds of files go in them.  In general, the
16075b29833Smrgdefault for these options is expressed in terms of `${prefix}', so that
16175b29833Smrgspecifying just `--prefix' will affect all of the other directory
16275b29833Smrgspecifications that were not explicitly provided.
16375b29833Smrg
16475b29833Smrg   The most portable way to affect installation locations is to pass the
16575b29833Smrgcorrect locations to `configure'; however, many packages provide one or
16675b29833Smrgboth of the following shortcuts of passing variable assignments to the
16775b29833Smrg`make install' command line to change installation locations without
16875b29833Smrghaving to reconfigure or recompile.
16975b29833Smrg
17075b29833Smrg   The first method involves providing an override variable for each
17175b29833Smrgaffected directory.  For example, `make install
17275b29833Smrgprefix=/alternate/directory' will choose an alternate location for all
17375b29833Smrgdirectory configuration variables that were expressed in terms of
17475b29833Smrg`${prefix}'.  Any directories that were specified during `configure',
17575b29833Smrgbut not in terms of `${prefix}', must each be overridden at install
17675b29833Smrgtime for the entire installation to be relocated.  The approach of
17775b29833Smrgmakefile variable overrides for each directory variable is required by
17875b29833Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17975b29833SmrgHowever, some platforms have known limitations with the semantics of
18075b29833Smrgshared libraries that end up requiring recompilation when using this
18175b29833Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18275b29833Smrg
18375b29833Smrg   The second method involves providing the `DESTDIR' variable.  For
18475b29833Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18575b29833Smrg`/alternate/directory' before all installation names.  The approach of
18675b29833Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18775b29833Smrgdoes not work on platforms that have drive letters.  On the other hand,
18875b29833Smrgit does better at avoiding recompilation issues, and works well even
18975b29833Smrgwhen some directory options were not specified in terms of `${prefix}'
19075b29833Smrgat `configure' time.
19175b29833Smrg
19275b29833SmrgOptional Features
19375b29833Smrg=================
19475b29833Smrg
19575b29833Smrg   If the package supports it, you can cause programs to be installed
19675b29833Smrgwith an extra prefix or suffix on their names by giving `configure' the
19775b29833Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19875b29833Smrg
19975b29833Smrg   Some packages pay attention to `--enable-FEATURE' options to
20075b29833Smrg`configure', where FEATURE indicates an optional part of the package.
20175b29833SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20275b29833Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20375b29833Smrg`README' should mention any `--enable-' and `--with-' options that the
20475b29833Smrgpackage recognizes.
20575b29833Smrg
20675b29833Smrg   For packages that use the X Window System, `configure' can usually
20775b29833Smrgfind the X include and library files automatically, but if it doesn't,
20875b29833Smrgyou can use the `configure' options `--x-includes=DIR' and
20975b29833Smrg`--x-libraries=DIR' to specify their locations.
21075b29833Smrg
21175b29833Smrg   Some packages offer the ability to configure how verbose the
21275b29833Smrgexecution of `make' will be.  For these packages, running `./configure
21375b29833Smrg--enable-silent-rules' sets the default to minimal output, which can be
21475b29833Smrgoverridden with `make V=1'; while running `./configure
21575b29833Smrg--disable-silent-rules' sets the default to verbose, which can be
21675b29833Smrgoverridden with `make V=0'.
21775b29833Smrg
21875b29833SmrgParticular systems
21975b29833Smrg==================
22075b29833Smrg
22175b29833Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22275b29833SmrgCC is not installed, it is recommended to use the following options in
22375b29833Smrgorder to use an ANSI C compiler:
22475b29833Smrg
22575b29833Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22675b29833Smrg
22775b29833Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22875b29833Smrg
22975b29833Smrg   HP-UX `make' updates targets which have the same time stamps as
23075b29833Smrgtheir prerequisites, which makes it generally unusable when shipped
23175b29833Smrggenerated files such as `configure' are involved.  Use GNU `make'
23275b29833Smrginstead.
23375b29833Smrg
23475b29833Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23575b29833Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23675b29833Smrga workaround.  If GNU CC is not installed, it is therefore recommended
23775b29833Smrgto try
23875b29833Smrg
23975b29833Smrg     ./configure CC="cc"
24075b29833Smrg
24175b29833Smrgand if that doesn't work, try
24275b29833Smrg
24375b29833Smrg     ./configure CC="cc -nodtk"
24475b29833Smrg
24575b29833Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24675b29833Smrgdirectory contains several dysfunctional programs; working variants of
24775b29833Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24875b29833Smrgin your `PATH', put it _after_ `/usr/bin'.
24975b29833Smrg
25075b29833Smrg   On Haiku, software installed for all users goes in `/boot/common',
25175b29833Smrgnot `/usr/local'.  It is recommended to use the following options:
25275b29833Smrg
25375b29833Smrg     ./configure --prefix=/boot/common
25475b29833Smrg
25575b29833SmrgSpecifying the System Type
25675b29833Smrg==========================
25775b29833Smrg
25875b29833Smrg   There may be some features `configure' cannot figure out
25975b29833Smrgautomatically, but needs to determine by the type of machine the package
26075b29833Smrgwill run on.  Usually, assuming the package is built to be run on the
26175b29833Smrg_same_ architectures, `configure' can figure that out, but if it prints
26275b29833Smrga message saying it cannot guess the machine type, give it the
26375b29833Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26475b29833Smrgtype, such as `sun4', or a canonical name which has the form:
26575b29833Smrg
26675b29833Smrg     CPU-COMPANY-SYSTEM
26775b29833Smrg
26875b29833Smrgwhere SYSTEM can have one of these forms:
26975b29833Smrg
27075b29833Smrg     OS
27175b29833Smrg     KERNEL-OS
27275b29833Smrg
27375b29833Smrg   See the file `config.sub' for the possible values of each field.  If
27475b29833Smrg`config.sub' isn't included in this package, then this package doesn't
27575b29833Smrgneed to know the machine type.
27675b29833Smrg
27775b29833Smrg   If you are _building_ compiler tools for cross-compiling, you should
27875b29833Smrguse the option `--target=TYPE' to select the type of system they will
27975b29833Smrgproduce code for.
28075b29833Smrg
28175b29833Smrg   If you want to _use_ a cross compiler, that generates code for a
28275b29833Smrgplatform different from the build platform, you should specify the
28375b29833Smrg"host" platform (i.e., that on which the generated programs will
28475b29833Smrgeventually be run) with `--host=TYPE'.
28575b29833Smrg
28675b29833SmrgSharing Defaults
28775b29833Smrg================
28875b29833Smrg
28975b29833Smrg   If you want to set default values for `configure' scripts to share,
29075b29833Smrgyou can create a site shell script called `config.site' that gives
29175b29833Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
29275b29833Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29375b29833Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29475b29833Smrg`CONFIG_SITE' environment variable to the location of the site script.
29575b29833SmrgA warning: not all `configure' scripts look for a site script.
29675b29833Smrg
29775b29833SmrgDefining Variables
29875b29833Smrg==================
29975b29833Smrg
30075b29833Smrg   Variables not defined in a site shell script can be set in the
30175b29833Smrgenvironment passed to `configure'.  However, some packages may run
30275b29833Smrgconfigure again during the build, and the customized values of these
30375b29833Smrgvariables may be lost.  In order to avoid this problem, you should set
30475b29833Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30575b29833Smrg
30675b29833Smrg     ./configure CC=/usr/local2/bin/gcc
30775b29833Smrg
30875b29833Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30975b29833Smrgoverridden in the site shell script).
31075b29833Smrg
31175b29833SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31275b29833Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31375b29833Smrg
31475b29833Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31575b29833Smrg
31675b29833Smrg`configure' Invocation
31775b29833Smrg======================
31875b29833Smrg
31975b29833Smrg   `configure' recognizes the following options to control how it
32075b29833Smrgoperates.
32175b29833Smrg
32275b29833Smrg`--help'
32375b29833Smrg`-h'
32475b29833Smrg     Print a summary of all of the options to `configure', and exit.
32575b29833Smrg
32675b29833Smrg`--help=short'
32775b29833Smrg`--help=recursive'
32875b29833Smrg     Print a summary of the options unique to this package's
32975b29833Smrg     `configure', and exit.  The `short' variant lists options used
33075b29833Smrg     only in the top level, while the `recursive' variant lists options
33175b29833Smrg     also present in any nested packages.
33275b29833Smrg
33375b29833Smrg`--version'
33475b29833Smrg`-V'
33575b29833Smrg     Print the version of Autoconf used to generate the `configure'
33675b29833Smrg     script, and exit.
33775b29833Smrg
33875b29833Smrg`--cache-file=FILE'
33975b29833Smrg     Enable the cache: use and save the results of the tests in FILE,
34075b29833Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34175b29833Smrg     disable caching.
34275b29833Smrg
34375b29833Smrg`--config-cache'
34475b29833Smrg`-C'
34575b29833Smrg     Alias for `--cache-file=config.cache'.
34675b29833Smrg
34775b29833Smrg`--quiet'
34875b29833Smrg`--silent'
34975b29833Smrg`-q'
35075b29833Smrg     Do not print messages saying which checks are being made.  To
35175b29833Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35275b29833Smrg     messages will still be shown).
35375b29833Smrg
35475b29833Smrg`--srcdir=DIR'
35575b29833Smrg     Look for the package's source code in directory DIR.  Usually
35675b29833Smrg     `configure' can determine that directory automatically.
35775b29833Smrg
35875b29833Smrg`--prefix=DIR'
35975b29833Smrg     Use DIR as the installation prefix.  *note Installation Names::
36075b29833Smrg     for more details, including other options available for fine-tuning
36175b29833Smrg     the installation locations.
36275b29833Smrg
36375b29833Smrg`--no-create'
36475b29833Smrg`-n'
36575b29833Smrg     Run the configure checks, but stop before creating any output
36675b29833Smrg     files.
36775b29833Smrg
36875b29833Smrg`configure' also accepts some other, not widely useful, options.  Run
36975b29833Smrg`configure --help' for more details.
37075b29833Smrg
371