INSTALL revision 2d861bc5
144d7874bSmrgInstallation Instructions
244d7874bSmrg*************************
344d7874bSmrg
42d861bc5SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
52d861bc5Smrg2006, 2007, 2008 Free Software Foundation, Inc.
644d7874bSmrg
72d861bc5Smrg   This file is free documentation; the Free Software Foundation gives
844d7874bSmrgunlimited permission to copy, distribute and modify it.
944d7874bSmrg
1044d7874bSmrgBasic Installation
1144d7874bSmrg==================
1244d7874bSmrg
132d861bc5Smrg   Briefly, the shell commands `./configure; make; make install' should
142d861bc5Smrgconfigure, build, and install this package.  The following
152d861bc5Smrgmore-detailed instructions are generic; see the `README' file for
162d861bc5Smrginstructions specific to this package.
1744d7874bSmrg
1844d7874bSmrg   The `configure' shell script attempts to guess correct values for
1944d7874bSmrgvarious system-dependent variables used during compilation.  It uses
2044d7874bSmrgthose values to create a `Makefile' in each directory of the package.
2144d7874bSmrgIt may also create one or more `.h' files containing system-dependent
2244d7874bSmrgdefinitions.  Finally, it creates a shell script `config.status' that
2344d7874bSmrgyou can run in the future to recreate the current configuration, and a
2444d7874bSmrgfile `config.log' containing compiler output (useful mainly for
2544d7874bSmrgdebugging `configure').
2644d7874bSmrg
2744d7874bSmrg   It can also use an optional file (typically called `config.cache'
2844d7874bSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
292d861bc5Smrgthe results of its tests to speed up reconfiguring.  Caching is
3044d7874bSmrgdisabled by default to prevent problems with accidental use of stale
312d861bc5Smrgcache files.
3244d7874bSmrg
3344d7874bSmrg   If you need to do unusual things to compile the package, please try
3444d7874bSmrgto figure out how `configure' could check whether to do them, and mail
3544d7874bSmrgdiffs or instructions to the address given in the `README' so they can
3644d7874bSmrgbe considered for the next release.  If you are using the cache, and at
3744d7874bSmrgsome point `config.cache' contains results you don't want to keep, you
3844d7874bSmrgmay remove or edit it.
3944d7874bSmrg
4044d7874bSmrg   The file `configure.ac' (or `configure.in') is used to create
412d861bc5Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
422d861bc5Smrgyou want to change it or regenerate `configure' using a newer version
432d861bc5Smrgof `autoconf'.
4444d7874bSmrg
4544d7874bSmrgThe simplest way to compile this package is:
4644d7874bSmrg
4744d7874bSmrg  1. `cd' to the directory containing the package's source code and type
482d861bc5Smrg     `./configure' to configure the package for your system.
4944d7874bSmrg
502d861bc5Smrg     Running `configure' might take a while.  While running, it prints
512d861bc5Smrg     some messages telling which features it is checking for.
5244d7874bSmrg
5344d7874bSmrg  2. Type `make' to compile the package.
5444d7874bSmrg
5544d7874bSmrg  3. Optionally, type `make check' to run any self-tests that come with
5644d7874bSmrg     the package.
5744d7874bSmrg
5844d7874bSmrg  4. Type `make install' to install the programs and any data files and
5944d7874bSmrg     documentation.
6044d7874bSmrg
6144d7874bSmrg  5. You can remove the program binaries and object files from the
6244d7874bSmrg     source code directory by typing `make clean'.  To also remove the
6344d7874bSmrg     files that `configure' created (so you can compile the package for
6444d7874bSmrg     a different kind of computer), type `make distclean'.  There is
6544d7874bSmrg     also a `make maintainer-clean' target, but that is intended mainly
6644d7874bSmrg     for the package's developers.  If you use it, you may have to get
6744d7874bSmrg     all sorts of other programs in order to regenerate files that came
6844d7874bSmrg     with the distribution.
6944d7874bSmrg
702d861bc5Smrg  6. Often, you can also type `make uninstall' to remove the installed
712d861bc5Smrg     files again.
722d861bc5Smrg
7344d7874bSmrgCompilers and Options
7444d7874bSmrg=====================
7544d7874bSmrg
762d861bc5Smrg   Some systems require unusual options for compilation or linking that
772d861bc5Smrgthe `configure' script does not know about.  Run `./configure --help'
782d861bc5Smrgfor details on some of the pertinent environment variables.
7944d7874bSmrg
8044d7874bSmrg   You can give `configure' initial values for configuration parameters
8144d7874bSmrgby setting variables in the command line or in the environment.  Here
8244d7874bSmrgis an example:
8344d7874bSmrg
842d861bc5Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
8544d7874bSmrg
8644d7874bSmrg   *Note Defining Variables::, for more details.
8744d7874bSmrg
8844d7874bSmrgCompiling For Multiple Architectures
8944d7874bSmrg====================================
9044d7874bSmrg
912d861bc5Smrg   You can compile the package for more than one kind of computer at the
9244d7874bSmrgsame time, by placing the object files for each architecture in their
932d861bc5Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
9444d7874bSmrgdirectory where you want the object files and executables to go and run
9544d7874bSmrgthe `configure' script.  `configure' automatically checks for the
9644d7874bSmrgsource code in the directory that `configure' is in and in `..'.
9744d7874bSmrg
982d861bc5Smrg   With a non-GNU `make', it is safer to compile the package for one
992d861bc5Smrgarchitecture at a time in the source code directory.  After you have
1002d861bc5Smrginstalled the package for one architecture, use `make distclean' before
1012d861bc5Smrgreconfiguring for another architecture.
1022d861bc5Smrg
1032d861bc5Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1042d861bc5Smrgexecutables that work on multiple system types--known as "fat" or
1052d861bc5Smrg"universal" binaries--by specifying multiple `-arch' options to the
1062d861bc5Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1072d861bc5Smrgthis:
1082d861bc5Smrg
1092d861bc5Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1102d861bc5Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1112d861bc5Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1122d861bc5Smrg
1132d861bc5Smrg   This is not guaranteed to produce working output in all cases, you
1142d861bc5Smrgmay have to build one architecture at a time and combine the results
1152d861bc5Smrgusing the `lipo' tool if you have problems.
11644d7874bSmrg
11744d7874bSmrgInstallation Names
11844d7874bSmrg==================
11944d7874bSmrg
1202d861bc5Smrg   By default, `make install' installs the package's commands under
12144d7874bSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
12244d7874bSmrgcan specify an installation prefix other than `/usr/local' by giving
12344d7874bSmrg`configure' the option `--prefix=PREFIX'.
12444d7874bSmrg
12544d7874bSmrg   You can specify separate installation prefixes for
12644d7874bSmrgarchitecture-specific files and architecture-independent files.  If you
12744d7874bSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
12844d7874bSmrgPREFIX as the prefix for installing programs and libraries.
12944d7874bSmrgDocumentation and other data files still use the regular prefix.
13044d7874bSmrg
13144d7874bSmrg   In addition, if you use an unusual directory layout you can give
13244d7874bSmrgoptions like `--bindir=DIR' to specify different values for particular
13344d7874bSmrgkinds of files.  Run `configure --help' for a list of the directories
13444d7874bSmrgyou can set and what kinds of files go in them.
13544d7874bSmrg
13644d7874bSmrg   If the package supports it, you can cause programs to be installed
13744d7874bSmrgwith an extra prefix or suffix on their names by giving `configure' the
13844d7874bSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
13944d7874bSmrg
14044d7874bSmrgOptional Features
14144d7874bSmrg=================
14244d7874bSmrg
1432d861bc5Smrg   Some packages pay attention to `--enable-FEATURE' options to
14444d7874bSmrg`configure', where FEATURE indicates an optional part of the package.
14544d7874bSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
14644d7874bSmrgis something like `gnu-as' or `x' (for the X Window System).  The
14744d7874bSmrg`README' should mention any `--enable-' and `--with-' options that the
14844d7874bSmrgpackage recognizes.
14944d7874bSmrg
15044d7874bSmrg   For packages that use the X Window System, `configure' can usually
15144d7874bSmrgfind the X include and library files automatically, but if it doesn't,
15244d7874bSmrgyou can use the `configure' options `--x-includes=DIR' and
15344d7874bSmrg`--x-libraries=DIR' to specify their locations.
15444d7874bSmrg
1552d861bc5SmrgParticular systems
1562d861bc5Smrg==================
1572d861bc5Smrg
1582d861bc5Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
1592d861bc5SmrgCC is not installed, it is recommended to use the following options in
1602d861bc5Smrgorder to use an ANSI C compiler:
1612d861bc5Smrg
1622d861bc5Smrg     ./configure CC="cc -Ae"
1632d861bc5Smrg
1642d861bc5Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
1652d861bc5Smrg
1662d861bc5Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
1672d861bc5Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
1682d861bc5Smrga workaround.  If GNU CC is not installed, it is therefore recommended
1692d861bc5Smrgto try
1702d861bc5Smrg
1712d861bc5Smrg     ./configure CC="cc"
1722d861bc5Smrg
1732d861bc5Smrgand if that doesn't work, try
1742d861bc5Smrg
1752d861bc5Smrg     ./configure CC="cc -nodtk"
1762d861bc5Smrg
17744d7874bSmrgSpecifying the System Type
17844d7874bSmrg==========================
17944d7874bSmrg
1802d861bc5Smrg   There may be some features `configure' cannot figure out
1812d861bc5Smrgautomatically, but needs to determine by the type of machine the package
1822d861bc5Smrgwill run on.  Usually, assuming the package is built to be run on the
1832d861bc5Smrg_same_ architectures, `configure' can figure that out, but if it prints
1842d861bc5Smrga message saying it cannot guess the machine type, give it the
18544d7874bSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
18644d7874bSmrgtype, such as `sun4', or a canonical name which has the form:
18744d7874bSmrg
18844d7874bSmrg     CPU-COMPANY-SYSTEM
18944d7874bSmrg
19044d7874bSmrgwhere SYSTEM can have one of these forms:
19144d7874bSmrg
19244d7874bSmrg     OS KERNEL-OS
19344d7874bSmrg
19444d7874bSmrg   See the file `config.sub' for the possible values of each field.  If
19544d7874bSmrg`config.sub' isn't included in this package, then this package doesn't
19644d7874bSmrgneed to know the machine type.
19744d7874bSmrg
19844d7874bSmrg   If you are _building_ compiler tools for cross-compiling, you should
19944d7874bSmrguse the option `--target=TYPE' to select the type of system they will
20044d7874bSmrgproduce code for.
20144d7874bSmrg
20244d7874bSmrg   If you want to _use_ a cross compiler, that generates code for a
20344d7874bSmrgplatform different from the build platform, you should specify the
20444d7874bSmrg"host" platform (i.e., that on which the generated programs will
20544d7874bSmrgeventually be run) with `--host=TYPE'.
20644d7874bSmrg
20744d7874bSmrgSharing Defaults
20844d7874bSmrg================
20944d7874bSmrg
2102d861bc5Smrg   If you want to set default values for `configure' scripts to share,
2112d861bc5Smrgyou can create a site shell script called `config.site' that gives
2122d861bc5Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
21344d7874bSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
21444d7874bSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
21544d7874bSmrg`CONFIG_SITE' environment variable to the location of the site script.
21644d7874bSmrgA warning: not all `configure' scripts look for a site script.
21744d7874bSmrg
21844d7874bSmrgDefining Variables
21944d7874bSmrg==================
22044d7874bSmrg
2212d861bc5Smrg   Variables not defined in a site shell script can be set in the
22244d7874bSmrgenvironment passed to `configure'.  However, some packages may run
22344d7874bSmrgconfigure again during the build, and the customized values of these
22444d7874bSmrgvariables may be lost.  In order to avoid this problem, you should set
22544d7874bSmrgthem in the `configure' command line, using `VAR=value'.  For example:
22644d7874bSmrg
22744d7874bSmrg     ./configure CC=/usr/local2/bin/gcc
22844d7874bSmrg
22944d7874bSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
2302d861bc5Smrgoverridden in the site shell script).
23144d7874bSmrg
2322d861bc5SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
2332d861bc5Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
23444d7874bSmrg
2352d861bc5Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
23644d7874bSmrg
23744d7874bSmrg`configure' Invocation
23844d7874bSmrg======================
23944d7874bSmrg
2402d861bc5Smrg   `configure' recognizes the following options to control how it
2412d861bc5Smrgoperates.
24244d7874bSmrg
24344d7874bSmrg`--help'
24444d7874bSmrg`-h'
2452d861bc5Smrg     Print a summary of all of the options to `configure', and exit.
2462d861bc5Smrg
2472d861bc5Smrg`--help=short'
2482d861bc5Smrg`--help=recursive'
2492d861bc5Smrg     Print a summary of the options unique to this package's
2502d861bc5Smrg     `configure', and exit.  The `short' variant lists options used
2512d861bc5Smrg     only in the top level, while the `recursive' variant lists options
2522d861bc5Smrg     also present in any nested packages.
25344d7874bSmrg
25444d7874bSmrg`--version'
25544d7874bSmrg`-V'
25644d7874bSmrg     Print the version of Autoconf used to generate the `configure'
25744d7874bSmrg     script, and exit.
25844d7874bSmrg
25944d7874bSmrg`--cache-file=FILE'
26044d7874bSmrg     Enable the cache: use and save the results of the tests in FILE,
26144d7874bSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
26244d7874bSmrg     disable caching.
26344d7874bSmrg
26444d7874bSmrg`--config-cache'
26544d7874bSmrg`-C'
26644d7874bSmrg     Alias for `--cache-file=config.cache'.
26744d7874bSmrg
26844d7874bSmrg`--quiet'
26944d7874bSmrg`--silent'
27044d7874bSmrg`-q'
27144d7874bSmrg     Do not print messages saying which checks are being made.  To
27244d7874bSmrg     suppress all normal output, redirect it to `/dev/null' (any error
27344d7874bSmrg     messages will still be shown).
27444d7874bSmrg
27544d7874bSmrg`--srcdir=DIR'
27644d7874bSmrg     Look for the package's source code in directory DIR.  Usually
27744d7874bSmrg     `configure' can determine that directory automatically.
27844d7874bSmrg
2792d861bc5Smrg`--prefix=DIR'
2802d861bc5Smrg     Use DIR as the installation prefix.  *Note Installation Names::
2812d861bc5Smrg     for more details, including other options available for fine-tuning
2822d861bc5Smrg     the installation locations.
2832d861bc5Smrg
2842d861bc5Smrg`--no-create'
2852d861bc5Smrg`-n'
2862d861bc5Smrg     Run the configure checks, but stop before creating any output
2872d861bc5Smrg     files.
2882d861bc5Smrg
28944d7874bSmrg`configure' also accepts some other, not widely useful, options.  Run
29044d7874bSmrg`configure --help' for more details.
29144d7874bSmrg
292