123a8d56dSmrgInstallation Instructions
223a8d56dSmrg*************************
323a8d56dSmrg
4da4a0041SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5da4a0041SmrgInc.
623a8d56dSmrg
7da4a0041Smrg   Copying and distribution of this file, with or without modification,
8da4a0041Smrgare permitted in any medium without royalty provided the copyright
9da4a0041Smrgnotice and this notice are preserved.  This file is offered as-is,
10da4a0041Smrgwithout warranty of any kind.
1123a8d56dSmrg
1223a8d56dSmrgBasic Installation
1323a8d56dSmrg==================
1423a8d56dSmrg
1523a8d56dSmrg   Briefly, the shell commands `./configure; make; make install' should
1623a8d56dSmrgconfigure, build, and install this package.  The following
1723a8d56dSmrgmore-detailed instructions are generic; see the `README' file for
18da4a0041Smrginstructions specific to this package.  Some packages provide this
19da4a0041Smrg`INSTALL' file but do not implement all of the features documented
20da4a0041Smrgbelow.  The lack of an optional feature in a given package is not
21da4a0041Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22da4a0041Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2323a8d56dSmrg
2423a8d56dSmrg   The `configure' shell script attempts to guess correct values for
2523a8d56dSmrgvarious system-dependent variables used during compilation.  It uses
2623a8d56dSmrgthose values to create a `Makefile' in each directory of the package.
2723a8d56dSmrgIt may also create one or more `.h' files containing system-dependent
2823a8d56dSmrgdefinitions.  Finally, it creates a shell script `config.status' that
2923a8d56dSmrgyou can run in the future to recreate the current configuration, and a
3023a8d56dSmrgfile `config.log' containing compiler output (useful mainly for
3123a8d56dSmrgdebugging `configure').
3223a8d56dSmrg
3323a8d56dSmrg   It can also use an optional file (typically called `config.cache'
3423a8d56dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3523a8d56dSmrgthe results of its tests to speed up reconfiguring.  Caching is
3623a8d56dSmrgdisabled by default to prevent problems with accidental use of stale
3723a8d56dSmrgcache files.
3823a8d56dSmrg
3923a8d56dSmrg   If you need to do unusual things to compile the package, please try
4023a8d56dSmrgto figure out how `configure' could check whether to do them, and mail
4123a8d56dSmrgdiffs or instructions to the address given in the `README' so they can
4223a8d56dSmrgbe considered for the next release.  If you are using the cache, and at
4323a8d56dSmrgsome point `config.cache' contains results you don't want to keep, you
4423a8d56dSmrgmay remove or edit it.
4523a8d56dSmrg
4623a8d56dSmrg   The file `configure.ac' (or `configure.in') is used to create
4723a8d56dSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4823a8d56dSmrgyou want to change it or regenerate `configure' using a newer version
4923a8d56dSmrgof `autoconf'.
5023a8d56dSmrg
51da4a0041Smrg   The simplest way to compile this package is:
5223a8d56dSmrg
5323a8d56dSmrg  1. `cd' to the directory containing the package's source code and type
5423a8d56dSmrg     `./configure' to configure the package for your system.
5523a8d56dSmrg
5623a8d56dSmrg     Running `configure' might take a while.  While running, it prints
5723a8d56dSmrg     some messages telling which features it is checking for.
5823a8d56dSmrg
5923a8d56dSmrg  2. Type `make' to compile the package.
6023a8d56dSmrg
6123a8d56dSmrg  3. Optionally, type `make check' to run any self-tests that come with
62da4a0041Smrg     the package, generally using the just-built uninstalled binaries.
6323a8d56dSmrg
6423a8d56dSmrg  4. Type `make install' to install the programs and any data files and
65da4a0041Smrg     documentation.  When installing into a prefix owned by root, it is
66da4a0041Smrg     recommended that the package be configured and built as a regular
67da4a0041Smrg     user, and only the `make install' phase executed with root
68da4a0041Smrg     privileges.
69da4a0041Smrg
70da4a0041Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71da4a0041Smrg     this time using the binaries in their final installed location.
72da4a0041Smrg     This target does not install anything.  Running this target as a
73da4a0041Smrg     regular user, particularly if the prior `make install' required
74da4a0041Smrg     root privileges, verifies that the installation completed
75da4a0041Smrg     correctly.
76da4a0041Smrg
77da4a0041Smrg  6. You can remove the program binaries and object files from the
7823a8d56dSmrg     source code directory by typing `make clean'.  To also remove the
7923a8d56dSmrg     files that `configure' created (so you can compile the package for
8023a8d56dSmrg     a different kind of computer), type `make distclean'.  There is
8123a8d56dSmrg     also a `make maintainer-clean' target, but that is intended mainly
8223a8d56dSmrg     for the package's developers.  If you use it, you may have to get
8323a8d56dSmrg     all sorts of other programs in order to regenerate files that came
8423a8d56dSmrg     with the distribution.
8523a8d56dSmrg
86da4a0041Smrg  7. Often, you can also type `make uninstall' to remove the installed
87da4a0041Smrg     files again.  In practice, not all packages have tested that
88da4a0041Smrg     uninstallation works correctly, even though it is required by the
89da4a0041Smrg     GNU Coding Standards.
90da4a0041Smrg
91da4a0041Smrg  8. Some packages, particularly those that use Automake, provide `make
92da4a0041Smrg     distcheck', which can by used by developers to test that all other
93da4a0041Smrg     targets like `make install' and `make uninstall' work correctly.
94da4a0041Smrg     This target is generally not run by end users.
9523a8d56dSmrg
9623a8d56dSmrgCompilers and Options
9723a8d56dSmrg=====================
9823a8d56dSmrg
9923a8d56dSmrg   Some systems require unusual options for compilation or linking that
10023a8d56dSmrgthe `configure' script does not know about.  Run `./configure --help'
10123a8d56dSmrgfor details on some of the pertinent environment variables.
10223a8d56dSmrg
10323a8d56dSmrg   You can give `configure' initial values for configuration parameters
10423a8d56dSmrgby setting variables in the command line or in the environment.  Here
10523a8d56dSmrgis an example:
10623a8d56dSmrg
10723a8d56dSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10823a8d56dSmrg
10923a8d56dSmrg   *Note Defining Variables::, for more details.
11023a8d56dSmrg
11123a8d56dSmrgCompiling For Multiple Architectures
11223a8d56dSmrg====================================
11323a8d56dSmrg
11423a8d56dSmrg   You can compile the package for more than one kind of computer at the
11523a8d56dSmrgsame time, by placing the object files for each architecture in their
11623a8d56dSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11723a8d56dSmrgdirectory where you want the object files and executables to go and run
11823a8d56dSmrgthe `configure' script.  `configure' automatically checks for the
119da4a0041Smrgsource code in the directory that `configure' is in and in `..'.  This
120da4a0041Smrgis known as a "VPATH" build.
12123a8d56dSmrg
12223a8d56dSmrg   With a non-GNU `make', it is safer to compile the package for one
12323a8d56dSmrgarchitecture at a time in the source code directory.  After you have
12423a8d56dSmrginstalled the package for one architecture, use `make distclean' before
12523a8d56dSmrgreconfiguring for another architecture.
12623a8d56dSmrg
12723a8d56dSmrg   On MacOS X 10.5 and later systems, you can create libraries and
12823a8d56dSmrgexecutables that work on multiple system types--known as "fat" or
12923a8d56dSmrg"universal" binaries--by specifying multiple `-arch' options to the
13023a8d56dSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
13123a8d56dSmrgthis:
13223a8d56dSmrg
13323a8d56dSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13423a8d56dSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13523a8d56dSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
13623a8d56dSmrg
13723a8d56dSmrg   This is not guaranteed to produce working output in all cases, you
13823a8d56dSmrgmay have to build one architecture at a time and combine the results
13923a8d56dSmrgusing the `lipo' tool if you have problems.
14023a8d56dSmrg
14123a8d56dSmrgInstallation Names
14223a8d56dSmrg==================
14323a8d56dSmrg
14423a8d56dSmrg   By default, `make install' installs the package's commands under
14523a8d56dSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14623a8d56dSmrgcan specify an installation prefix other than `/usr/local' by giving
147da4a0041Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148da4a0041Smrgabsolute file name.
14923a8d56dSmrg
15023a8d56dSmrg   You can specify separate installation prefixes for
15123a8d56dSmrgarchitecture-specific files and architecture-independent files.  If you
15223a8d56dSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15323a8d56dSmrgPREFIX as the prefix for installing programs and libraries.
15423a8d56dSmrgDocumentation and other data files still use the regular prefix.
15523a8d56dSmrg
15623a8d56dSmrg   In addition, if you use an unusual directory layout you can give
15723a8d56dSmrgoptions like `--bindir=DIR' to specify different values for particular
15823a8d56dSmrgkinds of files.  Run `configure --help' for a list of the directories
159da4a0041Smrgyou can set and what kinds of files go in them.  In general, the
160da4a0041Smrgdefault for these options is expressed in terms of `${prefix}', so that
161da4a0041Smrgspecifying just `--prefix' will affect all of the other directory
162da4a0041Smrgspecifications that were not explicitly provided.
163da4a0041Smrg
164da4a0041Smrg   The most portable way to affect installation locations is to pass the
165da4a0041Smrgcorrect locations to `configure'; however, many packages provide one or
166da4a0041Smrgboth of the following shortcuts of passing variable assignments to the
167da4a0041Smrg`make install' command line to change installation locations without
168da4a0041Smrghaving to reconfigure or recompile.
169da4a0041Smrg
170da4a0041Smrg   The first method involves providing an override variable for each
171da4a0041Smrgaffected directory.  For example, `make install
172da4a0041Smrgprefix=/alternate/directory' will choose an alternate location for all
173da4a0041Smrgdirectory configuration variables that were expressed in terms of
174da4a0041Smrg`${prefix}'.  Any directories that were specified during `configure',
175da4a0041Smrgbut not in terms of `${prefix}', must each be overridden at install
176da4a0041Smrgtime for the entire installation to be relocated.  The approach of
177da4a0041Smrgmakefile variable overrides for each directory variable is required by
178da4a0041Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179da4a0041SmrgHowever, some platforms have known limitations with the semantics of
180da4a0041Smrgshared libraries that end up requiring recompilation when using this
181da4a0041Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182da4a0041Smrg
183da4a0041Smrg   The second method involves providing the `DESTDIR' variable.  For
184da4a0041Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185da4a0041Smrg`/alternate/directory' before all installation names.  The approach of
186da4a0041Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187da4a0041Smrgdoes not work on platforms that have drive letters.  On the other hand,
188da4a0041Smrgit does better at avoiding recompilation issues, and works well even
189da4a0041Smrgwhen some directory options were not specified in terms of `${prefix}'
190da4a0041Smrgat `configure' time.
191da4a0041Smrg
192da4a0041SmrgOptional Features
193da4a0041Smrg=================
19423a8d56dSmrg
19523a8d56dSmrg   If the package supports it, you can cause programs to be installed
19623a8d56dSmrgwith an extra prefix or suffix on their names by giving `configure' the
19723a8d56dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19823a8d56dSmrg
19923a8d56dSmrg   Some packages pay attention to `--enable-FEATURE' options to
20023a8d56dSmrg`configure', where FEATURE indicates an optional part of the package.
20123a8d56dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20223a8d56dSmrgis something like `gnu-as' or `x' (for the X Window System).  The
20323a8d56dSmrg`README' should mention any `--enable-' and `--with-' options that the
20423a8d56dSmrgpackage recognizes.
20523a8d56dSmrg
20623a8d56dSmrg   For packages that use the X Window System, `configure' can usually
20723a8d56dSmrgfind the X include and library files automatically, but if it doesn't,
20823a8d56dSmrgyou can use the `configure' options `--x-includes=DIR' and
20923a8d56dSmrg`--x-libraries=DIR' to specify their locations.
21023a8d56dSmrg
211da4a0041Smrg   Some packages offer the ability to configure how verbose the
212da4a0041Smrgexecution of `make' will be.  For these packages, running `./configure
213da4a0041Smrg--enable-silent-rules' sets the default to minimal output, which can be
214da4a0041Smrgoverridden with `make V=1'; while running `./configure
215da4a0041Smrg--disable-silent-rules' sets the default to verbose, which can be
216da4a0041Smrgoverridden with `make V=0'.
217da4a0041Smrg
21823a8d56dSmrgParticular systems
21923a8d56dSmrg==================
22023a8d56dSmrg
22123a8d56dSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22223a8d56dSmrgCC is not installed, it is recommended to use the following options in
22323a8d56dSmrgorder to use an ANSI C compiler:
22423a8d56dSmrg
225da4a0041Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22623a8d56dSmrg
22723a8d56dSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22823a8d56dSmrg
229da4a0041Smrg   HP-UX `make' updates targets which have the same time stamps as
230da4a0041Smrgtheir prerequisites, which makes it generally unusable when shipped
231da4a0041Smrggenerated files such as `configure' are involved.  Use GNU `make'
232da4a0041Smrginstead.
233da4a0041Smrg
23423a8d56dSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23523a8d56dSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23623a8d56dSmrga workaround.  If GNU CC is not installed, it is therefore recommended
23723a8d56dSmrgto try
23823a8d56dSmrg
23923a8d56dSmrg     ./configure CC="cc"
24023a8d56dSmrg
24123a8d56dSmrgand if that doesn't work, try
24223a8d56dSmrg
24323a8d56dSmrg     ./configure CC="cc -nodtk"
24423a8d56dSmrg
245da4a0041Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246da4a0041Smrgdirectory contains several dysfunctional programs; working variants of
247da4a0041Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248da4a0041Smrgin your `PATH', put it _after_ `/usr/bin'.
249da4a0041Smrg
250da4a0041Smrg   On Haiku, software installed for all users goes in `/boot/common',
251da4a0041Smrgnot `/usr/local'.  It is recommended to use the following options:
252da4a0041Smrg
253da4a0041Smrg     ./configure --prefix=/boot/common
254da4a0041Smrg
25523a8d56dSmrgSpecifying the System Type
25623a8d56dSmrg==========================
25723a8d56dSmrg
25823a8d56dSmrg   There may be some features `configure' cannot figure out
25923a8d56dSmrgautomatically, but needs to determine by the type of machine the package
26023a8d56dSmrgwill run on.  Usually, assuming the package is built to be run on the
26123a8d56dSmrg_same_ architectures, `configure' can figure that out, but if it prints
26223a8d56dSmrga message saying it cannot guess the machine type, give it the
26323a8d56dSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
26423a8d56dSmrgtype, such as `sun4', or a canonical name which has the form:
26523a8d56dSmrg
26623a8d56dSmrg     CPU-COMPANY-SYSTEM
26723a8d56dSmrg
26823a8d56dSmrgwhere SYSTEM can have one of these forms:
26923a8d56dSmrg
270da4a0041Smrg     OS
271da4a0041Smrg     KERNEL-OS
27223a8d56dSmrg
27323a8d56dSmrg   See the file `config.sub' for the possible values of each field.  If
27423a8d56dSmrg`config.sub' isn't included in this package, then this package doesn't
27523a8d56dSmrgneed to know the machine type.
27623a8d56dSmrg
27723a8d56dSmrg   If you are _building_ compiler tools for cross-compiling, you should
27823a8d56dSmrguse the option `--target=TYPE' to select the type of system they will
27923a8d56dSmrgproduce code for.
28023a8d56dSmrg
28123a8d56dSmrg   If you want to _use_ a cross compiler, that generates code for a
28223a8d56dSmrgplatform different from the build platform, you should specify the
28323a8d56dSmrg"host" platform (i.e., that on which the generated programs will
28423a8d56dSmrgeventually be run) with `--host=TYPE'.
28523a8d56dSmrg
28623a8d56dSmrgSharing Defaults
28723a8d56dSmrg================
28823a8d56dSmrg
28923a8d56dSmrg   If you want to set default values for `configure' scripts to share,
29023a8d56dSmrgyou can create a site shell script called `config.site' that gives
29123a8d56dSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
29223a8d56dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29323a8d56dSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29423a8d56dSmrg`CONFIG_SITE' environment variable to the location of the site script.
29523a8d56dSmrgA warning: not all `configure' scripts look for a site script.
29623a8d56dSmrg
29723a8d56dSmrgDefining Variables
29823a8d56dSmrg==================
29923a8d56dSmrg
30023a8d56dSmrg   Variables not defined in a site shell script can be set in the
30123a8d56dSmrgenvironment passed to `configure'.  However, some packages may run
30223a8d56dSmrgconfigure again during the build, and the customized values of these
30323a8d56dSmrgvariables may be lost.  In order to avoid this problem, you should set
30423a8d56dSmrgthem in the `configure' command line, using `VAR=value'.  For example:
30523a8d56dSmrg
30623a8d56dSmrg     ./configure CC=/usr/local2/bin/gcc
30723a8d56dSmrg
30823a8d56dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
30923a8d56dSmrgoverridden in the site shell script).
31023a8d56dSmrg
31123a8d56dSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31223a8d56dSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31323a8d56dSmrg
31423a8d56dSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31523a8d56dSmrg
31623a8d56dSmrg`configure' Invocation
31723a8d56dSmrg======================
31823a8d56dSmrg
31923a8d56dSmrg   `configure' recognizes the following options to control how it
32023a8d56dSmrgoperates.
32123a8d56dSmrg
32223a8d56dSmrg`--help'
32323a8d56dSmrg`-h'
32423a8d56dSmrg     Print a summary of all of the options to `configure', and exit.
32523a8d56dSmrg
32623a8d56dSmrg`--help=short'
32723a8d56dSmrg`--help=recursive'
32823a8d56dSmrg     Print a summary of the options unique to this package's
32923a8d56dSmrg     `configure', and exit.  The `short' variant lists options used
33023a8d56dSmrg     only in the top level, while the `recursive' variant lists options
33123a8d56dSmrg     also present in any nested packages.
33223a8d56dSmrg
33323a8d56dSmrg`--version'
33423a8d56dSmrg`-V'
33523a8d56dSmrg     Print the version of Autoconf used to generate the `configure'
33623a8d56dSmrg     script, and exit.
33723a8d56dSmrg
33823a8d56dSmrg`--cache-file=FILE'
33923a8d56dSmrg     Enable the cache: use and save the results of the tests in FILE,
34023a8d56dSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34123a8d56dSmrg     disable caching.
34223a8d56dSmrg
34323a8d56dSmrg`--config-cache'
34423a8d56dSmrg`-C'
34523a8d56dSmrg     Alias for `--cache-file=config.cache'.
34623a8d56dSmrg
34723a8d56dSmrg`--quiet'
34823a8d56dSmrg`--silent'
34923a8d56dSmrg`-q'
35023a8d56dSmrg     Do not print messages saying which checks are being made.  To
35123a8d56dSmrg     suppress all normal output, redirect it to `/dev/null' (any error
35223a8d56dSmrg     messages will still be shown).
35323a8d56dSmrg
35423a8d56dSmrg`--srcdir=DIR'
35523a8d56dSmrg     Look for the package's source code in directory DIR.  Usually
35623a8d56dSmrg     `configure' can determine that directory automatically.
35723a8d56dSmrg
35823a8d56dSmrg`--prefix=DIR'
359da4a0041Smrg     Use DIR as the installation prefix.  *note Installation Names::
36023a8d56dSmrg     for more details, including other options available for fine-tuning
36123a8d56dSmrg     the installation locations.
36223a8d56dSmrg
36323a8d56dSmrg`--no-create'
36423a8d56dSmrg`-n'
36523a8d56dSmrg     Run the configure checks, but stop before creating any output
36623a8d56dSmrg     files.
36723a8d56dSmrg
36823a8d56dSmrg`configure' also accepts some other, not widely useful, options.  Run
36923a8d56dSmrg`configure --help' for more details.
37023a8d56dSmrg
371