INSTALL revision 1b2353db
112391620SmrgInstallation Instructions
212391620Smrg*************************
312391620Smrg
41b2353dbSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
51b2353dbSmrgInc.
612391620Smrg
71b2353dbSmrg   Copying and distribution of this file, with or without modification,
81b2353dbSmrgare permitted in any medium without royalty provided the copyright
91b2353dbSmrgnotice and this notice are preserved.  This file is offered as-is,
101b2353dbSmrgwithout warranty of any kind.
1112391620Smrg
1212391620SmrgBasic Installation
1312391620Smrg==================
1412391620Smrg
1512391620Smrg   Briefly, the shell commands `./configure; make; make install' should
1612391620Smrgconfigure, build, and install this package.  The following
1712391620Smrgmore-detailed instructions are generic; see the `README' file for
181b2353dbSmrginstructions specific to this package.  Some packages provide this
191b2353dbSmrg`INSTALL' file but do not implement all of the features documented
201b2353dbSmrgbelow.  The lack of an optional feature in a given package is not
211b2353dbSmrgnecessarily a bug.  More recommendations for GNU packages can be found
221b2353dbSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
2312391620Smrg
2412391620Smrg   The `configure' shell script attempts to guess correct values for
2512391620Smrgvarious system-dependent variables used during compilation.  It uses
2612391620Smrgthose values to create a `Makefile' in each directory of the package.
2712391620SmrgIt may also create one or more `.h' files containing system-dependent
2812391620Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2912391620Smrgyou can run in the future to recreate the current configuration, and a
3012391620Smrgfile `config.log' containing compiler output (useful mainly for
3112391620Smrgdebugging `configure').
3212391620Smrg
3312391620Smrg   It can also use an optional file (typically called `config.cache'
3412391620Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3512391620Smrgthe results of its tests to speed up reconfiguring.  Caching is
3612391620Smrgdisabled by default to prevent problems with accidental use of stale
3712391620Smrgcache files.
3812391620Smrg
3912391620Smrg   If you need to do unusual things to compile the package, please try
4012391620Smrgto figure out how `configure' could check whether to do them, and mail
4112391620Smrgdiffs or instructions to the address given in the `README' so they can
4212391620Smrgbe considered for the next release.  If you are using the cache, and at
4312391620Smrgsome point `config.cache' contains results you don't want to keep, you
4412391620Smrgmay remove or edit it.
4512391620Smrg
4612391620Smrg   The file `configure.ac' (or `configure.in') is used to create
4712391620Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4812391620Smrgyou want to change it or regenerate `configure' using a newer version
4912391620Smrgof `autoconf'.
5012391620Smrg
511b2353dbSmrg   The simplest way to compile this package is:
5212391620Smrg
5312391620Smrg  1. `cd' to the directory containing the package's source code and type
5412391620Smrg     `./configure' to configure the package for your system.
5512391620Smrg
5612391620Smrg     Running `configure' might take a while.  While running, it prints
5712391620Smrg     some messages telling which features it is checking for.
5812391620Smrg
5912391620Smrg  2. Type `make' to compile the package.
6012391620Smrg
6112391620Smrg  3. Optionally, type `make check' to run any self-tests that come with
621b2353dbSmrg     the package, generally using the just-built uninstalled binaries.
6312391620Smrg
6412391620Smrg  4. Type `make install' to install the programs and any data files and
651b2353dbSmrg     documentation.  When installing into a prefix owned by root, it is
661b2353dbSmrg     recommended that the package be configured and built as a regular
671b2353dbSmrg     user, and only the `make install' phase executed with root
681b2353dbSmrg     privileges.
691b2353dbSmrg
701b2353dbSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
711b2353dbSmrg     this time using the binaries in their final installed location.
721b2353dbSmrg     This target does not install anything.  Running this target as a
731b2353dbSmrg     regular user, particularly if the prior `make install' required
741b2353dbSmrg     root privileges, verifies that the installation completed
751b2353dbSmrg     correctly.
761b2353dbSmrg
771b2353dbSmrg  6. You can remove the program binaries and object files from the
7812391620Smrg     source code directory by typing `make clean'.  To also remove the
7912391620Smrg     files that `configure' created (so you can compile the package for
8012391620Smrg     a different kind of computer), type `make distclean'.  There is
8112391620Smrg     also a `make maintainer-clean' target, but that is intended mainly
8212391620Smrg     for the package's developers.  If you use it, you may have to get
8312391620Smrg     all sorts of other programs in order to regenerate files that came
8412391620Smrg     with the distribution.
8512391620Smrg
861b2353dbSmrg  7. Often, you can also type `make uninstall' to remove the installed
871b2353dbSmrg     files again.  In practice, not all packages have tested that
881b2353dbSmrg     uninstallation works correctly, even though it is required by the
891b2353dbSmrg     GNU Coding Standards.
901b2353dbSmrg
911b2353dbSmrg  8. Some packages, particularly those that use Automake, provide `make
921b2353dbSmrg     distcheck', which can by used by developers to test that all other
931b2353dbSmrg     targets like `make install' and `make uninstall' work correctly.
941b2353dbSmrg     This target is generally not run by end users.
9512391620Smrg
9612391620SmrgCompilers and Options
9712391620Smrg=====================
9812391620Smrg
9912391620Smrg   Some systems require unusual options for compilation or linking that
10012391620Smrgthe `configure' script does not know about.  Run `./configure --help'
10112391620Smrgfor details on some of the pertinent environment variables.
10212391620Smrg
10312391620Smrg   You can give `configure' initial values for configuration parameters
10412391620Smrgby setting variables in the command line or in the environment.  Here
10512391620Smrgis an example:
10612391620Smrg
10712391620Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10812391620Smrg
10912391620Smrg   *Note Defining Variables::, for more details.
11012391620Smrg
11112391620SmrgCompiling For Multiple Architectures
11212391620Smrg====================================
11312391620Smrg
11412391620Smrg   You can compile the package for more than one kind of computer at the
11512391620Smrgsame time, by placing the object files for each architecture in their
11612391620Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11712391620Smrgdirectory where you want the object files and executables to go and run
11812391620Smrgthe `configure' script.  `configure' automatically checks for the
1191b2353dbSmrgsource code in the directory that `configure' is in and in `..'.  This
1201b2353dbSmrgis known as a "VPATH" build.
12112391620Smrg
12212391620Smrg   With a non-GNU `make', it is safer to compile the package for one
12312391620Smrgarchitecture at a time in the source code directory.  After you have
12412391620Smrginstalled the package for one architecture, use `make distclean' before
12512391620Smrgreconfiguring for another architecture.
12612391620Smrg
12712391620Smrg   On MacOS X 10.5 and later systems, you can create libraries and
12812391620Smrgexecutables that work on multiple system types--known as "fat" or
12912391620Smrg"universal" binaries--by specifying multiple `-arch' options to the
13012391620Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
13112391620Smrgthis:
13212391620Smrg
13312391620Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13412391620Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13512391620Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
13612391620Smrg
13712391620Smrg   This is not guaranteed to produce working output in all cases, you
13812391620Smrgmay have to build one architecture at a time and combine the results
13912391620Smrgusing the `lipo' tool if you have problems.
14012391620Smrg
14112391620SmrgInstallation Names
14212391620Smrg==================
14312391620Smrg
14412391620Smrg   By default, `make install' installs the package's commands under
14512391620Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14612391620Smrgcan specify an installation prefix other than `/usr/local' by giving
1471b2353dbSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1481b2353dbSmrgabsolute file name.
14912391620Smrg
15012391620Smrg   You can specify separate installation prefixes for
15112391620Smrgarchitecture-specific files and architecture-independent files.  If you
15212391620Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15312391620SmrgPREFIX as the prefix for installing programs and libraries.
15412391620SmrgDocumentation and other data files still use the regular prefix.
15512391620Smrg
15612391620Smrg   In addition, if you use an unusual directory layout you can give
15712391620Smrgoptions like `--bindir=DIR' to specify different values for particular
15812391620Smrgkinds of files.  Run `configure --help' for a list of the directories
1591b2353dbSmrgyou can set and what kinds of files go in them.  In general, the
1601b2353dbSmrgdefault for these options is expressed in terms of `${prefix}', so that
1611b2353dbSmrgspecifying just `--prefix' will affect all of the other directory
1621b2353dbSmrgspecifications that were not explicitly provided.
1631b2353dbSmrg
1641b2353dbSmrg   The most portable way to affect installation locations is to pass the
1651b2353dbSmrgcorrect locations to `configure'; however, many packages provide one or
1661b2353dbSmrgboth of the following shortcuts of passing variable assignments to the
1671b2353dbSmrg`make install' command line to change installation locations without
1681b2353dbSmrghaving to reconfigure or recompile.
1691b2353dbSmrg
1701b2353dbSmrg   The first method involves providing an override variable for each
1711b2353dbSmrgaffected directory.  For example, `make install
1721b2353dbSmrgprefix=/alternate/directory' will choose an alternate location for all
1731b2353dbSmrgdirectory configuration variables that were expressed in terms of
1741b2353dbSmrg`${prefix}'.  Any directories that were specified during `configure',
1751b2353dbSmrgbut not in terms of `${prefix}', must each be overridden at install
1761b2353dbSmrgtime for the entire installation to be relocated.  The approach of
1771b2353dbSmrgmakefile variable overrides for each directory variable is required by
1781b2353dbSmrgthe GNU Coding Standards, and ideally causes no recompilation.
1791b2353dbSmrgHowever, some platforms have known limitations with the semantics of
1801b2353dbSmrgshared libraries that end up requiring recompilation when using this
1811b2353dbSmrgmethod, particularly noticeable in packages that use GNU Libtool.
1821b2353dbSmrg
1831b2353dbSmrg   The second method involves providing the `DESTDIR' variable.  For
1841b2353dbSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
1851b2353dbSmrg`/alternate/directory' before all installation names.  The approach of
1861b2353dbSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1871b2353dbSmrgdoes not work on platforms that have drive letters.  On the other hand,
1881b2353dbSmrgit does better at avoiding recompilation issues, and works well even
1891b2353dbSmrgwhen some directory options were not specified in terms of `${prefix}'
1901b2353dbSmrgat `configure' time.
1911b2353dbSmrg
1921b2353dbSmrgOptional Features
1931b2353dbSmrg=================
19412391620Smrg
19512391620Smrg   If the package supports it, you can cause programs to be installed
19612391620Smrgwith an extra prefix or suffix on their names by giving `configure' the
19712391620Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19812391620Smrg
19912391620Smrg   Some packages pay attention to `--enable-FEATURE' options to
20012391620Smrg`configure', where FEATURE indicates an optional part of the package.
20112391620SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20212391620Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20312391620Smrg`README' should mention any `--enable-' and `--with-' options that the
20412391620Smrgpackage recognizes.
20512391620Smrg
20612391620Smrg   For packages that use the X Window System, `configure' can usually
20712391620Smrgfind the X include and library files automatically, but if it doesn't,
20812391620Smrgyou can use the `configure' options `--x-includes=DIR' and
20912391620Smrg`--x-libraries=DIR' to specify their locations.
21012391620Smrg
2111b2353dbSmrg   Some packages offer the ability to configure how verbose the
2121b2353dbSmrgexecution of `make' will be.  For these packages, running `./configure
2131b2353dbSmrg--enable-silent-rules' sets the default to minimal output, which can be
2141b2353dbSmrgoverridden with `make V=1'; while running `./configure
2151b2353dbSmrg--disable-silent-rules' sets the default to verbose, which can be
2161b2353dbSmrgoverridden with `make V=0'.
2171b2353dbSmrg
21812391620SmrgParticular systems
21912391620Smrg==================
22012391620Smrg
22112391620Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22212391620SmrgCC is not installed, it is recommended to use the following options in
22312391620Smrgorder to use an ANSI C compiler:
22412391620Smrg
2251b2353dbSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22612391620Smrg
22712391620Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22812391620Smrg
2291b2353dbSmrg   HP-UX `make' updates targets which have the same time stamps as
2301b2353dbSmrgtheir prerequisites, which makes it generally unusable when shipped
2311b2353dbSmrggenerated files such as `configure' are involved.  Use GNU `make'
2321b2353dbSmrginstead.
2331b2353dbSmrg
23412391620Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23512391620Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23612391620Smrga workaround.  If GNU CC is not installed, it is therefore recommended
23712391620Smrgto try
23812391620Smrg
23912391620Smrg     ./configure CC="cc"
24012391620Smrg
24112391620Smrgand if that doesn't work, try
24212391620Smrg
24312391620Smrg     ./configure CC="cc -nodtk"
24412391620Smrg
2451b2353dbSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2461b2353dbSmrgdirectory contains several dysfunctional programs; working variants of
2471b2353dbSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2481b2353dbSmrgin your `PATH', put it _after_ `/usr/bin'.
2491b2353dbSmrg
2501b2353dbSmrg   On Haiku, software installed for all users goes in `/boot/common',
2511b2353dbSmrgnot `/usr/local'.  It is recommended to use the following options:
2521b2353dbSmrg
2531b2353dbSmrg     ./configure --prefix=/boot/common
2541b2353dbSmrg
25512391620SmrgSpecifying the System Type
25612391620Smrg==========================
25712391620Smrg
25812391620Smrg   There may be some features `configure' cannot figure out
25912391620Smrgautomatically, but needs to determine by the type of machine the package
26012391620Smrgwill run on.  Usually, assuming the package is built to be run on the
26112391620Smrg_same_ architectures, `configure' can figure that out, but if it prints
26212391620Smrga message saying it cannot guess the machine type, give it the
26312391620Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26412391620Smrgtype, such as `sun4', or a canonical name which has the form:
26512391620Smrg
26612391620Smrg     CPU-COMPANY-SYSTEM
26712391620Smrg
26812391620Smrgwhere SYSTEM can have one of these forms:
26912391620Smrg
2701b2353dbSmrg     OS
2711b2353dbSmrg     KERNEL-OS
27212391620Smrg
27312391620Smrg   See the file `config.sub' for the possible values of each field.  If
27412391620Smrg`config.sub' isn't included in this package, then this package doesn't
27512391620Smrgneed to know the machine type.
27612391620Smrg
27712391620Smrg   If you are _building_ compiler tools for cross-compiling, you should
27812391620Smrguse the option `--target=TYPE' to select the type of system they will
27912391620Smrgproduce code for.
28012391620Smrg
28112391620Smrg   If you want to _use_ a cross compiler, that generates code for a
28212391620Smrgplatform different from the build platform, you should specify the
28312391620Smrg"host" platform (i.e., that on which the generated programs will
28412391620Smrgeventually be run) with `--host=TYPE'.
28512391620Smrg
28612391620SmrgSharing Defaults
28712391620Smrg================
28812391620Smrg
28912391620Smrg   If you want to set default values for `configure' scripts to share,
29012391620Smrgyou can create a site shell script called `config.site' that gives
29112391620Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
29212391620Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29312391620Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29412391620Smrg`CONFIG_SITE' environment variable to the location of the site script.
29512391620SmrgA warning: not all `configure' scripts look for a site script.
29612391620Smrg
29712391620SmrgDefining Variables
29812391620Smrg==================
29912391620Smrg
30012391620Smrg   Variables not defined in a site shell script can be set in the
30112391620Smrgenvironment passed to `configure'.  However, some packages may run
30212391620Smrgconfigure again during the build, and the customized values of these
30312391620Smrgvariables may be lost.  In order to avoid this problem, you should set
30412391620Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30512391620Smrg
30612391620Smrg     ./configure CC=/usr/local2/bin/gcc
30712391620Smrg
30812391620Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30912391620Smrgoverridden in the site shell script).
31012391620Smrg
31112391620SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31212391620Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31312391620Smrg
31412391620Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31512391620Smrg
31612391620Smrg`configure' Invocation
31712391620Smrg======================
31812391620Smrg
31912391620Smrg   `configure' recognizes the following options to control how it
32012391620Smrgoperates.
32112391620Smrg
32212391620Smrg`--help'
32312391620Smrg`-h'
32412391620Smrg     Print a summary of all of the options to `configure', and exit.
32512391620Smrg
32612391620Smrg`--help=short'
32712391620Smrg`--help=recursive'
32812391620Smrg     Print a summary of the options unique to this package's
32912391620Smrg     `configure', and exit.  The `short' variant lists options used
33012391620Smrg     only in the top level, while the `recursive' variant lists options
33112391620Smrg     also present in any nested packages.
33212391620Smrg
33312391620Smrg`--version'
33412391620Smrg`-V'
33512391620Smrg     Print the version of Autoconf used to generate the `configure'
33612391620Smrg     script, and exit.
33712391620Smrg
33812391620Smrg`--cache-file=FILE'
33912391620Smrg     Enable the cache: use and save the results of the tests in FILE,
34012391620Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34112391620Smrg     disable caching.
34212391620Smrg
34312391620Smrg`--config-cache'
34412391620Smrg`-C'
34512391620Smrg     Alias for `--cache-file=config.cache'.
34612391620Smrg
34712391620Smrg`--quiet'
34812391620Smrg`--silent'
34912391620Smrg`-q'
35012391620Smrg     Do not print messages saying which checks are being made.  To
35112391620Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35212391620Smrg     messages will still be shown).
35312391620Smrg
35412391620Smrg`--srcdir=DIR'
35512391620Smrg     Look for the package's source code in directory DIR.  Usually
35612391620Smrg     `configure' can determine that directory automatically.
35712391620Smrg
35812391620Smrg`--prefix=DIR'
3591b2353dbSmrg     Use DIR as the installation prefix.  *note Installation Names::
36012391620Smrg     for more details, including other options available for fine-tuning
36112391620Smrg     the installation locations.
36212391620Smrg
36312391620Smrg`--no-create'
36412391620Smrg`-n'
36512391620Smrg     Run the configure checks, but stop before creating any output
36612391620Smrg     files.
36712391620Smrg
36812391620Smrg`configure' also accepts some other, not widely useful, options.  Run
36912391620Smrg`configure --help' for more details.
37012391620Smrg
371