16ef05171SmrgInstallation Instructions
26ef05171Smrg*************************
36ef05171Smrg
46ef05171SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
56ef05171SmrgInc.
66ef05171Smrg
76ef05171Smrg   Copying and distribution of this file, with or without modification,
86ef05171Smrgare permitted in any medium without royalty provided the copyright
96ef05171Smrgnotice and this notice are preserved.  This file is offered as-is,
106ef05171Smrgwithout warranty of any kind.
116ef05171Smrg
126ef05171SmrgBasic Installation
136ef05171Smrg==================
146ef05171Smrg
156ef05171Smrg   Briefly, the shell commands `./configure; make; make install' should
166ef05171Smrgconfigure, build, and install this package.  The following
176ef05171Smrgmore-detailed instructions are generic; see the `README' file for
186ef05171Smrginstructions specific to this package.  Some packages provide this
196ef05171Smrg`INSTALL' file but do not implement all of the features documented
206ef05171Smrgbelow.  The lack of an optional feature in a given package is not
216ef05171Smrgnecessarily a bug.  More recommendations for GNU packages can be found
226ef05171Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
236ef05171Smrg
246ef05171Smrg   The `configure' shell script attempts to guess correct values for
256ef05171Smrgvarious system-dependent variables used during compilation.  It uses
266ef05171Smrgthose values to create a `Makefile' in each directory of the package.
276ef05171SmrgIt may also create one or more `.h' files containing system-dependent
286ef05171Smrgdefinitions.  Finally, it creates a shell script `config.status' that
296ef05171Smrgyou can run in the future to recreate the current configuration, and a
306ef05171Smrgfile `config.log' containing compiler output (useful mainly for
316ef05171Smrgdebugging `configure').
326ef05171Smrg
336ef05171Smrg   It can also use an optional file (typically called `config.cache'
346ef05171Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
356ef05171Smrgthe results of its tests to speed up reconfiguring.  Caching is
366ef05171Smrgdisabled by default to prevent problems with accidental use of stale
376ef05171Smrgcache files.
386ef05171Smrg
396ef05171Smrg   If you need to do unusual things to compile the package, please try
406ef05171Smrgto figure out how `configure' could check whether to do them, and mail
416ef05171Smrgdiffs or instructions to the address given in the `README' so they can
426ef05171Smrgbe considered for the next release.  If you are using the cache, and at
436ef05171Smrgsome point `config.cache' contains results you don't want to keep, you
446ef05171Smrgmay remove or edit it.
456ef05171Smrg
466ef05171Smrg   The file `configure.ac' (or `configure.in') is used to create
476ef05171Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
486ef05171Smrgyou want to change it or regenerate `configure' using a newer version
496ef05171Smrgof `autoconf'.
506ef05171Smrg
516ef05171Smrg   The simplest way to compile this package is:
526ef05171Smrg
536ef05171Smrg  1. `cd' to the directory containing the package's source code and type
546ef05171Smrg     `./configure' to configure the package for your system.
556ef05171Smrg
566ef05171Smrg     Running `configure' might take a while.  While running, it prints
576ef05171Smrg     some messages telling which features it is checking for.
586ef05171Smrg
596ef05171Smrg  2. Type `make' to compile the package.
606ef05171Smrg
616ef05171Smrg  3. Optionally, type `make check' to run any self-tests that come with
626ef05171Smrg     the package, generally using the just-built uninstalled binaries.
636ef05171Smrg
646ef05171Smrg  4. Type `make install' to install the programs and any data files and
656ef05171Smrg     documentation.  When installing into a prefix owned by root, it is
666ef05171Smrg     recommended that the package be configured and built as a regular
676ef05171Smrg     user, and only the `make install' phase executed with root
686ef05171Smrg     privileges.
696ef05171Smrg
706ef05171Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
716ef05171Smrg     this time using the binaries in their final installed location.
726ef05171Smrg     This target does not install anything.  Running this target as a
736ef05171Smrg     regular user, particularly if the prior `make install' required
746ef05171Smrg     root privileges, verifies that the installation completed
756ef05171Smrg     correctly.
766ef05171Smrg
776ef05171Smrg  6. You can remove the program binaries and object files from the
786ef05171Smrg     source code directory by typing `make clean'.  To also remove the
796ef05171Smrg     files that `configure' created (so you can compile the package for
806ef05171Smrg     a different kind of computer), type `make distclean'.  There is
816ef05171Smrg     also a `make maintainer-clean' target, but that is intended mainly
826ef05171Smrg     for the package's developers.  If you use it, you may have to get
836ef05171Smrg     all sorts of other programs in order to regenerate files that came
846ef05171Smrg     with the distribution.
856ef05171Smrg
866ef05171Smrg  7. Often, you can also type `make uninstall' to remove the installed
876ef05171Smrg     files again.  In practice, not all packages have tested that
886ef05171Smrg     uninstallation works correctly, even though it is required by the
896ef05171Smrg     GNU Coding Standards.
906ef05171Smrg
916ef05171Smrg  8. Some packages, particularly those that use Automake, provide `make
926ef05171Smrg     distcheck', which can by used by developers to test that all other
936ef05171Smrg     targets like `make install' and `make uninstall' work correctly.
946ef05171Smrg     This target is generally not run by end users.
956ef05171Smrg
966ef05171SmrgCompilers and Options
976ef05171Smrg=====================
986ef05171Smrg
996ef05171Smrg   Some systems require unusual options for compilation or linking that
1006ef05171Smrgthe `configure' script does not know about.  Run `./configure --help'
1016ef05171Smrgfor details on some of the pertinent environment variables.
1026ef05171Smrg
1036ef05171Smrg   You can give `configure' initial values for configuration parameters
1046ef05171Smrgby setting variables in the command line or in the environment.  Here
1056ef05171Smrgis an example:
1066ef05171Smrg
1076ef05171Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1086ef05171Smrg
1096ef05171Smrg   *Note Defining Variables::, for more details.
1106ef05171Smrg
1116ef05171SmrgCompiling For Multiple Architectures
1126ef05171Smrg====================================
1136ef05171Smrg
1146ef05171Smrg   You can compile the package for more than one kind of computer at the
1156ef05171Smrgsame time, by placing the object files for each architecture in their
1166ef05171Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1176ef05171Smrgdirectory where you want the object files and executables to go and run
1186ef05171Smrgthe `configure' script.  `configure' automatically checks for the
1196ef05171Smrgsource code in the directory that `configure' is in and in `..'.  This
1206ef05171Smrgis known as a "VPATH" build.
1216ef05171Smrg
1226ef05171Smrg   With a non-GNU `make', it is safer to compile the package for one
1236ef05171Smrgarchitecture at a time in the source code directory.  After you have
1246ef05171Smrginstalled the package for one architecture, use `make distclean' before
1256ef05171Smrgreconfiguring for another architecture.
1266ef05171Smrg
1276ef05171Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1286ef05171Smrgexecutables that work on multiple system types--known as "fat" or
1296ef05171Smrg"universal" binaries--by specifying multiple `-arch' options to the
1306ef05171Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1316ef05171Smrgthis:
1326ef05171Smrg
1336ef05171Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1346ef05171Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1356ef05171Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1366ef05171Smrg
1376ef05171Smrg   This is not guaranteed to produce working output in all cases, you
1386ef05171Smrgmay have to build one architecture at a time and combine the results
1396ef05171Smrgusing the `lipo' tool if you have problems.
1406ef05171Smrg
1416ef05171SmrgInstallation Names
1426ef05171Smrg==================
1436ef05171Smrg
1446ef05171Smrg   By default, `make install' installs the package's commands under
1456ef05171Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1466ef05171Smrgcan specify an installation prefix other than `/usr/local' by giving
1476ef05171Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1486ef05171Smrgabsolute file name.
1496ef05171Smrg
1506ef05171Smrg   You can specify separate installation prefixes for
1516ef05171Smrgarchitecture-specific files and architecture-independent files.  If you
1526ef05171Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1536ef05171SmrgPREFIX as the prefix for installing programs and libraries.
1546ef05171SmrgDocumentation and other data files still use the regular prefix.
1556ef05171Smrg
1566ef05171Smrg   In addition, if you use an unusual directory layout you can give
1576ef05171Smrgoptions like `--bindir=DIR' to specify different values for particular
1586ef05171Smrgkinds of files.  Run `configure --help' for a list of the directories
1596ef05171Smrgyou can set and what kinds of files go in them.  In general, the
1606ef05171Smrgdefault for these options is expressed in terms of `${prefix}', so that
1616ef05171Smrgspecifying just `--prefix' will affect all of the other directory
1626ef05171Smrgspecifications that were not explicitly provided.
1636ef05171Smrg
1646ef05171Smrg   The most portable way to affect installation locations is to pass the
1656ef05171Smrgcorrect locations to `configure'; however, many packages provide one or
1666ef05171Smrgboth of the following shortcuts of passing variable assignments to the
1676ef05171Smrg`make install' command line to change installation locations without
1686ef05171Smrghaving to reconfigure or recompile.
1696ef05171Smrg
1706ef05171Smrg   The first method involves providing an override variable for each
1716ef05171Smrgaffected directory.  For example, `make install
1726ef05171Smrgprefix=/alternate/directory' will choose an alternate location for all
1736ef05171Smrgdirectory configuration variables that were expressed in terms of
1746ef05171Smrg`${prefix}'.  Any directories that were specified during `configure',
1756ef05171Smrgbut not in terms of `${prefix}', must each be overridden at install
1766ef05171Smrgtime for the entire installation to be relocated.  The approach of
1776ef05171Smrgmakefile variable overrides for each directory variable is required by
1786ef05171Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1796ef05171SmrgHowever, some platforms have known limitations with the semantics of
1806ef05171Smrgshared libraries that end up requiring recompilation when using this
1816ef05171Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1826ef05171Smrg
1836ef05171Smrg   The second method involves providing the `DESTDIR' variable.  For
1846ef05171Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1856ef05171Smrg`/alternate/directory' before all installation names.  The approach of
1866ef05171Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1876ef05171Smrgdoes not work on platforms that have drive letters.  On the other hand,
1886ef05171Smrgit does better at avoiding recompilation issues, and works well even
1896ef05171Smrgwhen some directory options were not specified in terms of `${prefix}'
1906ef05171Smrgat `configure' time.
1916ef05171Smrg
1926ef05171SmrgOptional Features
1936ef05171Smrg=================
1946ef05171Smrg
1956ef05171Smrg   If the package supports it, you can cause programs to be installed
1966ef05171Smrgwith an extra prefix or suffix on their names by giving `configure' the
1976ef05171Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1986ef05171Smrg
1996ef05171Smrg   Some packages pay attention to `--enable-FEATURE' options to
2006ef05171Smrg`configure', where FEATURE indicates an optional part of the package.
2016ef05171SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2026ef05171Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2036ef05171Smrg`README' should mention any `--enable-' and `--with-' options that the
2046ef05171Smrgpackage recognizes.
2056ef05171Smrg
2066ef05171Smrg   For packages that use the X Window System, `configure' can usually
2076ef05171Smrgfind the X include and library files automatically, but if it doesn't,
2086ef05171Smrgyou can use the `configure' options `--x-includes=DIR' and
2096ef05171Smrg`--x-libraries=DIR' to specify their locations.
2106ef05171Smrg
2116ef05171Smrg   Some packages offer the ability to configure how verbose the
2126ef05171Smrgexecution of `make' will be.  For these packages, running `./configure
2136ef05171Smrg--enable-silent-rules' sets the default to minimal output, which can be
2146ef05171Smrgoverridden with `make V=1'; while running `./configure
2156ef05171Smrg--disable-silent-rules' sets the default to verbose, which can be
2166ef05171Smrgoverridden with `make V=0'.
2176ef05171Smrg
2186ef05171SmrgParticular systems
2196ef05171Smrg==================
2206ef05171Smrg
2216ef05171Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2226ef05171SmrgCC is not installed, it is recommended to use the following options in
2236ef05171Smrgorder to use an ANSI C compiler:
2246ef05171Smrg
2256ef05171Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2266ef05171Smrg
2276ef05171Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2286ef05171Smrg
2296ef05171Smrg   HP-UX `make' updates targets which have the same time stamps as
2306ef05171Smrgtheir prerequisites, which makes it generally unusable when shipped
2316ef05171Smrggenerated files such as `configure' are involved.  Use GNU `make'
2326ef05171Smrginstead.
2336ef05171Smrg
2346ef05171Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2356ef05171Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2366ef05171Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2376ef05171Smrgto try
2386ef05171Smrg
2396ef05171Smrg     ./configure CC="cc"
2406ef05171Smrg
2416ef05171Smrgand if that doesn't work, try
2426ef05171Smrg
2436ef05171Smrg     ./configure CC="cc -nodtk"
2446ef05171Smrg
2456ef05171Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2466ef05171Smrgdirectory contains several dysfunctional programs; working variants of
2476ef05171Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2486ef05171Smrgin your `PATH', put it _after_ `/usr/bin'.
2496ef05171Smrg
2506ef05171Smrg   On Haiku, software installed for all users goes in `/boot/common',
2516ef05171Smrgnot `/usr/local'.  It is recommended to use the following options:
2526ef05171Smrg
2536ef05171Smrg     ./configure --prefix=/boot/common
2546ef05171Smrg
2556ef05171SmrgSpecifying the System Type
2566ef05171Smrg==========================
2576ef05171Smrg
2586ef05171Smrg   There may be some features `configure' cannot figure out
2596ef05171Smrgautomatically, but needs to determine by the type of machine the package
2606ef05171Smrgwill run on.  Usually, assuming the package is built to be run on the
2616ef05171Smrg_same_ architectures, `configure' can figure that out, but if it prints
2626ef05171Smrga message saying it cannot guess the machine type, give it the
2636ef05171Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2646ef05171Smrgtype, such as `sun4', or a canonical name which has the form:
2656ef05171Smrg
2666ef05171Smrg     CPU-COMPANY-SYSTEM
2676ef05171Smrg
2686ef05171Smrgwhere SYSTEM can have one of these forms:
2696ef05171Smrg
2706ef05171Smrg     OS
2716ef05171Smrg     KERNEL-OS
2726ef05171Smrg
2736ef05171Smrg   See the file `config.sub' for the possible values of each field.  If
2746ef05171Smrg`config.sub' isn't included in this package, then this package doesn't
2756ef05171Smrgneed to know the machine type.
2766ef05171Smrg
2776ef05171Smrg   If you are _building_ compiler tools for cross-compiling, you should
2786ef05171Smrguse the option `--target=TYPE' to select the type of system they will
2796ef05171Smrgproduce code for.
2806ef05171Smrg
2816ef05171Smrg   If you want to _use_ a cross compiler, that generates code for a
2826ef05171Smrgplatform different from the build platform, you should specify the
2836ef05171Smrg"host" platform (i.e., that on which the generated programs will
2846ef05171Smrgeventually be run) with `--host=TYPE'.
2856ef05171Smrg
2866ef05171SmrgSharing Defaults
2876ef05171Smrg================
2886ef05171Smrg
2896ef05171Smrg   If you want to set default values for `configure' scripts to share,
2906ef05171Smrgyou can create a site shell script called `config.site' that gives
2916ef05171Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2926ef05171Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2936ef05171Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2946ef05171Smrg`CONFIG_SITE' environment variable to the location of the site script.
2956ef05171SmrgA warning: not all `configure' scripts look for a site script.
2966ef05171Smrg
2976ef05171SmrgDefining Variables
2986ef05171Smrg==================
2996ef05171Smrg
3006ef05171Smrg   Variables not defined in a site shell script can be set in the
3016ef05171Smrgenvironment passed to `configure'.  However, some packages may run
3026ef05171Smrgconfigure again during the build, and the customized values of these
3036ef05171Smrgvariables may be lost.  In order to avoid this problem, you should set
3046ef05171Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3056ef05171Smrg
3066ef05171Smrg     ./configure CC=/usr/local2/bin/gcc
3076ef05171Smrg
3086ef05171Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3096ef05171Smrgoverridden in the site shell script).
3106ef05171Smrg
3116ef05171SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3126ef05171Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3136ef05171Smrg
3146ef05171Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3156ef05171Smrg
3166ef05171Smrg`configure' Invocation
3176ef05171Smrg======================
3186ef05171Smrg
3196ef05171Smrg   `configure' recognizes the following options to control how it
3206ef05171Smrgoperates.
3216ef05171Smrg
3226ef05171Smrg`--help'
3236ef05171Smrg`-h'
3246ef05171Smrg     Print a summary of all of the options to `configure', and exit.
3256ef05171Smrg
3266ef05171Smrg`--help=short'
3276ef05171Smrg`--help=recursive'
3286ef05171Smrg     Print a summary of the options unique to this package's
3296ef05171Smrg     `configure', and exit.  The `short' variant lists options used
3306ef05171Smrg     only in the top level, while the `recursive' variant lists options
3316ef05171Smrg     also present in any nested packages.
3326ef05171Smrg
3336ef05171Smrg`--version'
3346ef05171Smrg`-V'
3356ef05171Smrg     Print the version of Autoconf used to generate the `configure'
3366ef05171Smrg     script, and exit.
3376ef05171Smrg
3386ef05171Smrg`--cache-file=FILE'
3396ef05171Smrg     Enable the cache: use and save the results of the tests in FILE,
3406ef05171Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3416ef05171Smrg     disable caching.
3426ef05171Smrg
3436ef05171Smrg`--config-cache'
3446ef05171Smrg`-C'
3456ef05171Smrg     Alias for `--cache-file=config.cache'.
3466ef05171Smrg
3476ef05171Smrg`--quiet'
3486ef05171Smrg`--silent'
3496ef05171Smrg`-q'
3506ef05171Smrg     Do not print messages saying which checks are being made.  To
3516ef05171Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3526ef05171Smrg     messages will still be shown).
3536ef05171Smrg
3546ef05171Smrg`--srcdir=DIR'
3556ef05171Smrg     Look for the package's source code in directory DIR.  Usually
3566ef05171Smrg     `configure' can determine that directory automatically.
3576ef05171Smrg
3586ef05171Smrg`--prefix=DIR'
3596ef05171Smrg     Use DIR as the installation prefix.  *note Installation Names::
3606ef05171Smrg     for more details, including other options available for fine-tuning
3616ef05171Smrg     the installation locations.
3626ef05171Smrg
3636ef05171Smrg`--no-create'
3646ef05171Smrg`-n'
3656ef05171Smrg     Run the configure checks, but stop before creating any output
3666ef05171Smrg     files.
3676ef05171Smrg
3686ef05171Smrg`configure' also accepts some other, not widely useful, options.  Run
3696ef05171Smrg`configure --help' for more details.
3706ef05171Smrg
371