19e0146f7SmrgInstallation Instructions
29e0146f7Smrg*************************
39e0146f7Smrg
4b78bb896SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5b78bb896SmrgInc.
69e0146f7Smrg
7b78bb896Smrg   Copying and distribution of this file, with or without modification,
8b78bb896Smrgare permitted in any medium without royalty provided the copyright
9b78bb896Smrgnotice and this notice are preserved.  This file is offered as-is,
10b78bb896Smrgwithout warranty of any kind.
119e0146f7Smrg
129e0146f7SmrgBasic Installation
139e0146f7Smrg==================
149e0146f7Smrg
159e0146f7Smrg   Briefly, the shell commands `./configure; make; make install' should
169e0146f7Smrgconfigure, build, and install this package.  The following
179e0146f7Smrgmore-detailed instructions are generic; see the `README' file for
18b78bb896Smrginstructions specific to this package.  Some packages provide this
19b78bb896Smrg`INSTALL' file but do not implement all of the features documented
20b78bb896Smrgbelow.  The lack of an optional feature in a given package is not
21b78bb896Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22b78bb896Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
239e0146f7Smrg
249e0146f7Smrg   The `configure' shell script attempts to guess correct values for
259e0146f7Smrgvarious system-dependent variables used during compilation.  It uses
269e0146f7Smrgthose values to create a `Makefile' in each directory of the package.
279e0146f7SmrgIt may also create one or more `.h' files containing system-dependent
289e0146f7Smrgdefinitions.  Finally, it creates a shell script `config.status' that
299e0146f7Smrgyou can run in the future to recreate the current configuration, and a
309e0146f7Smrgfile `config.log' containing compiler output (useful mainly for
319e0146f7Smrgdebugging `configure').
329e0146f7Smrg
339e0146f7Smrg   It can also use an optional file (typically called `config.cache'
349e0146f7Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
359e0146f7Smrgthe results of its tests to speed up reconfiguring.  Caching is
369e0146f7Smrgdisabled by default to prevent problems with accidental use of stale
379e0146f7Smrgcache files.
389e0146f7Smrg
399e0146f7Smrg   If you need to do unusual things to compile the package, please try
409e0146f7Smrgto figure out how `configure' could check whether to do them, and mail
419e0146f7Smrgdiffs or instructions to the address given in the `README' so they can
429e0146f7Smrgbe considered for the next release.  If you are using the cache, and at
439e0146f7Smrgsome point `config.cache' contains results you don't want to keep, you
449e0146f7Smrgmay remove or edit it.
459e0146f7Smrg
469e0146f7Smrg   The file `configure.ac' (or `configure.in') is used to create
479e0146f7Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
489e0146f7Smrgyou want to change it or regenerate `configure' using a newer version
499e0146f7Smrgof `autoconf'.
509e0146f7Smrg
51b78bb896Smrg   The simplest way to compile this package is:
529e0146f7Smrg
539e0146f7Smrg  1. `cd' to the directory containing the package's source code and type
549e0146f7Smrg     `./configure' to configure the package for your system.
559e0146f7Smrg
569e0146f7Smrg     Running `configure' might take a while.  While running, it prints
579e0146f7Smrg     some messages telling which features it is checking for.
589e0146f7Smrg
599e0146f7Smrg  2. Type `make' to compile the package.
609e0146f7Smrg
619e0146f7Smrg  3. Optionally, type `make check' to run any self-tests that come with
62b78bb896Smrg     the package, generally using the just-built uninstalled binaries.
639e0146f7Smrg
649e0146f7Smrg  4. Type `make install' to install the programs and any data files and
65b78bb896Smrg     documentation.  When installing into a prefix owned by root, it is
66b78bb896Smrg     recommended that the package be configured and built as a regular
67b78bb896Smrg     user, and only the `make install' phase executed with root
68b78bb896Smrg     privileges.
69b78bb896Smrg
70b78bb896Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71b78bb896Smrg     this time using the binaries in their final installed location.
72b78bb896Smrg     This target does not install anything.  Running this target as a
73b78bb896Smrg     regular user, particularly if the prior `make install' required
74b78bb896Smrg     root privileges, verifies that the installation completed
75b78bb896Smrg     correctly.
76b78bb896Smrg
77b78bb896Smrg  6. You can remove the program binaries and object files from the
789e0146f7Smrg     source code directory by typing `make clean'.  To also remove the
799e0146f7Smrg     files that `configure' created (so you can compile the package for
809e0146f7Smrg     a different kind of computer), type `make distclean'.  There is
819e0146f7Smrg     also a `make maintainer-clean' target, but that is intended mainly
829e0146f7Smrg     for the package's developers.  If you use it, you may have to get
839e0146f7Smrg     all sorts of other programs in order to regenerate files that came
849e0146f7Smrg     with the distribution.
859e0146f7Smrg
86b78bb896Smrg  7. Often, you can also type `make uninstall' to remove the installed
87b78bb896Smrg     files again.  In practice, not all packages have tested that
88b78bb896Smrg     uninstallation works correctly, even though it is required by the
89b78bb896Smrg     GNU Coding Standards.
90b78bb896Smrg
91b78bb896Smrg  8. Some packages, particularly those that use Automake, provide `make
92b78bb896Smrg     distcheck', which can by used by developers to test that all other
93b78bb896Smrg     targets like `make install' and `make uninstall' work correctly.
94b78bb896Smrg     This target is generally not run by end users.
959e0146f7Smrg
969e0146f7SmrgCompilers and Options
979e0146f7Smrg=====================
989e0146f7Smrg
999e0146f7Smrg   Some systems require unusual options for compilation or linking that
1009e0146f7Smrgthe `configure' script does not know about.  Run `./configure --help'
1019e0146f7Smrgfor details on some of the pertinent environment variables.
1029e0146f7Smrg
1039e0146f7Smrg   You can give `configure' initial values for configuration parameters
1049e0146f7Smrgby setting variables in the command line or in the environment.  Here
1059e0146f7Smrgis an example:
1069e0146f7Smrg
1079e0146f7Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1089e0146f7Smrg
1099e0146f7Smrg   *Note Defining Variables::, for more details.
1109e0146f7Smrg
1119e0146f7SmrgCompiling For Multiple Architectures
1129e0146f7Smrg====================================
1139e0146f7Smrg
1149e0146f7Smrg   You can compile the package for more than one kind of computer at the
1159e0146f7Smrgsame time, by placing the object files for each architecture in their
1169e0146f7Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1179e0146f7Smrgdirectory where you want the object files and executables to go and run
1189e0146f7Smrgthe `configure' script.  `configure' automatically checks for the
119b78bb896Smrgsource code in the directory that `configure' is in and in `..'.  This
120b78bb896Smrgis known as a "VPATH" build.
1219e0146f7Smrg
1229e0146f7Smrg   With a non-GNU `make', it is safer to compile the package for one
1239e0146f7Smrgarchitecture at a time in the source code directory.  After you have
1249e0146f7Smrginstalled the package for one architecture, use `make distclean' before
1259e0146f7Smrgreconfiguring for another architecture.
1269e0146f7Smrg
1279e0146f7Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1289e0146f7Smrgexecutables that work on multiple system types--known as "fat" or
1299e0146f7Smrg"universal" binaries--by specifying multiple `-arch' options to the
1309e0146f7Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1319e0146f7Smrgthis:
1329e0146f7Smrg
1339e0146f7Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1349e0146f7Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1359e0146f7Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1369e0146f7Smrg
1379e0146f7Smrg   This is not guaranteed to produce working output in all cases, you
1389e0146f7Smrgmay have to build one architecture at a time and combine the results
1399e0146f7Smrgusing the `lipo' tool if you have problems.
1409e0146f7Smrg
1419e0146f7SmrgInstallation Names
1429e0146f7Smrg==================
1439e0146f7Smrg
1449e0146f7Smrg   By default, `make install' installs the package's commands under
1459e0146f7Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1469e0146f7Smrgcan specify an installation prefix other than `/usr/local' by giving
147b78bb896Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148b78bb896Smrgabsolute file name.
1499e0146f7Smrg
1509e0146f7Smrg   You can specify separate installation prefixes for
1519e0146f7Smrgarchitecture-specific files and architecture-independent files.  If you
1529e0146f7Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1539e0146f7SmrgPREFIX as the prefix for installing programs and libraries.
1549e0146f7SmrgDocumentation and other data files still use the regular prefix.
1559e0146f7Smrg
1569e0146f7Smrg   In addition, if you use an unusual directory layout you can give
1579e0146f7Smrgoptions like `--bindir=DIR' to specify different values for particular
1589e0146f7Smrgkinds of files.  Run `configure --help' for a list of the directories
159b78bb896Smrgyou can set and what kinds of files go in them.  In general, the
160b78bb896Smrgdefault for these options is expressed in terms of `${prefix}', so that
161b78bb896Smrgspecifying just `--prefix' will affect all of the other directory
162b78bb896Smrgspecifications that were not explicitly provided.
163b78bb896Smrg
164b78bb896Smrg   The most portable way to affect installation locations is to pass the
165b78bb896Smrgcorrect locations to `configure'; however, many packages provide one or
166b78bb896Smrgboth of the following shortcuts of passing variable assignments to the
167b78bb896Smrg`make install' command line to change installation locations without
168b78bb896Smrghaving to reconfigure or recompile.
169b78bb896Smrg
170b78bb896Smrg   The first method involves providing an override variable for each
171b78bb896Smrgaffected directory.  For example, `make install
172b78bb896Smrgprefix=/alternate/directory' will choose an alternate location for all
173b78bb896Smrgdirectory configuration variables that were expressed in terms of
174b78bb896Smrg`${prefix}'.  Any directories that were specified during `configure',
175b78bb896Smrgbut not in terms of `${prefix}', must each be overridden at install
176b78bb896Smrgtime for the entire installation to be relocated.  The approach of
177b78bb896Smrgmakefile variable overrides for each directory variable is required by
178b78bb896Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179b78bb896SmrgHowever, some platforms have known limitations with the semantics of
180b78bb896Smrgshared libraries that end up requiring recompilation when using this
181b78bb896Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182b78bb896Smrg
183b78bb896Smrg   The second method involves providing the `DESTDIR' variable.  For
184b78bb896Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185b78bb896Smrg`/alternate/directory' before all installation names.  The approach of
186b78bb896Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187b78bb896Smrgdoes not work on platforms that have drive letters.  On the other hand,
188b78bb896Smrgit does better at avoiding recompilation issues, and works well even
189b78bb896Smrgwhen some directory options were not specified in terms of `${prefix}'
190b78bb896Smrgat `configure' time.
191b78bb896Smrg
192b78bb896SmrgOptional Features
193b78bb896Smrg=================
1949e0146f7Smrg
1959e0146f7Smrg   If the package supports it, you can cause programs to be installed
1969e0146f7Smrgwith an extra prefix or suffix on their names by giving `configure' the
1979e0146f7Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1989e0146f7Smrg
1999e0146f7Smrg   Some packages pay attention to `--enable-FEATURE' options to
2009e0146f7Smrg`configure', where FEATURE indicates an optional part of the package.
2019e0146f7SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2029e0146f7Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2039e0146f7Smrg`README' should mention any `--enable-' and `--with-' options that the
2049e0146f7Smrgpackage recognizes.
2059e0146f7Smrg
2069e0146f7Smrg   For packages that use the X Window System, `configure' can usually
2079e0146f7Smrgfind the X include and library files automatically, but if it doesn't,
2089e0146f7Smrgyou can use the `configure' options `--x-includes=DIR' and
2099e0146f7Smrg`--x-libraries=DIR' to specify their locations.
2109e0146f7Smrg
211b78bb896Smrg   Some packages offer the ability to configure how verbose the
212b78bb896Smrgexecution of `make' will be.  For these packages, running `./configure
213b78bb896Smrg--enable-silent-rules' sets the default to minimal output, which can be
214b78bb896Smrgoverridden with `make V=1'; while running `./configure
215b78bb896Smrg--disable-silent-rules' sets the default to verbose, which can be
216b78bb896Smrgoverridden with `make V=0'.
217b78bb896Smrg
2189e0146f7SmrgParticular systems
2199e0146f7Smrg==================
2209e0146f7Smrg
2219e0146f7Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2229e0146f7SmrgCC is not installed, it is recommended to use the following options in
2239e0146f7Smrgorder to use an ANSI C compiler:
2249e0146f7Smrg
225b78bb896Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2269e0146f7Smrg
2279e0146f7Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2289e0146f7Smrg
229b78bb896Smrg   HP-UX `make' updates targets which have the same time stamps as
230b78bb896Smrgtheir prerequisites, which makes it generally unusable when shipped
231b78bb896Smrggenerated files such as `configure' are involved.  Use GNU `make'
232b78bb896Smrginstead.
233b78bb896Smrg
2349e0146f7Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2359e0146f7Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2369e0146f7Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2379e0146f7Smrgto try
2389e0146f7Smrg
2399e0146f7Smrg     ./configure CC="cc"
2409e0146f7Smrg
2419e0146f7Smrgand if that doesn't work, try
2429e0146f7Smrg
2439e0146f7Smrg     ./configure CC="cc -nodtk"
2449e0146f7Smrg
245b78bb896Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246b78bb896Smrgdirectory contains several dysfunctional programs; working variants of
247b78bb896Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248b78bb896Smrgin your `PATH', put it _after_ `/usr/bin'.
249b78bb896Smrg
250b78bb896Smrg   On Haiku, software installed for all users goes in `/boot/common',
251b78bb896Smrgnot `/usr/local'.  It is recommended to use the following options:
252b78bb896Smrg
253b78bb896Smrg     ./configure --prefix=/boot/common
254b78bb896Smrg
2559e0146f7SmrgSpecifying the System Type
2569e0146f7Smrg==========================
2579e0146f7Smrg
2589e0146f7Smrg   There may be some features `configure' cannot figure out
2599e0146f7Smrgautomatically, but needs to determine by the type of machine the package
2609e0146f7Smrgwill run on.  Usually, assuming the package is built to be run on the
2619e0146f7Smrg_same_ architectures, `configure' can figure that out, but if it prints
2629e0146f7Smrga message saying it cannot guess the machine type, give it the
2639e0146f7Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2649e0146f7Smrgtype, such as `sun4', or a canonical name which has the form:
2659e0146f7Smrg
2669e0146f7Smrg     CPU-COMPANY-SYSTEM
2679e0146f7Smrg
2689e0146f7Smrgwhere SYSTEM can have one of these forms:
2699e0146f7Smrg
270b78bb896Smrg     OS
271b78bb896Smrg     KERNEL-OS
2729e0146f7Smrg
2739e0146f7Smrg   See the file `config.sub' for the possible values of each field.  If
2749e0146f7Smrg`config.sub' isn't included in this package, then this package doesn't
2759e0146f7Smrgneed to know the machine type.
2769e0146f7Smrg
2779e0146f7Smrg   If you are _building_ compiler tools for cross-compiling, you should
2789e0146f7Smrguse the option `--target=TYPE' to select the type of system they will
2799e0146f7Smrgproduce code for.
2809e0146f7Smrg
2819e0146f7Smrg   If you want to _use_ a cross compiler, that generates code for a
2829e0146f7Smrgplatform different from the build platform, you should specify the
2839e0146f7Smrg"host" platform (i.e., that on which the generated programs will
2849e0146f7Smrgeventually be run) with `--host=TYPE'.
2859e0146f7Smrg
2869e0146f7SmrgSharing Defaults
2879e0146f7Smrg================
2889e0146f7Smrg
2899e0146f7Smrg   If you want to set default values for `configure' scripts to share,
2909e0146f7Smrgyou can create a site shell script called `config.site' that gives
2919e0146f7Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2929e0146f7Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2939e0146f7Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2949e0146f7Smrg`CONFIG_SITE' environment variable to the location of the site script.
2959e0146f7SmrgA warning: not all `configure' scripts look for a site script.
2969e0146f7Smrg
2979e0146f7SmrgDefining Variables
2989e0146f7Smrg==================
2999e0146f7Smrg
3009e0146f7Smrg   Variables not defined in a site shell script can be set in the
3019e0146f7Smrgenvironment passed to `configure'.  However, some packages may run
3029e0146f7Smrgconfigure again during the build, and the customized values of these
3039e0146f7Smrgvariables may be lost.  In order to avoid this problem, you should set
3049e0146f7Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3059e0146f7Smrg
3069e0146f7Smrg     ./configure CC=/usr/local2/bin/gcc
3079e0146f7Smrg
3089e0146f7Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3099e0146f7Smrgoverridden in the site shell script).
3109e0146f7Smrg
3119e0146f7SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3129e0146f7Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3139e0146f7Smrg
3149e0146f7Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3159e0146f7Smrg
3169e0146f7Smrg`configure' Invocation
3179e0146f7Smrg======================
3189e0146f7Smrg
3199e0146f7Smrg   `configure' recognizes the following options to control how it
3209e0146f7Smrgoperates.
3219e0146f7Smrg
3229e0146f7Smrg`--help'
3239e0146f7Smrg`-h'
3249e0146f7Smrg     Print a summary of all of the options to `configure', and exit.
3259e0146f7Smrg
3269e0146f7Smrg`--help=short'
3279e0146f7Smrg`--help=recursive'
3289e0146f7Smrg     Print a summary of the options unique to this package's
3299e0146f7Smrg     `configure', and exit.  The `short' variant lists options used
3309e0146f7Smrg     only in the top level, while the `recursive' variant lists options
3319e0146f7Smrg     also present in any nested packages.
3329e0146f7Smrg
3339e0146f7Smrg`--version'
3349e0146f7Smrg`-V'
3359e0146f7Smrg     Print the version of Autoconf used to generate the `configure'
3369e0146f7Smrg     script, and exit.
3379e0146f7Smrg
3389e0146f7Smrg`--cache-file=FILE'
3399e0146f7Smrg     Enable the cache: use and save the results of the tests in FILE,
3409e0146f7Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3419e0146f7Smrg     disable caching.
3429e0146f7Smrg
3439e0146f7Smrg`--config-cache'
3449e0146f7Smrg`-C'
3459e0146f7Smrg     Alias for `--cache-file=config.cache'.
3469e0146f7Smrg
3479e0146f7Smrg`--quiet'
3489e0146f7Smrg`--silent'
3499e0146f7Smrg`-q'
3509e0146f7Smrg     Do not print messages saying which checks are being made.  To
3519e0146f7Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3529e0146f7Smrg     messages will still be shown).
3539e0146f7Smrg
3549e0146f7Smrg`--srcdir=DIR'
3559e0146f7Smrg     Look for the package's source code in directory DIR.  Usually
3569e0146f7Smrg     `configure' can determine that directory automatically.
3579e0146f7Smrg
3589e0146f7Smrg`--prefix=DIR'
359b78bb896Smrg     Use DIR as the installation prefix.  *note Installation Names::
3609e0146f7Smrg     for more details, including other options available for fine-tuning
3619e0146f7Smrg     the installation locations.
3629e0146f7Smrg
3639e0146f7Smrg`--no-create'
3649e0146f7Smrg`-n'
3659e0146f7Smrg     Run the configure checks, but stop before creating any output
3669e0146f7Smrg     files.
3679e0146f7Smrg
3689e0146f7Smrg`configure' also accepts some other, not widely useful, options.  Run
3699e0146f7Smrg`configure --help' for more details.
3709e0146f7Smrg
371