10ed7c580SmrgInstallation Instructions
20ed7c580Smrg*************************
30ed7c580Smrg
40ed7c580SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
50ed7c580SmrgInc.
60ed7c580Smrg
70ed7c580Smrg   Copying and distribution of this file, with or without modification,
80ed7c580Smrgare permitted in any medium without royalty provided the copyright
90ed7c580Smrgnotice and this notice are preserved.  This file is offered as-is,
100ed7c580Smrgwithout warranty of any kind.
110ed7c580Smrg
120ed7c580SmrgBasic Installation
130ed7c580Smrg==================
140ed7c580Smrg
150ed7c580Smrg   Briefly, the shell commands `./configure; make; make install' should
160ed7c580Smrgconfigure, build, and install this package.  The following
170ed7c580Smrgmore-detailed instructions are generic; see the `README' file for
180ed7c580Smrginstructions specific to this package.  Some packages provide this
190ed7c580Smrg`INSTALL' file but do not implement all of the features documented
200ed7c580Smrgbelow.  The lack of an optional feature in a given package is not
210ed7c580Smrgnecessarily a bug.  More recommendations for GNU packages can be found
220ed7c580Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
230ed7c580Smrg
240ed7c580Smrg   The `configure' shell script attempts to guess correct values for
250ed7c580Smrgvarious system-dependent variables used during compilation.  It uses
260ed7c580Smrgthose values to create a `Makefile' in each directory of the package.
270ed7c580SmrgIt may also create one or more `.h' files containing system-dependent
280ed7c580Smrgdefinitions.  Finally, it creates a shell script `config.status' that
290ed7c580Smrgyou can run in the future to recreate the current configuration, and a
300ed7c580Smrgfile `config.log' containing compiler output (useful mainly for
310ed7c580Smrgdebugging `configure').
320ed7c580Smrg
330ed7c580Smrg   It can also use an optional file (typically called `config.cache'
340ed7c580Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
350ed7c580Smrgthe results of its tests to speed up reconfiguring.  Caching is
360ed7c580Smrgdisabled by default to prevent problems with accidental use of stale
370ed7c580Smrgcache files.
380ed7c580Smrg
390ed7c580Smrg   If you need to do unusual things to compile the package, please try
400ed7c580Smrgto figure out how `configure' could check whether to do them, and mail
410ed7c580Smrgdiffs or instructions to the address given in the `README' so they can
420ed7c580Smrgbe considered for the next release.  If you are using the cache, and at
430ed7c580Smrgsome point `config.cache' contains results you don't want to keep, you
440ed7c580Smrgmay remove or edit it.
450ed7c580Smrg
460ed7c580Smrg   The file `configure.ac' (or `configure.in') is used to create
470ed7c580Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
480ed7c580Smrgyou want to change it or regenerate `configure' using a newer version
490ed7c580Smrgof `autoconf'.
500ed7c580Smrg
510ed7c580Smrg   The simplest way to compile this package is:
520ed7c580Smrg
530ed7c580Smrg  1. `cd' to the directory containing the package's source code and type
540ed7c580Smrg     `./configure' to configure the package for your system.
550ed7c580Smrg
560ed7c580Smrg     Running `configure' might take a while.  While running, it prints
570ed7c580Smrg     some messages telling which features it is checking for.
580ed7c580Smrg
590ed7c580Smrg  2. Type `make' to compile the package.
600ed7c580Smrg
610ed7c580Smrg  3. Optionally, type `make check' to run any self-tests that come with
620ed7c580Smrg     the package, generally using the just-built uninstalled binaries.
630ed7c580Smrg
640ed7c580Smrg  4. Type `make install' to install the programs and any data files and
650ed7c580Smrg     documentation.  When installing into a prefix owned by root, it is
660ed7c580Smrg     recommended that the package be configured and built as a regular
670ed7c580Smrg     user, and only the `make install' phase executed with root
680ed7c580Smrg     privileges.
690ed7c580Smrg
700ed7c580Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
710ed7c580Smrg     this time using the binaries in their final installed location.
720ed7c580Smrg     This target does not install anything.  Running this target as a
730ed7c580Smrg     regular user, particularly if the prior `make install' required
740ed7c580Smrg     root privileges, verifies that the installation completed
750ed7c580Smrg     correctly.
760ed7c580Smrg
770ed7c580Smrg  6. You can remove the program binaries and object files from the
780ed7c580Smrg     source code directory by typing `make clean'.  To also remove the
790ed7c580Smrg     files that `configure' created (so you can compile the package for
800ed7c580Smrg     a different kind of computer), type `make distclean'.  There is
810ed7c580Smrg     also a `make maintainer-clean' target, but that is intended mainly
820ed7c580Smrg     for the package's developers.  If you use it, you may have to get
830ed7c580Smrg     all sorts of other programs in order to regenerate files that came
840ed7c580Smrg     with the distribution.
850ed7c580Smrg
860ed7c580Smrg  7. Often, you can also type `make uninstall' to remove the installed
870ed7c580Smrg     files again.  In practice, not all packages have tested that
880ed7c580Smrg     uninstallation works correctly, even though it is required by the
890ed7c580Smrg     GNU Coding Standards.
900ed7c580Smrg
910ed7c580Smrg  8. Some packages, particularly those that use Automake, provide `make
920ed7c580Smrg     distcheck', which can by used by developers to test that all other
930ed7c580Smrg     targets like `make install' and `make uninstall' work correctly.
940ed7c580Smrg     This target is generally not run by end users.
950ed7c580Smrg
960ed7c580SmrgCompilers and Options
970ed7c580Smrg=====================
980ed7c580Smrg
990ed7c580Smrg   Some systems require unusual options for compilation or linking that
1000ed7c580Smrgthe `configure' script does not know about.  Run `./configure --help'
1010ed7c580Smrgfor details on some of the pertinent environment variables.
1020ed7c580Smrg
1030ed7c580Smrg   You can give `configure' initial values for configuration parameters
1040ed7c580Smrgby setting variables in the command line or in the environment.  Here
1050ed7c580Smrgis an example:
1060ed7c580Smrg
1070ed7c580Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1080ed7c580Smrg
1090ed7c580Smrg   *Note Defining Variables::, for more details.
1100ed7c580Smrg
1110ed7c580SmrgCompiling For Multiple Architectures
1120ed7c580Smrg====================================
1130ed7c580Smrg
1140ed7c580Smrg   You can compile the package for more than one kind of computer at the
1150ed7c580Smrgsame time, by placing the object files for each architecture in their
1160ed7c580Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1170ed7c580Smrgdirectory where you want the object files and executables to go and run
1180ed7c580Smrgthe `configure' script.  `configure' automatically checks for the
1190ed7c580Smrgsource code in the directory that `configure' is in and in `..'.  This
1200ed7c580Smrgis known as a "VPATH" build.
1210ed7c580Smrg
1220ed7c580Smrg   With a non-GNU `make', it is safer to compile the package for one
1230ed7c580Smrgarchitecture at a time in the source code directory.  After you have
1240ed7c580Smrginstalled the package for one architecture, use `make distclean' before
1250ed7c580Smrgreconfiguring for another architecture.
1260ed7c580Smrg
1270ed7c580Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1280ed7c580Smrgexecutables that work on multiple system types--known as "fat" or
1290ed7c580Smrg"universal" binaries--by specifying multiple `-arch' options to the
1300ed7c580Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1310ed7c580Smrgthis:
1320ed7c580Smrg
1330ed7c580Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1340ed7c580Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1350ed7c580Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1360ed7c580Smrg
1370ed7c580Smrg   This is not guaranteed to produce working output in all cases, you
1380ed7c580Smrgmay have to build one architecture at a time and combine the results
1390ed7c580Smrgusing the `lipo' tool if you have problems.
1400ed7c580Smrg
1410ed7c580SmrgInstallation Names
1420ed7c580Smrg==================
1430ed7c580Smrg
1440ed7c580Smrg   By default, `make install' installs the package's commands under
1450ed7c580Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1460ed7c580Smrgcan specify an installation prefix other than `/usr/local' by giving
1470ed7c580Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1480ed7c580Smrgabsolute file name.
1490ed7c580Smrg
1500ed7c580Smrg   You can specify separate installation prefixes for
1510ed7c580Smrgarchitecture-specific files and architecture-independent files.  If you
1520ed7c580Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1530ed7c580SmrgPREFIX as the prefix for installing programs and libraries.
1540ed7c580SmrgDocumentation and other data files still use the regular prefix.
1550ed7c580Smrg
1560ed7c580Smrg   In addition, if you use an unusual directory layout you can give
1570ed7c580Smrgoptions like `--bindir=DIR' to specify different values for particular
1580ed7c580Smrgkinds of files.  Run `configure --help' for a list of the directories
1590ed7c580Smrgyou can set and what kinds of files go in them.  In general, the
1600ed7c580Smrgdefault for these options is expressed in terms of `${prefix}', so that
1610ed7c580Smrgspecifying just `--prefix' will affect all of the other directory
1620ed7c580Smrgspecifications that were not explicitly provided.
1630ed7c580Smrg
1640ed7c580Smrg   The most portable way to affect installation locations is to pass the
1650ed7c580Smrgcorrect locations to `configure'; however, many packages provide one or
1660ed7c580Smrgboth of the following shortcuts of passing variable assignments to the
1670ed7c580Smrg`make install' command line to change installation locations without
1680ed7c580Smrghaving to reconfigure or recompile.
1690ed7c580Smrg
1700ed7c580Smrg   The first method involves providing an override variable for each
1710ed7c580Smrgaffected directory.  For example, `make install
1720ed7c580Smrgprefix=/alternate/directory' will choose an alternate location for all
1730ed7c580Smrgdirectory configuration variables that were expressed in terms of
1740ed7c580Smrg`${prefix}'.  Any directories that were specified during `configure',
1750ed7c580Smrgbut not in terms of `${prefix}', must each be overridden at install
1760ed7c580Smrgtime for the entire installation to be relocated.  The approach of
1770ed7c580Smrgmakefile variable overrides for each directory variable is required by
1780ed7c580Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1790ed7c580SmrgHowever, some platforms have known limitations with the semantics of
1800ed7c580Smrgshared libraries that end up requiring recompilation when using this
1810ed7c580Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1820ed7c580Smrg
1830ed7c580Smrg   The second method involves providing the `DESTDIR' variable.  For
1840ed7c580Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1850ed7c580Smrg`/alternate/directory' before all installation names.  The approach of
1860ed7c580Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1870ed7c580Smrgdoes not work on platforms that have drive letters.  On the other hand,
1880ed7c580Smrgit does better at avoiding recompilation issues, and works well even
1890ed7c580Smrgwhen some directory options were not specified in terms of `${prefix}'
1900ed7c580Smrgat `configure' time.
1910ed7c580Smrg
1920ed7c580SmrgOptional Features
1930ed7c580Smrg=================
1940ed7c580Smrg
1950ed7c580Smrg   If the package supports it, you can cause programs to be installed
1960ed7c580Smrgwith an extra prefix or suffix on their names by giving `configure' the
1970ed7c580Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1980ed7c580Smrg
1990ed7c580Smrg   Some packages pay attention to `--enable-FEATURE' options to
2000ed7c580Smrg`configure', where FEATURE indicates an optional part of the package.
2010ed7c580SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2020ed7c580Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2030ed7c580Smrg`README' should mention any `--enable-' and `--with-' options that the
2040ed7c580Smrgpackage recognizes.
2050ed7c580Smrg
2060ed7c580Smrg   For packages that use the X Window System, `configure' can usually
2070ed7c580Smrgfind the X include and library files automatically, but if it doesn't,
2080ed7c580Smrgyou can use the `configure' options `--x-includes=DIR' and
2090ed7c580Smrg`--x-libraries=DIR' to specify their locations.
2100ed7c580Smrg
2110ed7c580Smrg   Some packages offer the ability to configure how verbose the
2120ed7c580Smrgexecution of `make' will be.  For these packages, running `./configure
2130ed7c580Smrg--enable-silent-rules' sets the default to minimal output, which can be
2140ed7c580Smrgoverridden with `make V=1'; while running `./configure
2150ed7c580Smrg--disable-silent-rules' sets the default to verbose, which can be
2160ed7c580Smrgoverridden with `make V=0'.
2170ed7c580Smrg
2180ed7c580SmrgParticular systems
2190ed7c580Smrg==================
2200ed7c580Smrg
2210ed7c580Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2220ed7c580SmrgCC is not installed, it is recommended to use the following options in
2230ed7c580Smrgorder to use an ANSI C compiler:
2240ed7c580Smrg
2250ed7c580Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2260ed7c580Smrg
2270ed7c580Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2280ed7c580Smrg
2290ed7c580Smrg   HP-UX `make' updates targets which have the same time stamps as
2300ed7c580Smrgtheir prerequisites, which makes it generally unusable when shipped
2310ed7c580Smrggenerated files such as `configure' are involved.  Use GNU `make'
2320ed7c580Smrginstead.
2330ed7c580Smrg
2340ed7c580Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2350ed7c580Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2360ed7c580Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2370ed7c580Smrgto try
2380ed7c580Smrg
2390ed7c580Smrg     ./configure CC="cc"
2400ed7c580Smrg
2410ed7c580Smrgand if that doesn't work, try
2420ed7c580Smrg
2430ed7c580Smrg     ./configure CC="cc -nodtk"
2440ed7c580Smrg
2450ed7c580Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2460ed7c580Smrgdirectory contains several dysfunctional programs; working variants of
2470ed7c580Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2480ed7c580Smrgin your `PATH', put it _after_ `/usr/bin'.
2490ed7c580Smrg
2500ed7c580Smrg   On Haiku, software installed for all users goes in `/boot/common',
2510ed7c580Smrgnot `/usr/local'.  It is recommended to use the following options:
2520ed7c580Smrg
2530ed7c580Smrg     ./configure --prefix=/boot/common
2540ed7c580Smrg
2550ed7c580SmrgSpecifying the System Type
2560ed7c580Smrg==========================
2570ed7c580Smrg
2580ed7c580Smrg   There may be some features `configure' cannot figure out
2590ed7c580Smrgautomatically, but needs to determine by the type of machine the package
2600ed7c580Smrgwill run on.  Usually, assuming the package is built to be run on the
2610ed7c580Smrg_same_ architectures, `configure' can figure that out, but if it prints
2620ed7c580Smrga message saying it cannot guess the machine type, give it the
2630ed7c580Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2640ed7c580Smrgtype, such as `sun4', or a canonical name which has the form:
2650ed7c580Smrg
2660ed7c580Smrg     CPU-COMPANY-SYSTEM
2670ed7c580Smrg
2680ed7c580Smrgwhere SYSTEM can have one of these forms:
2690ed7c580Smrg
2700ed7c580Smrg     OS
2710ed7c580Smrg     KERNEL-OS
2720ed7c580Smrg
2730ed7c580Smrg   See the file `config.sub' for the possible values of each field.  If
2740ed7c580Smrg`config.sub' isn't included in this package, then this package doesn't
2750ed7c580Smrgneed to know the machine type.
2760ed7c580Smrg
2770ed7c580Smrg   If you are _building_ compiler tools for cross-compiling, you should
2780ed7c580Smrguse the option `--target=TYPE' to select the type of system they will
2790ed7c580Smrgproduce code for.
2800ed7c580Smrg
2810ed7c580Smrg   If you want to _use_ a cross compiler, that generates code for a
2820ed7c580Smrgplatform different from the build platform, you should specify the
2830ed7c580Smrg"host" platform (i.e., that on which the generated programs will
2840ed7c580Smrgeventually be run) with `--host=TYPE'.
2850ed7c580Smrg
2860ed7c580SmrgSharing Defaults
2870ed7c580Smrg================
2880ed7c580Smrg
2890ed7c580Smrg   If you want to set default values for `configure' scripts to share,
2900ed7c580Smrgyou can create a site shell script called `config.site' that gives
2910ed7c580Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2920ed7c580Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2930ed7c580Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2940ed7c580Smrg`CONFIG_SITE' environment variable to the location of the site script.
2950ed7c580SmrgA warning: not all `configure' scripts look for a site script.
2960ed7c580Smrg
2970ed7c580SmrgDefining Variables
2980ed7c580Smrg==================
2990ed7c580Smrg
3000ed7c580Smrg   Variables not defined in a site shell script can be set in the
3010ed7c580Smrgenvironment passed to `configure'.  However, some packages may run
3020ed7c580Smrgconfigure again during the build, and the customized values of these
3030ed7c580Smrgvariables may be lost.  In order to avoid this problem, you should set
3040ed7c580Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3050ed7c580Smrg
3060ed7c580Smrg     ./configure CC=/usr/local2/bin/gcc
3070ed7c580Smrg
3080ed7c580Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3090ed7c580Smrgoverridden in the site shell script).
3100ed7c580Smrg
3110ed7c580SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3120ed7c580Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3130ed7c580Smrg
3140ed7c580Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3150ed7c580Smrg
3160ed7c580Smrg`configure' Invocation
3170ed7c580Smrg======================
3180ed7c580Smrg
3190ed7c580Smrg   `configure' recognizes the following options to control how it
3200ed7c580Smrgoperates.
3210ed7c580Smrg
3220ed7c580Smrg`--help'
3230ed7c580Smrg`-h'
3240ed7c580Smrg     Print a summary of all of the options to `configure', and exit.
3250ed7c580Smrg
3260ed7c580Smrg`--help=short'
3270ed7c580Smrg`--help=recursive'
3280ed7c580Smrg     Print a summary of the options unique to this package's
3290ed7c580Smrg     `configure', and exit.  The `short' variant lists options used
3300ed7c580Smrg     only in the top level, while the `recursive' variant lists options
3310ed7c580Smrg     also present in any nested packages.
3320ed7c580Smrg
3330ed7c580Smrg`--version'
3340ed7c580Smrg`-V'
3350ed7c580Smrg     Print the version of Autoconf used to generate the `configure'
3360ed7c580Smrg     script, and exit.
3370ed7c580Smrg
3380ed7c580Smrg`--cache-file=FILE'
3390ed7c580Smrg     Enable the cache: use and save the results of the tests in FILE,
3400ed7c580Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3410ed7c580Smrg     disable caching.
3420ed7c580Smrg
3430ed7c580Smrg`--config-cache'
3440ed7c580Smrg`-C'
3450ed7c580Smrg     Alias for `--cache-file=config.cache'.
3460ed7c580Smrg
3470ed7c580Smrg`--quiet'
3480ed7c580Smrg`--silent'
3490ed7c580Smrg`-q'
3500ed7c580Smrg     Do not print messages saying which checks are being made.  To
3510ed7c580Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3520ed7c580Smrg     messages will still be shown).
3530ed7c580Smrg
3540ed7c580Smrg`--srcdir=DIR'
3550ed7c580Smrg     Look for the package's source code in directory DIR.  Usually
3560ed7c580Smrg     `configure' can determine that directory automatically.
3570ed7c580Smrg
3580ed7c580Smrg`--prefix=DIR'
3590ed7c580Smrg     Use DIR as the installation prefix.  *note Installation Names::
3600ed7c580Smrg     for more details, including other options available for fine-tuning
3610ed7c580Smrg     the installation locations.
3620ed7c580Smrg
3630ed7c580Smrg`--no-create'
3640ed7c580Smrg`-n'
3650ed7c580Smrg     Run the configure checks, but stop before creating any output
3660ed7c580Smrg     files.
3670ed7c580Smrg
3680ed7c580Smrg`configure' also accepts some other, not widely useful, options.  Run
3690ed7c580Smrg`configure --help' for more details.
3700ed7c580Smrg
371