INSTALL revision 55de1df9
155de1df9SmrgInstallation Instructions
255de1df9Smrg*************************
355de1df9Smrg
455de1df9SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
555de1df9Smrg2006, 2007, 2008 Free Software Foundation, Inc.
655de1df9Smrg
755de1df9Smrg   This file is free documentation; the Free Software Foundation gives
855de1df9Smrgunlimited permission to copy, distribute and modify it.
955de1df9Smrg
1055de1df9SmrgBasic Installation
1155de1df9Smrg==================
1255de1df9Smrg
1355de1df9Smrg   Briefly, the shell commands `./configure; make; make install' should
1455de1df9Smrgconfigure, build, and install this package.  The following
1555de1df9Smrgmore-detailed instructions are generic; see the `README' file for
1655de1df9Smrginstructions specific to this package.
1755de1df9Smrg
1855de1df9Smrg   The `configure' shell script attempts to guess correct values for
1955de1df9Smrgvarious system-dependent variables used during compilation.  It uses
2055de1df9Smrgthose values to create a `Makefile' in each directory of the package.
2155de1df9SmrgIt may also create one or more `.h' files containing system-dependent
2255de1df9Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2355de1df9Smrgyou can run in the future to recreate the current configuration, and a
2455de1df9Smrgfile `config.log' containing compiler output (useful mainly for
2555de1df9Smrgdebugging `configure').
2655de1df9Smrg
2755de1df9Smrg   It can also use an optional file (typically called `config.cache'
2855de1df9Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
2955de1df9Smrgthe results of its tests to speed up reconfiguring.  Caching is
3055de1df9Smrgdisabled by default to prevent problems with accidental use of stale
3155de1df9Smrgcache files.
3255de1df9Smrg
3355de1df9Smrg   If you need to do unusual things to compile the package, please try
3455de1df9Smrgto figure out how `configure' could check whether to do them, and mail
3555de1df9Smrgdiffs or instructions to the address given in the `README' so they can
3655de1df9Smrgbe considered for the next release.  If you are using the cache, and at
3755de1df9Smrgsome point `config.cache' contains results you don't want to keep, you
3855de1df9Smrgmay remove or edit it.
3955de1df9Smrg
4055de1df9Smrg   The file `configure.ac' (or `configure.in') is used to create
4155de1df9Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4255de1df9Smrgyou want to change it or regenerate `configure' using a newer version
4355de1df9Smrgof `autoconf'.
4455de1df9Smrg
4555de1df9SmrgThe simplest way to compile this package is:
4655de1df9Smrg
4755de1df9Smrg  1. `cd' to the directory containing the package's source code and type
4855de1df9Smrg     `./configure' to configure the package for your system.
4955de1df9Smrg
5055de1df9Smrg     Running `configure' might take a while.  While running, it prints
5155de1df9Smrg     some messages telling which features it is checking for.
5255de1df9Smrg
5355de1df9Smrg  2. Type `make' to compile the package.
5455de1df9Smrg
5555de1df9Smrg  3. Optionally, type `make check' to run any self-tests that come with
5655de1df9Smrg     the package.
5755de1df9Smrg
5855de1df9Smrg  4. Type `make install' to install the programs and any data files and
5955de1df9Smrg     documentation.
6055de1df9Smrg
6155de1df9Smrg  5. You can remove the program binaries and object files from the
6255de1df9Smrg     source code directory by typing `make clean'.  To also remove the
6355de1df9Smrg     files that `configure' created (so you can compile the package for
6455de1df9Smrg     a different kind of computer), type `make distclean'.  There is
6555de1df9Smrg     also a `make maintainer-clean' target, but that is intended mainly
6655de1df9Smrg     for the package's developers.  If you use it, you may have to get
6755de1df9Smrg     all sorts of other programs in order to regenerate files that came
6855de1df9Smrg     with the distribution.
6955de1df9Smrg
7055de1df9Smrg  6. Often, you can also type `make uninstall' to remove the installed
7155de1df9Smrg     files again.
7255de1df9Smrg
7355de1df9SmrgCompilers and Options
7455de1df9Smrg=====================
7555de1df9Smrg
7655de1df9Smrg   Some systems require unusual options for compilation or linking that
7755de1df9Smrgthe `configure' script does not know about.  Run `./configure --help'
7855de1df9Smrgfor details on some of the pertinent environment variables.
7955de1df9Smrg
8055de1df9Smrg   You can give `configure' initial values for configuration parameters
8155de1df9Smrgby setting variables in the command line or in the environment.  Here
8255de1df9Smrgis an example:
8355de1df9Smrg
8455de1df9Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
8555de1df9Smrg
8655de1df9Smrg   *Note Defining Variables::, for more details.
8755de1df9Smrg
8855de1df9SmrgCompiling For Multiple Architectures
8955de1df9Smrg====================================
9055de1df9Smrg
9155de1df9Smrg   You can compile the package for more than one kind of computer at the
9255de1df9Smrgsame time, by placing the object files for each architecture in their
9355de1df9Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
9455de1df9Smrgdirectory where you want the object files and executables to go and run
9555de1df9Smrgthe `configure' script.  `configure' automatically checks for the
9655de1df9Smrgsource code in the directory that `configure' is in and in `..'.
9755de1df9Smrg
9855de1df9Smrg   With a non-GNU `make', it is safer to compile the package for one
9955de1df9Smrgarchitecture at a time in the source code directory.  After you have
10055de1df9Smrginstalled the package for one architecture, use `make distclean' before
10155de1df9Smrgreconfiguring for another architecture.
10255de1df9Smrg
10355de1df9Smrg   On MacOS X 10.5 and later systems, you can create libraries and
10455de1df9Smrgexecutables that work on multiple system types--known as "fat" or
10555de1df9Smrg"universal" binaries--by specifying multiple `-arch' options to the
10655de1df9Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
10755de1df9Smrgthis:
10855de1df9Smrg
10955de1df9Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
11055de1df9Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
11155de1df9Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
11255de1df9Smrg
11355de1df9Smrg   This is not guaranteed to produce working output in all cases, you
11455de1df9Smrgmay have to build one architecture at a time and combine the results
11555de1df9Smrgusing the `lipo' tool if you have problems.
11655de1df9Smrg
11755de1df9SmrgInstallation Names
11855de1df9Smrg==================
11955de1df9Smrg
12055de1df9Smrg   By default, `make install' installs the package's commands under
12155de1df9Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
12255de1df9Smrgcan specify an installation prefix other than `/usr/local' by giving
12355de1df9Smrg`configure' the option `--prefix=PREFIX'.
12455de1df9Smrg
12555de1df9Smrg   You can specify separate installation prefixes for
12655de1df9Smrgarchitecture-specific files and architecture-independent files.  If you
12755de1df9Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
12855de1df9SmrgPREFIX as the prefix for installing programs and libraries.
12955de1df9SmrgDocumentation and other data files still use the regular prefix.
13055de1df9Smrg
13155de1df9Smrg   In addition, if you use an unusual directory layout you can give
13255de1df9Smrgoptions like `--bindir=DIR' to specify different values for particular
13355de1df9Smrgkinds of files.  Run `configure --help' for a list of the directories
13455de1df9Smrgyou can set and what kinds of files go in them.
13555de1df9Smrg
13655de1df9Smrg   If the package supports it, you can cause programs to be installed
13755de1df9Smrgwith an extra prefix or suffix on their names by giving `configure' the
13855de1df9Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
13955de1df9Smrg
14055de1df9SmrgOptional Features
14155de1df9Smrg=================
14255de1df9Smrg
14355de1df9Smrg   Some packages pay attention to `--enable-FEATURE' options to
14455de1df9Smrg`configure', where FEATURE indicates an optional part of the package.
14555de1df9SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
14655de1df9Smrgis something like `gnu-as' or `x' (for the X Window System).  The
14755de1df9Smrg`README' should mention any `--enable-' and `--with-' options that the
14855de1df9Smrgpackage recognizes.
14955de1df9Smrg
15055de1df9Smrg   For packages that use the X Window System, `configure' can usually
15155de1df9Smrgfind the X include and library files automatically, but if it doesn't,
15255de1df9Smrgyou can use the `configure' options `--x-includes=DIR' and
15355de1df9Smrg`--x-libraries=DIR' to specify their locations.
15455de1df9Smrg
15555de1df9SmrgParticular systems
15655de1df9Smrg==================
15755de1df9Smrg
15855de1df9Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
15955de1df9SmrgCC is not installed, it is recommended to use the following options in
16055de1df9Smrgorder to use an ANSI C compiler:
16155de1df9Smrg
16255de1df9Smrg     ./configure CC="cc -Ae"
16355de1df9Smrg
16455de1df9Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
16555de1df9Smrg
16655de1df9Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
16755de1df9Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
16855de1df9Smrga workaround.  If GNU CC is not installed, it is therefore recommended
16955de1df9Smrgto try
17055de1df9Smrg
17155de1df9Smrg     ./configure CC="cc"
17255de1df9Smrg
17355de1df9Smrgand if that doesn't work, try
17455de1df9Smrg
17555de1df9Smrg     ./configure CC="cc -nodtk"
17655de1df9Smrg
17755de1df9SmrgSpecifying the System Type
17855de1df9Smrg==========================
17955de1df9Smrg
18055de1df9Smrg   There may be some features `configure' cannot figure out
18155de1df9Smrgautomatically, but needs to determine by the type of machine the package
18255de1df9Smrgwill run on.  Usually, assuming the package is built to be run on the
18355de1df9Smrg_same_ architectures, `configure' can figure that out, but if it prints
18455de1df9Smrga message saying it cannot guess the machine type, give it the
18555de1df9Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
18655de1df9Smrgtype, such as `sun4', or a canonical name which has the form:
18755de1df9Smrg
18855de1df9Smrg     CPU-COMPANY-SYSTEM
18955de1df9Smrg
19055de1df9Smrgwhere SYSTEM can have one of these forms:
19155de1df9Smrg
19255de1df9Smrg     OS KERNEL-OS
19355de1df9Smrg
19455de1df9Smrg   See the file `config.sub' for the possible values of each field.  If
19555de1df9Smrg`config.sub' isn't included in this package, then this package doesn't
19655de1df9Smrgneed to know the machine type.
19755de1df9Smrg
19855de1df9Smrg   If you are _building_ compiler tools for cross-compiling, you should
19955de1df9Smrguse the option `--target=TYPE' to select the type of system they will
20055de1df9Smrgproduce code for.
20155de1df9Smrg
20255de1df9Smrg   If you want to _use_ a cross compiler, that generates code for a
20355de1df9Smrgplatform different from the build platform, you should specify the
20455de1df9Smrg"host" platform (i.e., that on which the generated programs will
20555de1df9Smrgeventually be run) with `--host=TYPE'.
20655de1df9Smrg
20755de1df9SmrgSharing Defaults
20855de1df9Smrg================
20955de1df9Smrg
21055de1df9Smrg   If you want to set default values for `configure' scripts to share,
21155de1df9Smrgyou can create a site shell script called `config.site' that gives
21255de1df9Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
21355de1df9Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
21455de1df9Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
21555de1df9Smrg`CONFIG_SITE' environment variable to the location of the site script.
21655de1df9SmrgA warning: not all `configure' scripts look for a site script.
21755de1df9Smrg
21855de1df9SmrgDefining Variables
21955de1df9Smrg==================
22055de1df9Smrg
22155de1df9Smrg   Variables not defined in a site shell script can be set in the
22255de1df9Smrgenvironment passed to `configure'.  However, some packages may run
22355de1df9Smrgconfigure again during the build, and the customized values of these
22455de1df9Smrgvariables may be lost.  In order to avoid this problem, you should set
22555de1df9Smrgthem in the `configure' command line, using `VAR=value'.  For example:
22655de1df9Smrg
22755de1df9Smrg     ./configure CC=/usr/local2/bin/gcc
22855de1df9Smrg
22955de1df9Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
23055de1df9Smrgoverridden in the site shell script).
23155de1df9Smrg
23255de1df9SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
23355de1df9Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
23455de1df9Smrg
23555de1df9Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
23655de1df9Smrg
23755de1df9Smrg`configure' Invocation
23855de1df9Smrg======================
23955de1df9Smrg
24055de1df9Smrg   `configure' recognizes the following options to control how it
24155de1df9Smrgoperates.
24255de1df9Smrg
24355de1df9Smrg`--help'
24455de1df9Smrg`-h'
24555de1df9Smrg     Print a summary of all of the options to `configure', and exit.
24655de1df9Smrg
24755de1df9Smrg`--help=short'
24855de1df9Smrg`--help=recursive'
24955de1df9Smrg     Print a summary of the options unique to this package's
25055de1df9Smrg     `configure', and exit.  The `short' variant lists options used
25155de1df9Smrg     only in the top level, while the `recursive' variant lists options
25255de1df9Smrg     also present in any nested packages.
25355de1df9Smrg
25455de1df9Smrg`--version'
25555de1df9Smrg`-V'
25655de1df9Smrg     Print the version of Autoconf used to generate the `configure'
25755de1df9Smrg     script, and exit.
25855de1df9Smrg
25955de1df9Smrg`--cache-file=FILE'
26055de1df9Smrg     Enable the cache: use and save the results of the tests in FILE,
26155de1df9Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
26255de1df9Smrg     disable caching.
26355de1df9Smrg
26455de1df9Smrg`--config-cache'
26555de1df9Smrg`-C'
26655de1df9Smrg     Alias for `--cache-file=config.cache'.
26755de1df9Smrg
26855de1df9Smrg`--quiet'
26955de1df9Smrg`--silent'
27055de1df9Smrg`-q'
27155de1df9Smrg     Do not print messages saying which checks are being made.  To
27255de1df9Smrg     suppress all normal output, redirect it to `/dev/null' (any error
27355de1df9Smrg     messages will still be shown).
27455de1df9Smrg
27555de1df9Smrg`--srcdir=DIR'
27655de1df9Smrg     Look for the package's source code in directory DIR.  Usually
27755de1df9Smrg     `configure' can determine that directory automatically.
27855de1df9Smrg
27955de1df9Smrg`--prefix=DIR'
28055de1df9Smrg     Use DIR as the installation prefix.  *Note Installation Names::
28155de1df9Smrg     for more details, including other options available for fine-tuning
28255de1df9Smrg     the installation locations.
28355de1df9Smrg
28455de1df9Smrg`--no-create'
28555de1df9Smrg`-n'
28655de1df9Smrg     Run the configure checks, but stop before creating any output
28755de1df9Smrg     files.
28855de1df9Smrg
28955de1df9Smrg`configure' also accepts some other, not widely useful, options.  Run
29055de1df9Smrg`configure --help' for more details.
29155de1df9Smrg
292