108e312fdSmrgInstallation Instructions
208e312fdSmrg*************************
308e312fdSmrg
433dddc75SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
533dddc75SmrgInc.
608e312fdSmrg
733dddc75Smrg   Copying and distribution of this file, with or without modification,
833dddc75Smrgare permitted in any medium without royalty provided the copyright
933dddc75Smrgnotice and this notice are preserved.  This file is offered as-is,
1033dddc75Smrgwithout warranty of any kind.
1108e312fdSmrg
1208e312fdSmrgBasic Installation
1308e312fdSmrg==================
1408e312fdSmrg
1508e312fdSmrg   Briefly, the shell commands `./configure; make; make install' should
1608e312fdSmrgconfigure, build, and install this package.  The following
1708e312fdSmrgmore-detailed instructions are generic; see the `README' file for
1833dddc75Smrginstructions specific to this package.  Some packages provide this
1933dddc75Smrg`INSTALL' file but do not implement all of the features documented
2033dddc75Smrgbelow.  The lack of an optional feature in a given package is not
2133dddc75Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2233dddc75Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2308e312fdSmrg
2408e312fdSmrg   The `configure' shell script attempts to guess correct values for
2508e312fdSmrgvarious system-dependent variables used during compilation.  It uses
2608e312fdSmrgthose values to create a `Makefile' in each directory of the package.
2708e312fdSmrgIt may also create one or more `.h' files containing system-dependent
2808e312fdSmrgdefinitions.  Finally, it creates a shell script `config.status' that
2908e312fdSmrgyou can run in the future to recreate the current configuration, and a
3008e312fdSmrgfile `config.log' containing compiler output (useful mainly for
3108e312fdSmrgdebugging `configure').
3208e312fdSmrg
3308e312fdSmrg   It can also use an optional file (typically called `config.cache'
3408e312fdSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3508e312fdSmrgthe results of its tests to speed up reconfiguring.  Caching is
3608e312fdSmrgdisabled by default to prevent problems with accidental use of stale
3708e312fdSmrgcache files.
3808e312fdSmrg
3908e312fdSmrg   If you need to do unusual things to compile the package, please try
4008e312fdSmrgto figure out how `configure' could check whether to do them, and mail
4108e312fdSmrgdiffs or instructions to the address given in the `README' so they can
4208e312fdSmrgbe considered for the next release.  If you are using the cache, and at
4308e312fdSmrgsome point `config.cache' contains results you don't want to keep, you
4408e312fdSmrgmay remove or edit it.
4508e312fdSmrg
4608e312fdSmrg   The file `configure.ac' (or `configure.in') is used to create
4708e312fdSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4808e312fdSmrgyou want to change it or regenerate `configure' using a newer version
4908e312fdSmrgof `autoconf'.
5008e312fdSmrg
5133dddc75Smrg   The simplest way to compile this package is:
5208e312fdSmrg
5308e312fdSmrg  1. `cd' to the directory containing the package's source code and type
5408e312fdSmrg     `./configure' to configure the package for your system.
5508e312fdSmrg
5608e312fdSmrg     Running `configure' might take a while.  While running, it prints
5708e312fdSmrg     some messages telling which features it is checking for.
5808e312fdSmrg
5908e312fdSmrg  2. Type `make' to compile the package.
6008e312fdSmrg
6108e312fdSmrg  3. Optionally, type `make check' to run any self-tests that come with
6233dddc75Smrg     the package, generally using the just-built uninstalled binaries.
6308e312fdSmrg
6408e312fdSmrg  4. Type `make install' to install the programs and any data files and
6533dddc75Smrg     documentation.  When installing into a prefix owned by root, it is
6633dddc75Smrg     recommended that the package be configured and built as a regular
6733dddc75Smrg     user, and only the `make install' phase executed with root
6833dddc75Smrg     privileges.
6933dddc75Smrg
7033dddc75Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7133dddc75Smrg     this time using the binaries in their final installed location.
7233dddc75Smrg     This target does not install anything.  Running this target as a
7333dddc75Smrg     regular user, particularly if the prior `make install' required
7433dddc75Smrg     root privileges, verifies that the installation completed
7533dddc75Smrg     correctly.
7633dddc75Smrg
7733dddc75Smrg  6. You can remove the program binaries and object files from the
7808e312fdSmrg     source code directory by typing `make clean'.  To also remove the
7908e312fdSmrg     files that `configure' created (so you can compile the package for
8008e312fdSmrg     a different kind of computer), type `make distclean'.  There is
8108e312fdSmrg     also a `make maintainer-clean' target, but that is intended mainly
8208e312fdSmrg     for the package's developers.  If you use it, you may have to get
8308e312fdSmrg     all sorts of other programs in order to regenerate files that came
8408e312fdSmrg     with the distribution.
8508e312fdSmrg
8633dddc75Smrg  7. Often, you can also type `make uninstall' to remove the installed
8733dddc75Smrg     files again.  In practice, not all packages have tested that
8833dddc75Smrg     uninstallation works correctly, even though it is required by the
8933dddc75Smrg     GNU Coding Standards.
9033dddc75Smrg
9133dddc75Smrg  8. Some packages, particularly those that use Automake, provide `make
9233dddc75Smrg     distcheck', which can by used by developers to test that all other
9333dddc75Smrg     targets like `make install' and `make uninstall' work correctly.
9433dddc75Smrg     This target is generally not run by end users.
9508e312fdSmrg
9608e312fdSmrgCompilers and Options
9708e312fdSmrg=====================
9808e312fdSmrg
9908e312fdSmrg   Some systems require unusual options for compilation or linking that
10008e312fdSmrgthe `configure' script does not know about.  Run `./configure --help'
10108e312fdSmrgfor details on some of the pertinent environment variables.
10208e312fdSmrg
10308e312fdSmrg   You can give `configure' initial values for configuration parameters
10408e312fdSmrgby setting variables in the command line or in the environment.  Here
10508e312fdSmrgis an example:
10608e312fdSmrg
10708e312fdSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10808e312fdSmrg
10908e312fdSmrg   *Note Defining Variables::, for more details.
11008e312fdSmrg
11108e312fdSmrgCompiling For Multiple Architectures
11208e312fdSmrg====================================
11308e312fdSmrg
11408e312fdSmrg   You can compile the package for more than one kind of computer at the
11508e312fdSmrgsame time, by placing the object files for each architecture in their
11608e312fdSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11708e312fdSmrgdirectory where you want the object files and executables to go and run
11808e312fdSmrgthe `configure' script.  `configure' automatically checks for the
11933dddc75Smrgsource code in the directory that `configure' is in and in `..'.  This
12033dddc75Smrgis known as a "VPATH" build.
12108e312fdSmrg
12208e312fdSmrg   With a non-GNU `make', it is safer to compile the package for one
12308e312fdSmrgarchitecture at a time in the source code directory.  After you have
12408e312fdSmrginstalled the package for one architecture, use `make distclean' before
12508e312fdSmrgreconfiguring for another architecture.
12608e312fdSmrg
12708e312fdSmrg   On MacOS X 10.5 and later systems, you can create libraries and
12808e312fdSmrgexecutables that work on multiple system types--known as "fat" or
12908e312fdSmrg"universal" binaries--by specifying multiple `-arch' options to the
13008e312fdSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
13108e312fdSmrgthis:
13208e312fdSmrg
13308e312fdSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13408e312fdSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13508e312fdSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
13608e312fdSmrg
13708e312fdSmrg   This is not guaranteed to produce working output in all cases, you
13808e312fdSmrgmay have to build one architecture at a time and combine the results
13908e312fdSmrgusing the `lipo' tool if you have problems.
14008e312fdSmrg
14108e312fdSmrgInstallation Names
14208e312fdSmrg==================
14308e312fdSmrg
14408e312fdSmrg   By default, `make install' installs the package's commands under
14508e312fdSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14608e312fdSmrgcan specify an installation prefix other than `/usr/local' by giving
14733dddc75Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14833dddc75Smrgabsolute file name.
14908e312fdSmrg
15008e312fdSmrg   You can specify separate installation prefixes for
15108e312fdSmrgarchitecture-specific files and architecture-independent files.  If you
15208e312fdSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15308e312fdSmrgPREFIX as the prefix for installing programs and libraries.
15408e312fdSmrgDocumentation and other data files still use the regular prefix.
15508e312fdSmrg
15608e312fdSmrg   In addition, if you use an unusual directory layout you can give
15708e312fdSmrgoptions like `--bindir=DIR' to specify different values for particular
15808e312fdSmrgkinds of files.  Run `configure --help' for a list of the directories
15933dddc75Smrgyou can set and what kinds of files go in them.  In general, the
16033dddc75Smrgdefault for these options is expressed in terms of `${prefix}', so that
16133dddc75Smrgspecifying just `--prefix' will affect all of the other directory
16233dddc75Smrgspecifications that were not explicitly provided.
16333dddc75Smrg
16433dddc75Smrg   The most portable way to affect installation locations is to pass the
16533dddc75Smrgcorrect locations to `configure'; however, many packages provide one or
16633dddc75Smrgboth of the following shortcuts of passing variable assignments to the
16733dddc75Smrg`make install' command line to change installation locations without
16833dddc75Smrghaving to reconfigure or recompile.
16933dddc75Smrg
17033dddc75Smrg   The first method involves providing an override variable for each
17133dddc75Smrgaffected directory.  For example, `make install
17233dddc75Smrgprefix=/alternate/directory' will choose an alternate location for all
17333dddc75Smrgdirectory configuration variables that were expressed in terms of
17433dddc75Smrg`${prefix}'.  Any directories that were specified during `configure',
17533dddc75Smrgbut not in terms of `${prefix}', must each be overridden at install
17633dddc75Smrgtime for the entire installation to be relocated.  The approach of
17733dddc75Smrgmakefile variable overrides for each directory variable is required by
17833dddc75Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17933dddc75SmrgHowever, some platforms have known limitations with the semantics of
18033dddc75Smrgshared libraries that end up requiring recompilation when using this
18133dddc75Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18233dddc75Smrg
18333dddc75Smrg   The second method involves providing the `DESTDIR' variable.  For
18433dddc75Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18533dddc75Smrg`/alternate/directory' before all installation names.  The approach of
18633dddc75Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18733dddc75Smrgdoes not work on platforms that have drive letters.  On the other hand,
18833dddc75Smrgit does better at avoiding recompilation issues, and works well even
18933dddc75Smrgwhen some directory options were not specified in terms of `${prefix}'
19033dddc75Smrgat `configure' time.
19133dddc75Smrg
19233dddc75SmrgOptional Features
19333dddc75Smrg=================
19408e312fdSmrg
19508e312fdSmrg   If the package supports it, you can cause programs to be installed
19608e312fdSmrgwith an extra prefix or suffix on their names by giving `configure' the
19708e312fdSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19808e312fdSmrg
19908e312fdSmrg   Some packages pay attention to `--enable-FEATURE' options to
20008e312fdSmrg`configure', where FEATURE indicates an optional part of the package.
20108e312fdSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20208e312fdSmrgis something like `gnu-as' or `x' (for the X Window System).  The
20308e312fdSmrg`README' should mention any `--enable-' and `--with-' options that the
20408e312fdSmrgpackage recognizes.
20508e312fdSmrg
20608e312fdSmrg   For packages that use the X Window System, `configure' can usually
20708e312fdSmrgfind the X include and library files automatically, but if it doesn't,
20808e312fdSmrgyou can use the `configure' options `--x-includes=DIR' and
20908e312fdSmrg`--x-libraries=DIR' to specify their locations.
21008e312fdSmrg
21133dddc75Smrg   Some packages offer the ability to configure how verbose the
21233dddc75Smrgexecution of `make' will be.  For these packages, running `./configure
21333dddc75Smrg--enable-silent-rules' sets the default to minimal output, which can be
21433dddc75Smrgoverridden with `make V=1'; while running `./configure
21533dddc75Smrg--disable-silent-rules' sets the default to verbose, which can be
21633dddc75Smrgoverridden with `make V=0'.
21733dddc75Smrg
21808e312fdSmrgParticular systems
21908e312fdSmrg==================
22008e312fdSmrg
22108e312fdSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22208e312fdSmrgCC is not installed, it is recommended to use the following options in
22308e312fdSmrgorder to use an ANSI C compiler:
22408e312fdSmrg
22533dddc75Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22608e312fdSmrg
22708e312fdSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22808e312fdSmrg
22933dddc75Smrg   HP-UX `make' updates targets which have the same time stamps as
23033dddc75Smrgtheir prerequisites, which makes it generally unusable when shipped
23133dddc75Smrggenerated files such as `configure' are involved.  Use GNU `make'
23233dddc75Smrginstead.
23333dddc75Smrg
23408e312fdSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23508e312fdSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23608e312fdSmrga workaround.  If GNU CC is not installed, it is therefore recommended
23708e312fdSmrgto try
23808e312fdSmrg
23908e312fdSmrg     ./configure CC="cc"
24008e312fdSmrg
24108e312fdSmrgand if that doesn't work, try
24208e312fdSmrg
24308e312fdSmrg     ./configure CC="cc -nodtk"
24408e312fdSmrg
24533dddc75Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24633dddc75Smrgdirectory contains several dysfunctional programs; working variants of
24733dddc75Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24833dddc75Smrgin your `PATH', put it _after_ `/usr/bin'.
24933dddc75Smrg
25033dddc75Smrg   On Haiku, software installed for all users goes in `/boot/common',
25133dddc75Smrgnot `/usr/local'.  It is recommended to use the following options:
25233dddc75Smrg
25333dddc75Smrg     ./configure --prefix=/boot/common
25433dddc75Smrg
25508e312fdSmrgSpecifying the System Type
25608e312fdSmrg==========================
25708e312fdSmrg
25808e312fdSmrg   There may be some features `configure' cannot figure out
25908e312fdSmrgautomatically, but needs to determine by the type of machine the package
26008e312fdSmrgwill run on.  Usually, assuming the package is built to be run on the
26108e312fdSmrg_same_ architectures, `configure' can figure that out, but if it prints
26208e312fdSmrga message saying it cannot guess the machine type, give it the
26308e312fdSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
26408e312fdSmrgtype, such as `sun4', or a canonical name which has the form:
26508e312fdSmrg
26608e312fdSmrg     CPU-COMPANY-SYSTEM
26708e312fdSmrg
26808e312fdSmrgwhere SYSTEM can have one of these forms:
26908e312fdSmrg
27033dddc75Smrg     OS
27133dddc75Smrg     KERNEL-OS
27208e312fdSmrg
27308e312fdSmrg   See the file `config.sub' for the possible values of each field.  If
27408e312fdSmrg`config.sub' isn't included in this package, then this package doesn't
27508e312fdSmrgneed to know the machine type.
27608e312fdSmrg
27708e312fdSmrg   If you are _building_ compiler tools for cross-compiling, you should
27808e312fdSmrguse the option `--target=TYPE' to select the type of system they will
27908e312fdSmrgproduce code for.
28008e312fdSmrg
28108e312fdSmrg   If you want to _use_ a cross compiler, that generates code for a
28208e312fdSmrgplatform different from the build platform, you should specify the
28308e312fdSmrg"host" platform (i.e., that on which the generated programs will
28408e312fdSmrgeventually be run) with `--host=TYPE'.
28508e312fdSmrg
28608e312fdSmrgSharing Defaults
28708e312fdSmrg================
28808e312fdSmrg
28908e312fdSmrg   If you want to set default values for `configure' scripts to share,
29008e312fdSmrgyou can create a site shell script called `config.site' that gives
29108e312fdSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
29208e312fdSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29308e312fdSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29408e312fdSmrg`CONFIG_SITE' environment variable to the location of the site script.
29508e312fdSmrgA warning: not all `configure' scripts look for a site script.
29608e312fdSmrg
29708e312fdSmrgDefining Variables
29808e312fdSmrg==================
29908e312fdSmrg
30008e312fdSmrg   Variables not defined in a site shell script can be set in the
30108e312fdSmrgenvironment passed to `configure'.  However, some packages may run
30208e312fdSmrgconfigure again during the build, and the customized values of these
30308e312fdSmrgvariables may be lost.  In order to avoid this problem, you should set
30408e312fdSmrgthem in the `configure' command line, using `VAR=value'.  For example:
30508e312fdSmrg
30608e312fdSmrg     ./configure CC=/usr/local2/bin/gcc
30708e312fdSmrg
30808e312fdSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
30908e312fdSmrgoverridden in the site shell script).
31008e312fdSmrg
31108e312fdSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31208e312fdSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31308e312fdSmrg
31408e312fdSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31508e312fdSmrg
31608e312fdSmrg`configure' Invocation
31708e312fdSmrg======================
31808e312fdSmrg
31908e312fdSmrg   `configure' recognizes the following options to control how it
32008e312fdSmrgoperates.
32108e312fdSmrg
32208e312fdSmrg`--help'
32308e312fdSmrg`-h'
32408e312fdSmrg     Print a summary of all of the options to `configure', and exit.
32508e312fdSmrg
32608e312fdSmrg`--help=short'
32708e312fdSmrg`--help=recursive'
32808e312fdSmrg     Print a summary of the options unique to this package's
32908e312fdSmrg     `configure', and exit.  The `short' variant lists options used
33008e312fdSmrg     only in the top level, while the `recursive' variant lists options
33108e312fdSmrg     also present in any nested packages.
33208e312fdSmrg
33308e312fdSmrg`--version'
33408e312fdSmrg`-V'
33508e312fdSmrg     Print the version of Autoconf used to generate the `configure'
33608e312fdSmrg     script, and exit.
33708e312fdSmrg
33808e312fdSmrg`--cache-file=FILE'
33908e312fdSmrg     Enable the cache: use and save the results of the tests in FILE,
34008e312fdSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34108e312fdSmrg     disable caching.
34208e312fdSmrg
34308e312fdSmrg`--config-cache'
34408e312fdSmrg`-C'
34508e312fdSmrg     Alias for `--cache-file=config.cache'.
34608e312fdSmrg
34708e312fdSmrg`--quiet'
34808e312fdSmrg`--silent'
34908e312fdSmrg`-q'
35008e312fdSmrg     Do not print messages saying which checks are being made.  To
35108e312fdSmrg     suppress all normal output, redirect it to `/dev/null' (any error
35208e312fdSmrg     messages will still be shown).
35308e312fdSmrg
35408e312fdSmrg`--srcdir=DIR'
35508e312fdSmrg     Look for the package's source code in directory DIR.  Usually
35608e312fdSmrg     `configure' can determine that directory automatically.
35708e312fdSmrg
35808e312fdSmrg`--prefix=DIR'
35933dddc75Smrg     Use DIR as the installation prefix.  *note Installation Names::
36008e312fdSmrg     for more details, including other options available for fine-tuning
36108e312fdSmrg     the installation locations.
36208e312fdSmrg
36308e312fdSmrg`--no-create'
36408e312fdSmrg`-n'
36508e312fdSmrg     Run the configure checks, but stop before creating any output
36608e312fdSmrg     files.
36708e312fdSmrg
36808e312fdSmrg`configure' also accepts some other, not widely useful, options.  Run
36908e312fdSmrg`configure --help' for more details.
37008e312fdSmrg
371