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