127702724SmrgInstallation Instructions
227702724Smrg*************************
327702724Smrg
47cea3689SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
57cea3689SmrgInc.
627702724Smrg
77cea3689Smrg   Copying and distribution of this file, with or without modification,
87cea3689Smrgare permitted in any medium without royalty provided the copyright
97cea3689Smrgnotice and this notice are preserved.  This file is offered as-is,
107cea3689Smrgwithout warranty of any kind.
1127702724Smrg
1227702724SmrgBasic Installation
1327702724Smrg==================
1427702724Smrg
1500084f2cSmrg   Briefly, the shell commands `./configure; make; make install' should
1600084f2cSmrgconfigure, build, and install this package.  The following
1700084f2cSmrgmore-detailed instructions are generic; see the `README' file for
187cea3689Smrginstructions specific to this package.  Some packages provide this
197cea3689Smrg`INSTALL' file but do not implement all of the features documented
207cea3689Smrgbelow.  The lack of an optional feature in a given package is not
217cea3689Smrgnecessarily a bug.  More recommendations for GNU packages can be found
227cea3689Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
2327702724Smrg
2427702724Smrg   The `configure' shell script attempts to guess correct values for
2527702724Smrgvarious system-dependent variables used during compilation.  It uses
2627702724Smrgthose values to create a `Makefile' in each directory of the package.
2727702724SmrgIt may also create one or more `.h' files containing system-dependent
2827702724Smrgdefinitions.  Finally, it creates a shell script `config.status' that
2927702724Smrgyou can run in the future to recreate the current configuration, and a
3027702724Smrgfile `config.log' containing compiler output (useful mainly for
3127702724Smrgdebugging `configure').
3227702724Smrg
3327702724Smrg   It can also use an optional file (typically called `config.cache'
3427702724Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
3500084f2cSmrgthe results of its tests to speed up reconfiguring.  Caching is
3627702724Smrgdisabled by default to prevent problems with accidental use of stale
3700084f2cSmrgcache files.
3827702724Smrg
3927702724Smrg   If you need to do unusual things to compile the package, please try
4027702724Smrgto figure out how `configure' could check whether to do them, and mail
4127702724Smrgdiffs or instructions to the address given in the `README' so they can
4227702724Smrgbe considered for the next release.  If you are using the cache, and at
4327702724Smrgsome point `config.cache' contains results you don't want to keep, you
4427702724Smrgmay remove or edit it.
4527702724Smrg
4627702724Smrg   The file `configure.ac' (or `configure.in') is used to create
4700084f2cSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
4800084f2cSmrgyou want to change it or regenerate `configure' using a newer version
4900084f2cSmrgof `autoconf'.
5027702724Smrg
517cea3689Smrg   The simplest way to compile this package is:
5227702724Smrg
5327702724Smrg  1. `cd' to the directory containing the package's source code and type
5400084f2cSmrg     `./configure' to configure the package for your system.
5527702724Smrg
5600084f2cSmrg     Running `configure' might take a while.  While running, it prints
5700084f2cSmrg     some messages telling which features it is checking for.
5827702724Smrg
5927702724Smrg  2. Type `make' to compile the package.
6027702724Smrg
6127702724Smrg  3. Optionally, type `make check' to run any self-tests that come with
627cea3689Smrg     the package, generally using the just-built uninstalled binaries.
6327702724Smrg
6427702724Smrg  4. Type `make install' to install the programs and any data files and
657cea3689Smrg     documentation.  When installing into a prefix owned by root, it is
667cea3689Smrg     recommended that the package be configured and built as a regular
677cea3689Smrg     user, and only the `make install' phase executed with root
687cea3689Smrg     privileges.
697cea3689Smrg
707cea3689Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
717cea3689Smrg     this time using the binaries in their final installed location.
727cea3689Smrg     This target does not install anything.  Running this target as a
737cea3689Smrg     regular user, particularly if the prior `make install' required
747cea3689Smrg     root privileges, verifies that the installation completed
757cea3689Smrg     correctly.
767cea3689Smrg
777cea3689Smrg  6. You can remove the program binaries and object files from the
7827702724Smrg     source code directory by typing `make clean'.  To also remove the
7927702724Smrg     files that `configure' created (so you can compile the package for
8027702724Smrg     a different kind of computer), type `make distclean'.  There is
8127702724Smrg     also a `make maintainer-clean' target, but that is intended mainly
8227702724Smrg     for the package's developers.  If you use it, you may have to get
8327702724Smrg     all sorts of other programs in order to regenerate files that came
8427702724Smrg     with the distribution.
8527702724Smrg
867cea3689Smrg  7. Often, you can also type `make uninstall' to remove the installed
877cea3689Smrg     files again.  In practice, not all packages have tested that
887cea3689Smrg     uninstallation works correctly, even though it is required by the
897cea3689Smrg     GNU Coding Standards.
907cea3689Smrg
917cea3689Smrg  8. Some packages, particularly those that use Automake, provide `make
927cea3689Smrg     distcheck', which can by used by developers to test that all other
937cea3689Smrg     targets like `make install' and `make uninstall' work correctly.
947cea3689Smrg     This target is generally not run by end users.
9500084f2cSmrg
9627702724SmrgCompilers and Options
9727702724Smrg=====================
9827702724Smrg
9900084f2cSmrg   Some systems require unusual options for compilation or linking that
10000084f2cSmrgthe `configure' script does not know about.  Run `./configure --help'
10100084f2cSmrgfor details on some of the pertinent environment variables.
10227702724Smrg
10327702724Smrg   You can give `configure' initial values for configuration parameters
10427702724Smrgby setting variables in the command line or in the environment.  Here
10527702724Smrgis an example:
10627702724Smrg
10700084f2cSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
10827702724Smrg
10927702724Smrg   *Note Defining Variables::, for more details.
11027702724Smrg
11127702724SmrgCompiling For Multiple Architectures
11227702724Smrg====================================
11327702724Smrg
11400084f2cSmrg   You can compile the package for more than one kind of computer at the
11527702724Smrgsame time, by placing the object files for each architecture in their
11600084f2cSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
11727702724Smrgdirectory where you want the object files and executables to go and run
11827702724Smrgthe `configure' script.  `configure' automatically checks for the
1197cea3689Smrgsource code in the directory that `configure' is in and in `..'.  This
1207cea3689Smrgis known as a "VPATH" build.
12127702724Smrg
12200084f2cSmrg   With a non-GNU `make', it is safer to compile the package for one
12300084f2cSmrgarchitecture at a time in the source code directory.  After you have
12400084f2cSmrginstalled the package for one architecture, use `make distclean' before
12500084f2cSmrgreconfiguring for another architecture.
12600084f2cSmrg
12700084f2cSmrg   On MacOS X 10.5 and later systems, you can create libraries and
12800084f2cSmrgexecutables that work on multiple system types--known as "fat" or
12900084f2cSmrg"universal" binaries--by specifying multiple `-arch' options to the
13000084f2cSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
13100084f2cSmrgthis:
13200084f2cSmrg
13300084f2cSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13400084f2cSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
13500084f2cSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
13600084f2cSmrg
13700084f2cSmrg   This is not guaranteed to produce working output in all cases, you
13800084f2cSmrgmay have to build one architecture at a time and combine the results
13900084f2cSmrgusing the `lipo' tool if you have problems.
14027702724Smrg
14127702724SmrgInstallation Names
14227702724Smrg==================
14327702724Smrg
14400084f2cSmrg   By default, `make install' installs the package's commands under
14500084f2cSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
14600084f2cSmrgcan specify an installation prefix other than `/usr/local' by giving
1477cea3689Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1487cea3689Smrgabsolute file name.
14927702724Smrg
15027702724Smrg   You can specify separate installation prefixes for
15127702724Smrgarchitecture-specific files and architecture-independent files.  If you
15200084f2cSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
15300084f2cSmrgPREFIX as the prefix for installing programs and libraries.
15400084f2cSmrgDocumentation and other data files still use the regular prefix.
15527702724Smrg
15627702724Smrg   In addition, if you use an unusual directory layout you can give
15727702724Smrgoptions like `--bindir=DIR' to specify different values for particular
15827702724Smrgkinds of files.  Run `configure --help' for a list of the directories
1597cea3689Smrgyou can set and what kinds of files go in them.  In general, the
1607cea3689Smrgdefault for these options is expressed in terms of `${prefix}', so that
1617cea3689Smrgspecifying just `--prefix' will affect all of the other directory
1627cea3689Smrgspecifications that were not explicitly provided.
1637cea3689Smrg
1647cea3689Smrg   The most portable way to affect installation locations is to pass the
1657cea3689Smrgcorrect locations to `configure'; however, many packages provide one or
1667cea3689Smrgboth of the following shortcuts of passing variable assignments to the
1677cea3689Smrg`make install' command line to change installation locations without
1687cea3689Smrghaving to reconfigure or recompile.
1697cea3689Smrg
1707cea3689Smrg   The first method involves providing an override variable for each
1717cea3689Smrgaffected directory.  For example, `make install
1727cea3689Smrgprefix=/alternate/directory' will choose an alternate location for all
1737cea3689Smrgdirectory configuration variables that were expressed in terms of
1747cea3689Smrg`${prefix}'.  Any directories that were specified during `configure',
1757cea3689Smrgbut not in terms of `${prefix}', must each be overridden at install
1767cea3689Smrgtime for the entire installation to be relocated.  The approach of
1777cea3689Smrgmakefile variable overrides for each directory variable is required by
1787cea3689Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1797cea3689SmrgHowever, some platforms have known limitations with the semantics of
1807cea3689Smrgshared libraries that end up requiring recompilation when using this
1817cea3689Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1827cea3689Smrg
1837cea3689Smrg   The second method involves providing the `DESTDIR' variable.  For
1847cea3689Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1857cea3689Smrg`/alternate/directory' before all installation names.  The approach of
1867cea3689Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1877cea3689Smrgdoes not work on platforms that have drive letters.  On the other hand,
1887cea3689Smrgit does better at avoiding recompilation issues, and works well even
1897cea3689Smrgwhen some directory options were not specified in terms of `${prefix}'
1907cea3689Smrgat `configure' time.
1917cea3689Smrg
1927cea3689SmrgOptional Features
1937cea3689Smrg=================
19427702724Smrg
19527702724Smrg   If the package supports it, you can cause programs to be installed
19627702724Smrgwith an extra prefix or suffix on their names by giving `configure' the
19727702724Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
19827702724Smrg
19900084f2cSmrg   Some packages pay attention to `--enable-FEATURE' options to
20027702724Smrg`configure', where FEATURE indicates an optional part of the package.
20127702724SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
20227702724Smrgis something like `gnu-as' or `x' (for the X Window System).  The
20327702724Smrg`README' should mention any `--enable-' and `--with-' options that the
20427702724Smrgpackage recognizes.
20527702724Smrg
20627702724Smrg   For packages that use the X Window System, `configure' can usually
20727702724Smrgfind the X include and library files automatically, but if it doesn't,
20827702724Smrgyou can use the `configure' options `--x-includes=DIR' and
20927702724Smrg`--x-libraries=DIR' to specify their locations.
21027702724Smrg
2117cea3689Smrg   Some packages offer the ability to configure how verbose the
2127cea3689Smrgexecution of `make' will be.  For these packages, running `./configure
2137cea3689Smrg--enable-silent-rules' sets the default to minimal output, which can be
2147cea3689Smrgoverridden with `make V=1'; while running `./configure
2157cea3689Smrg--disable-silent-rules' sets the default to verbose, which can be
2167cea3689Smrgoverridden with `make V=0'.
2177cea3689Smrg
21800084f2cSmrgParticular systems
21900084f2cSmrg==================
22000084f2cSmrg
22100084f2cSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
22200084f2cSmrgCC is not installed, it is recommended to use the following options in
22300084f2cSmrgorder to use an ANSI C compiler:
22400084f2cSmrg
2257cea3689Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
22600084f2cSmrg
22700084f2cSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
22800084f2cSmrg
2297cea3689Smrg   HP-UX `make' updates targets which have the same time stamps as
2307cea3689Smrgtheir prerequisites, which makes it generally unusable when shipped
2317cea3689Smrggenerated files such as `configure' are involved.  Use GNU `make'
2327cea3689Smrginstead.
2337cea3689Smrg
23400084f2cSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
23500084f2cSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
23600084f2cSmrga workaround.  If GNU CC is not installed, it is therefore recommended
23700084f2cSmrgto try
23800084f2cSmrg
23900084f2cSmrg     ./configure CC="cc"
24000084f2cSmrg
24100084f2cSmrgand if that doesn't work, try
24200084f2cSmrg
24300084f2cSmrg     ./configure CC="cc -nodtk"
24400084f2cSmrg
2457cea3689Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2467cea3689Smrgdirectory contains several dysfunctional programs; working variants of
2477cea3689Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2487cea3689Smrgin your `PATH', put it _after_ `/usr/bin'.
2497cea3689Smrg
2507cea3689Smrg   On Haiku, software installed for all users goes in `/boot/common',
2517cea3689Smrgnot `/usr/local'.  It is recommended to use the following options:
2527cea3689Smrg
2537cea3689Smrg     ./configure --prefix=/boot/common
2547cea3689Smrg
25527702724SmrgSpecifying the System Type
25627702724Smrg==========================
25727702724Smrg
25800084f2cSmrg   There may be some features `configure' cannot figure out
25900084f2cSmrgautomatically, but needs to determine by the type of machine the package
26000084f2cSmrgwill run on.  Usually, assuming the package is built to be run on the
26100084f2cSmrg_same_ architectures, `configure' can figure that out, but if it prints
26200084f2cSmrga message saying it cannot guess the machine type, give it the
26327702724Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
26427702724Smrgtype, such as `sun4', or a canonical name which has the form:
26527702724Smrg
26627702724Smrg     CPU-COMPANY-SYSTEM
26727702724Smrg
26827702724Smrgwhere SYSTEM can have one of these forms:
26927702724Smrg
2707cea3689Smrg     OS
2717cea3689Smrg     KERNEL-OS
27227702724Smrg
27327702724Smrg   See the file `config.sub' for the possible values of each field.  If
27427702724Smrg`config.sub' isn't included in this package, then this package doesn't
27527702724Smrgneed to know the machine type.
27627702724Smrg
27727702724Smrg   If you are _building_ compiler tools for cross-compiling, you should
27800084f2cSmrguse the option `--target=TYPE' to select the type of system they will
27927702724Smrgproduce code for.
28027702724Smrg
28127702724Smrg   If you want to _use_ a cross compiler, that generates code for a
28227702724Smrgplatform different from the build platform, you should specify the
28327702724Smrg"host" platform (i.e., that on which the generated programs will
28427702724Smrgeventually be run) with `--host=TYPE'.
28527702724Smrg
28627702724SmrgSharing Defaults
28727702724Smrg================
28827702724Smrg
28900084f2cSmrg   If you want to set default values for `configure' scripts to share,
29000084f2cSmrgyou can create a site shell script called `config.site' that gives
29100084f2cSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
29227702724Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
29327702724Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
29427702724Smrg`CONFIG_SITE' environment variable to the location of the site script.
29527702724SmrgA warning: not all `configure' scripts look for a site script.
29627702724Smrg
29727702724SmrgDefining Variables
29827702724Smrg==================
29927702724Smrg
30000084f2cSmrg   Variables not defined in a site shell script can be set in the
30127702724Smrgenvironment passed to `configure'.  However, some packages may run
30227702724Smrgconfigure again during the build, and the customized values of these
30327702724Smrgvariables may be lost.  In order to avoid this problem, you should set
30427702724Smrgthem in the `configure' command line, using `VAR=value'.  For example:
30527702724Smrg
30627702724Smrg     ./configure CC=/usr/local2/bin/gcc
30727702724Smrg
30827702724Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
30900084f2cSmrgoverridden in the site shell script).
31027702724Smrg
31100084f2cSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
31200084f2cSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
31327702724Smrg
31400084f2cSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
31527702724Smrg
31627702724Smrg`configure' Invocation
31727702724Smrg======================
31827702724Smrg
31900084f2cSmrg   `configure' recognizes the following options to control how it
32000084f2cSmrgoperates.
32127702724Smrg
32227702724Smrg`--help'
32327702724Smrg`-h'
32400084f2cSmrg     Print a summary of all of the options to `configure', and exit.
32500084f2cSmrg
32600084f2cSmrg`--help=short'
32700084f2cSmrg`--help=recursive'
32800084f2cSmrg     Print a summary of the options unique to this package's
32900084f2cSmrg     `configure', and exit.  The `short' variant lists options used
33000084f2cSmrg     only in the top level, while the `recursive' variant lists options
33100084f2cSmrg     also present in any nested packages.
33227702724Smrg
33327702724Smrg`--version'
33427702724Smrg`-V'
33527702724Smrg     Print the version of Autoconf used to generate the `configure'
33627702724Smrg     script, and exit.
33727702724Smrg
33827702724Smrg`--cache-file=FILE'
33927702724Smrg     Enable the cache: use and save the results of the tests in FILE,
34027702724Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
34127702724Smrg     disable caching.
34227702724Smrg
34327702724Smrg`--config-cache'
34427702724Smrg`-C'
34527702724Smrg     Alias for `--cache-file=config.cache'.
34627702724Smrg
34727702724Smrg`--quiet'
34827702724Smrg`--silent'
34927702724Smrg`-q'
35027702724Smrg     Do not print messages saying which checks are being made.  To
35127702724Smrg     suppress all normal output, redirect it to `/dev/null' (any error
35227702724Smrg     messages will still be shown).
35327702724Smrg
35427702724Smrg`--srcdir=DIR'
35527702724Smrg     Look for the package's source code in directory DIR.  Usually
35627702724Smrg     `configure' can determine that directory automatically.
35727702724Smrg
35800084f2cSmrg`--prefix=DIR'
3597cea3689Smrg     Use DIR as the installation prefix.  *note Installation Names::
36000084f2cSmrg     for more details, including other options available for fine-tuning
36100084f2cSmrg     the installation locations.
36200084f2cSmrg
36300084f2cSmrg`--no-create'
36400084f2cSmrg`-n'
36500084f2cSmrg     Run the configure checks, but stop before creating any output
36600084f2cSmrg     files.
36700084f2cSmrg
36827702724Smrg`configure' also accepts some other, not widely useful, options.  Run
36927702724Smrg`configure --help' for more details.
37027702724Smrg
371