INSTALL revision 0a392d7e
154b44505SmrgInstallation Instructions
254b44505Smrg*************************
354b44505Smrg
40a392d7eSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
50a392d7eSmrgInc.
654b44505Smrg
70a392d7eSmrg   Copying and distribution of this file, with or without modification,
80a392d7eSmrgare permitted in any medium without royalty provided the copyright
90a392d7eSmrgnotice and this notice are preserved.  This file is offered as-is,
100a392d7eSmrgwithout warranty of any kind.
1154b44505Smrg
1254b44505SmrgBasic Installation
1354b44505Smrg==================
1454b44505Smrg
1554b44505Smrg   Briefly, the shell commands `./configure; make; make install' should
1654b44505Smrgconfigure, build, and install this package.  The following
1754b44505Smrgmore-detailed instructions are generic; see the `README' file for
180a392d7eSmrginstructions specific to this package.  Some packages provide this
190a392d7eSmrg`INSTALL' file but do not implement all of the features documented
200a392d7eSmrgbelow.  The lack of an optional feature in a given package is not
210a392d7eSmrgnecessarily a bug.  More recommendations for GNU packages can be found
220a392d7eSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
2354b44505Smrg
2454b44505Smrg   The `configure' shell script attempts to guess correct values for
2554b44505Smrgvarious system-dependent variables used during compilation.  It uses
2654b44505Smrgthose values to create a `Makefile' in each directory of the package.
2754b44505SmrgIt may also create one or more `.h' files containing system-dependent
2854b44505Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2954b44505Smrgyou can run in the future to recreate the current configuration, and a
3054b44505Smrgfile `config.log' containing compiler output (useful mainly for
3154b44505Smrgdebugging `configure').
3254b44505Smrg
3354b44505Smrg   It can also use an optional file (typically called `config.cache'
3454b44505Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3554b44505Smrgthe results of its tests to speed up reconfiguring.  Caching is
3654b44505Smrgdisabled by default to prevent problems with accidental use of stale
3754b44505Smrgcache files.
3854b44505Smrg
3954b44505Smrg   If you need to do unusual things to compile the package, please try
4054b44505Smrgto figure out how `configure' could check whether to do them, and mail
4154b44505Smrgdiffs or instructions to the address given in the `README' so they can
4254b44505Smrgbe considered for the next release.  If you are using the cache, and at
4354b44505Smrgsome point `config.cache' contains results you don't want to keep, you
4454b44505Smrgmay remove or edit it.
4554b44505Smrg
4654b44505Smrg   The file `configure.ac' (or `configure.in') is used to create
4754b44505Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4854b44505Smrgyou want to change it or regenerate `configure' using a newer version
4954b44505Smrgof `autoconf'.
5054b44505Smrg
510a392d7eSmrg   The simplest way to compile this package is:
5254b44505Smrg
5354b44505Smrg  1. `cd' to the directory containing the package's source code and type
5454b44505Smrg     `./configure' to configure the package for your system.
5554b44505Smrg
5654b44505Smrg     Running `configure' might take a while.  While running, it prints
5754b44505Smrg     some messages telling which features it is checking for.
5854b44505Smrg
5954b44505Smrg  2. Type `make' to compile the package.
6054b44505Smrg
6154b44505Smrg  3. Optionally, type `make check' to run any self-tests that come with
620a392d7eSmrg     the package, generally using the just-built uninstalled binaries.
6354b44505Smrg
6454b44505Smrg  4. Type `make install' to install the programs and any data files and
650a392d7eSmrg     documentation.  When installing into a prefix owned by root, it is
660a392d7eSmrg     recommended that the package be configured and built as a regular
670a392d7eSmrg     user, and only the `make install' phase executed with root
680a392d7eSmrg     privileges.
690a392d7eSmrg
700a392d7eSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
710a392d7eSmrg     this time using the binaries in their final installed location.
720a392d7eSmrg     This target does not install anything.  Running this target as a
730a392d7eSmrg     regular user, particularly if the prior `make install' required
740a392d7eSmrg     root privileges, verifies that the installation completed
750a392d7eSmrg     correctly.
760a392d7eSmrg
770a392d7eSmrg  6. You can remove the program binaries and object files from the
7854b44505Smrg     source code directory by typing `make clean'.  To also remove the
7954b44505Smrg     files that `configure' created (so you can compile the package for
8054b44505Smrg     a different kind of computer), type `make distclean'.  There is
8154b44505Smrg     also a `make maintainer-clean' target, but that is intended mainly
8254b44505Smrg     for the package's developers.  If you use it, you may have to get
8354b44505Smrg     all sorts of other programs in order to regenerate files that came
8454b44505Smrg     with the distribution.
8554b44505Smrg
860a392d7eSmrg  7. Often, you can also type `make uninstall' to remove the installed
870a392d7eSmrg     files again.  In practice, not all packages have tested that
880a392d7eSmrg     uninstallation works correctly, even though it is required by the
890a392d7eSmrg     GNU Coding Standards.
900a392d7eSmrg
910a392d7eSmrg  8. Some packages, particularly those that use Automake, provide `make
920a392d7eSmrg     distcheck', which can by used by developers to test that all other
930a392d7eSmrg     targets like `make install' and `make uninstall' work correctly.
940a392d7eSmrg     This target is generally not run by end users.
9554b44505Smrg
9654b44505SmrgCompilers and Options
9754b44505Smrg=====================
9854b44505Smrg
9954b44505Smrg   Some systems require unusual options for compilation or linking that
10054b44505Smrgthe `configure' script does not know about.  Run `./configure --help'
10154b44505Smrgfor details on some of the pertinent environment variables.
10254b44505Smrg
10354b44505Smrg   You can give `configure' initial values for configuration parameters
10454b44505Smrgby setting variables in the command line or in the environment.  Here
10554b44505Smrgis an example:
10654b44505Smrg
10754b44505Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10854b44505Smrg
10954b44505Smrg   *Note Defining Variables::, for more details.
11054b44505Smrg
11154b44505SmrgCompiling For Multiple Architectures
11254b44505Smrg====================================
11354b44505Smrg
11454b44505Smrg   You can compile the package for more than one kind of computer at the
11554b44505Smrgsame time, by placing the object files for each architecture in their
11654b44505Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11754b44505Smrgdirectory where you want the object files and executables to go and run
11854b44505Smrgthe `configure' script.  `configure' automatically checks for the
1190a392d7eSmrgsource code in the directory that `configure' is in and in `..'.  This
1200a392d7eSmrgis known as a "VPATH" build.
12154b44505Smrg
12254b44505Smrg   With a non-GNU `make', it is safer to compile the package for one
12354b44505Smrgarchitecture at a time in the source code directory.  After you have
12454b44505Smrginstalled the package for one architecture, use `make distclean' before
12554b44505Smrgreconfiguring for another architecture.
12654b44505Smrg
12754b44505Smrg   On MacOS X 10.5 and later systems, you can create libraries and
12854b44505Smrgexecutables that work on multiple system types--known as "fat" or
12954b44505Smrg"universal" binaries--by specifying multiple `-arch' options to the
13054b44505Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
13154b44505Smrgthis:
13254b44505Smrg
13354b44505Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13454b44505Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13554b44505Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
13654b44505Smrg
13754b44505Smrg   This is not guaranteed to produce working output in all cases, you
13854b44505Smrgmay have to build one architecture at a time and combine the results
13954b44505Smrgusing the `lipo' tool if you have problems.
14054b44505Smrg
14154b44505SmrgInstallation Names
14254b44505Smrg==================
14354b44505Smrg
14454b44505Smrg   By default, `make install' installs the package's commands under
14554b44505Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14654b44505Smrgcan specify an installation prefix other than `/usr/local' by giving
1470a392d7eSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1480a392d7eSmrgabsolute file name.
14954b44505Smrg
15054b44505Smrg   You can specify separate installation prefixes for
15154b44505Smrgarchitecture-specific files and architecture-independent files.  If you
15254b44505Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15354b44505SmrgPREFIX as the prefix for installing programs and libraries.
15454b44505SmrgDocumentation and other data files still use the regular prefix.
15554b44505Smrg
15654b44505Smrg   In addition, if you use an unusual directory layout you can give
15754b44505Smrgoptions like `--bindir=DIR' to specify different values for particular
15854b44505Smrgkinds of files.  Run `configure --help' for a list of the directories
1590a392d7eSmrgyou can set and what kinds of files go in them.  In general, the
1600a392d7eSmrgdefault for these options is expressed in terms of `${prefix}', so that
1610a392d7eSmrgspecifying just `--prefix' will affect all of the other directory
1620a392d7eSmrgspecifications that were not explicitly provided.
1630a392d7eSmrg
1640a392d7eSmrg   The most portable way to affect installation locations is to pass the
1650a392d7eSmrgcorrect locations to `configure'; however, many packages provide one or
1660a392d7eSmrgboth of the following shortcuts of passing variable assignments to the
1670a392d7eSmrg`make install' command line to change installation locations without
1680a392d7eSmrghaving to reconfigure or recompile.
1690a392d7eSmrg
1700a392d7eSmrg   The first method involves providing an override variable for each
1710a392d7eSmrgaffected directory.  For example, `make install
1720a392d7eSmrgprefix=/alternate/directory' will choose an alternate location for all
1730a392d7eSmrgdirectory configuration variables that were expressed in terms of
1740a392d7eSmrg`${prefix}'.  Any directories that were specified during `configure',
1750a392d7eSmrgbut not in terms of `${prefix}', must each be overridden at install
1760a392d7eSmrgtime for the entire installation to be relocated.  The approach of
1770a392d7eSmrgmakefile variable overrides for each directory variable is required by
1780a392d7eSmrgthe GNU Coding Standards, and ideally causes no recompilation.
1790a392d7eSmrgHowever, some platforms have known limitations with the semantics of
1800a392d7eSmrgshared libraries that end up requiring recompilation when using this
1810a392d7eSmrgmethod, particularly noticeable in packages that use GNU Libtool.
1820a392d7eSmrg
1830a392d7eSmrg   The second method involves providing the `DESTDIR' variable.  For
1840a392d7eSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
1850a392d7eSmrg`/alternate/directory' before all installation names.  The approach of
1860a392d7eSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1870a392d7eSmrgdoes not work on platforms that have drive letters.  On the other hand,
1880a392d7eSmrgit does better at avoiding recompilation issues, and works well even
1890a392d7eSmrgwhen some directory options were not specified in terms of `${prefix}'
1900a392d7eSmrgat `configure' time.
1910a392d7eSmrg
1920a392d7eSmrgOptional Features
1930a392d7eSmrg=================
19454b44505Smrg
19554b44505Smrg   If the package supports it, you can cause programs to be installed
19654b44505Smrgwith an extra prefix or suffix on their names by giving `configure' the
19754b44505Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19854b44505Smrg
19954b44505Smrg   Some packages pay attention to `--enable-FEATURE' options to
20054b44505Smrg`configure', where FEATURE indicates an optional part of the package.
20154b44505SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20254b44505Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20354b44505Smrg`README' should mention any `--enable-' and `--with-' options that the
20454b44505Smrgpackage recognizes.
20554b44505Smrg
20654b44505Smrg   For packages that use the X Window System, `configure' can usually
20754b44505Smrgfind the X include and library files automatically, but if it doesn't,
20854b44505Smrgyou can use the `configure' options `--x-includes=DIR' and
20954b44505Smrg`--x-libraries=DIR' to specify their locations.
21054b44505Smrg
2110a392d7eSmrg   Some packages offer the ability to configure how verbose the
2120a392d7eSmrgexecution of `make' will be.  For these packages, running `./configure
2130a392d7eSmrg--enable-silent-rules' sets the default to minimal output, which can be
2140a392d7eSmrgoverridden with `make V=1'; while running `./configure
2150a392d7eSmrg--disable-silent-rules' sets the default to verbose, which can be
2160a392d7eSmrgoverridden with `make V=0'.
2170a392d7eSmrg
21854b44505SmrgParticular systems
21954b44505Smrg==================
22054b44505Smrg
22154b44505Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22254b44505SmrgCC is not installed, it is recommended to use the following options in
22354b44505Smrgorder to use an ANSI C compiler:
22454b44505Smrg
2250a392d7eSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22654b44505Smrg
22754b44505Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22854b44505Smrg
2290a392d7eSmrg   HP-UX `make' updates targets which have the same time stamps as
2300a392d7eSmrgtheir prerequisites, which makes it generally unusable when shipped
2310a392d7eSmrggenerated files such as `configure' are involved.  Use GNU `make'
2320a392d7eSmrginstead.
2330a392d7eSmrg
23454b44505Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23554b44505Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23654b44505Smrga workaround.  If GNU CC is not installed, it is therefore recommended
23754b44505Smrgto try
23854b44505Smrg
23954b44505Smrg     ./configure CC="cc"
24054b44505Smrg
24154b44505Smrgand if that doesn't work, try
24254b44505Smrg
24354b44505Smrg     ./configure CC="cc -nodtk"
24454b44505Smrg
2450a392d7eSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2460a392d7eSmrgdirectory contains several dysfunctional programs; working variants of
2470a392d7eSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2480a392d7eSmrgin your `PATH', put it _after_ `/usr/bin'.
2490a392d7eSmrg
2500a392d7eSmrg   On Haiku, software installed for all users goes in `/boot/common',
2510a392d7eSmrgnot `/usr/local'.  It is recommended to use the following options:
2520a392d7eSmrg
2530a392d7eSmrg     ./configure --prefix=/boot/common
2540a392d7eSmrg
25554b44505SmrgSpecifying the System Type
25654b44505Smrg==========================
25754b44505Smrg
25854b44505Smrg   There may be some features `configure' cannot figure out
25954b44505Smrgautomatically, but needs to determine by the type of machine the package
26054b44505Smrgwill run on.  Usually, assuming the package is built to be run on the
26154b44505Smrg_same_ architectures, `configure' can figure that out, but if it prints
26254b44505Smrga message saying it cannot guess the machine type, give it the
26354b44505Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26454b44505Smrgtype, such as `sun4', or a canonical name which has the form:
26554b44505Smrg
26654b44505Smrg     CPU-COMPANY-SYSTEM
26754b44505Smrg
26854b44505Smrgwhere SYSTEM can have one of these forms:
26954b44505Smrg
2700a392d7eSmrg     OS
2710a392d7eSmrg     KERNEL-OS
27254b44505Smrg
27354b44505Smrg   See the file `config.sub' for the possible values of each field.  If
27454b44505Smrg`config.sub' isn't included in this package, then this package doesn't
27554b44505Smrgneed to know the machine type.
27654b44505Smrg
27754b44505Smrg   If you are _building_ compiler tools for cross-compiling, you should
27854b44505Smrguse the option `--target=TYPE' to select the type of system they will
27954b44505Smrgproduce code for.
28054b44505Smrg
28154b44505Smrg   If you want to _use_ a cross compiler, that generates code for a
28254b44505Smrgplatform different from the build platform, you should specify the
28354b44505Smrg"host" platform (i.e., that on which the generated programs will
28454b44505Smrgeventually be run) with `--host=TYPE'.
28554b44505Smrg
28654b44505SmrgSharing Defaults
28754b44505Smrg================
28854b44505Smrg
28954b44505Smrg   If you want to set default values for `configure' scripts to share,
29054b44505Smrgyou can create a site shell script called `config.site' that gives
29154b44505Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
29254b44505Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29354b44505Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29454b44505Smrg`CONFIG_SITE' environment variable to the location of the site script.
29554b44505SmrgA warning: not all `configure' scripts look for a site script.
29654b44505Smrg
29754b44505SmrgDefining Variables
29854b44505Smrg==================
29954b44505Smrg
30054b44505Smrg   Variables not defined in a site shell script can be set in the
30154b44505Smrgenvironment passed to `configure'.  However, some packages may run
30254b44505Smrgconfigure again during the build, and the customized values of these
30354b44505Smrgvariables may be lost.  In order to avoid this problem, you should set
30454b44505Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30554b44505Smrg
30654b44505Smrg     ./configure CC=/usr/local2/bin/gcc
30754b44505Smrg
30854b44505Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30954b44505Smrgoverridden in the site shell script).
31054b44505Smrg
31154b44505SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31254b44505Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31354b44505Smrg
31454b44505Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31554b44505Smrg
31654b44505Smrg`configure' Invocation
31754b44505Smrg======================
31854b44505Smrg
31954b44505Smrg   `configure' recognizes the following options to control how it
32054b44505Smrgoperates.
32154b44505Smrg
32254b44505Smrg`--help'
32354b44505Smrg`-h'
32454b44505Smrg     Print a summary of all of the options to `configure', and exit.
32554b44505Smrg
32654b44505Smrg`--help=short'
32754b44505Smrg`--help=recursive'
32854b44505Smrg     Print a summary of the options unique to this package's
32954b44505Smrg     `configure', and exit.  The `short' variant lists options used
33054b44505Smrg     only in the top level, while the `recursive' variant lists options
33154b44505Smrg     also present in any nested packages.
33254b44505Smrg
33354b44505Smrg`--version'
33454b44505Smrg`-V'
33554b44505Smrg     Print the version of Autoconf used to generate the `configure'
33654b44505Smrg     script, and exit.
33754b44505Smrg
33854b44505Smrg`--cache-file=FILE'
33954b44505Smrg     Enable the cache: use and save the results of the tests in FILE,
34054b44505Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34154b44505Smrg     disable caching.
34254b44505Smrg
34354b44505Smrg`--config-cache'
34454b44505Smrg`-C'
34554b44505Smrg     Alias for `--cache-file=config.cache'.
34654b44505Smrg
34754b44505Smrg`--quiet'
34854b44505Smrg`--silent'
34954b44505Smrg`-q'
35054b44505Smrg     Do not print messages saying which checks are being made.  To
35154b44505Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35254b44505Smrg     messages will still be shown).
35354b44505Smrg
35454b44505Smrg`--srcdir=DIR'
35554b44505Smrg     Look for the package's source code in directory DIR.  Usually
35654b44505Smrg     `configure' can determine that directory automatically.
35754b44505Smrg
35854b44505Smrg`--prefix=DIR'
3590a392d7eSmrg     Use DIR as the installation prefix.  *note Installation Names::
36054b44505Smrg     for more details, including other options available for fine-tuning
36154b44505Smrg     the installation locations.
36254b44505Smrg
36354b44505Smrg`--no-create'
36454b44505Smrg`-n'
36554b44505Smrg     Run the configure checks, but stop before creating any output
36654b44505Smrg     files.
36754b44505Smrg
36854b44505Smrg`configure' also accepts some other, not widely useful, options.  Run
36954b44505Smrg`configure --help' for more details.
37054b44505Smrg
371