INSTALL.gen revision 104862
118099SpstBasic Installation
218099Spst==================
318099Spst
418099Spst   These are generic installation instructions.
518099Spst
618099Spst   The `configure' shell script attempts to guess correct values for
718099Spstvarious system-dependent variables used during compilation.  It uses
818099Spstthose values to create a `Makefile' in each directory of the package.
918099SpstIt may also create one or more `.h' files containing system-dependent
1018099Spstdefinitions.  Finally, it creates a shell script `config.status' that
11104862Sruyou can run in the future to recreate the current configuration, and a
12104862Srufile `config.log' containing compiler output (useful mainly for
13104862Srudebugging `configure').
1418099Spst
15104862Sru   It can also use an optional file (typically called `config.cache'
16104862Sruand enabled with `--cache-file=config.cache' or simply `-C') that saves
17104862Sruthe results of its tests to speed up reconfiguring.  (Caching is
18104862Srudisabled by default to prevent problems with accidental use of stale
19104862Srucache files.)
20104862Sru
2118099Spst   If you need to do unusual things to compile the package, please try
2218099Spstto figure out how `configure' could check whether to do them, and mail
2318099Spstdiffs or instructions to the address given in the `README' so they can
24104862Srube considered for the next release.  If you are using the cache, and at
25104862Srusome point `config.cache' contains results you don't want to keep, you
26104862Srumay remove or edit it.
2718099Spst
28104862Sru   The file `configure.ac' (or `configure.in') is used to create
29104862Sru`configure' by a program called `autoconf'.  You only need
30104862Sru`configure.ac' if you want to change it or regenerate `configure' using
31104862Srua newer version of `autoconf'.
3218099Spst
3318099SpstThe simplest way to compile this package is:
3418099Spst
3518099Spst  1. `cd' to the directory containing the package's source code and type
3618099Spst     `./configure' to configure the package for your system.  If you're
3718099Spst     using `csh' on an old version of System V, you might need to type
3818099Spst     `sh ./configure' instead to prevent `csh' from trying to execute
3918099Spst     `configure' itself.
4018099Spst
4118099Spst     Running `configure' takes awhile.  While running, it prints some
4218099Spst     messages telling which features it is checking for.
4318099Spst
4418099Spst  2. Type `make' to compile the package.
4518099Spst
4618099Spst  3. Optionally, type `make check' to run any self-tests that come with
4718099Spst     the package.
4818099Spst
4918099Spst  4. Type `make install' to install the programs and any data files and
5018099Spst     documentation.
5118099Spst
5218099Spst  5. You can remove the program binaries and object files from the
5318099Spst     source code directory by typing `make clean'.  To also remove the
5418099Spst     files that `configure' created (so you can compile the package for
5518099Spst     a different kind of computer), type `make distclean'.  There is
5618099Spst     also a `make maintainer-clean' target, but that is intended mainly
5718099Spst     for the package's developers.  If you use it, you may have to get
5818099Spst     all sorts of other programs in order to regenerate files that came
5918099Spst     with the distribution.
6018099Spst
6118099SpstCompilers and Options
6218099Spst=====================
6318099Spst
6418099Spst   Some systems require unusual options for compilation or linking that
65104862Sruthe `configure' script does not know about.  Run `./configure --help'
66104862Srufor details on some of the pertinent environment variables.
6718099Spst
68104862Sru   You can give `configure' initial values for variables by setting
69104862Sruthem in the environment.  You can do that on the command line like this:
7018099Spst
71104862Sru     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
72104862Sru
73104862Sru   *Note Environment Variables::, for more details.
74104862Sru
7518099SpstCompiling For Multiple Architectures
7618099Spst====================================
7718099Spst
7818099Spst   You can compile the package for more than one kind of computer at the
7918099Spstsame time, by placing the object files for each architecture in their
8018099Spstown directory.  To do this, you must use a version of `make' that
8118099Spstsupports the `VPATH' variable, such as GNU `make'.  `cd' to the
8218099Spstdirectory where you want the object files and executables to go and run
8318099Spstthe `configure' script.  `configure' automatically checks for the
8418099Spstsource code in the directory that `configure' is in and in `..'.
8518099Spst
86104862Sru   If you have to use a `make' that does not support the `VPATH'
8718099Spstvariable, you have to compile the package for one architecture at a time
8818099Spstin the source code directory.  After you have installed the package for
8918099Spstone architecture, use `make distclean' before reconfiguring for another
9018099Spstarchitecture.
9118099Spst
9218099SpstInstallation Names
9318099Spst==================
9418099Spst
9518099Spst   By default, `make install' will install the package's files in
9618099Spst`/usr/local/bin', `/usr/local/man', etc.  You can specify an
9718099Spstinstallation prefix other than `/usr/local' by giving `configure' the
9818099Spstoption `--prefix=PATH'.
9918099Spst
10018099Spst   You can specify separate installation prefixes for
10118099Spstarchitecture-specific files and architecture-independent files.  If you
10218099Spstgive `configure' the option `--exec-prefix=PATH', the package will use
10318099SpstPATH as the prefix for installing programs and libraries.
10418099SpstDocumentation and other data files will still use the regular prefix.
10518099Spst
10669626Sru   In addition, if you use an unusual directory layout you can give
10769626Sruoptions like `--bindir=PATH' to specify different values for particular
10869626Srukinds of files.  Run `configure --help' for a list of the directories
10969626Sruyou can set and what kinds of files go in them.
11069626Sru
11118099Spst   If the package supports it, you can cause programs to be installed
11218099Spstwith an extra prefix or suffix on their names by giving `configure' the
11318099Spstoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
11418099Spst
11518099SpstOptional Features
11618099Spst=================
11718099Spst
11818099Spst   Some packages pay attention to `--enable-FEATURE' options to
11918099Spst`configure', where FEATURE indicates an optional part of the package.
12018099SpstThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
12118099Spstis something like `gnu-as' or `x' (for the X Window System).  The
12218099Spst`README' should mention any `--enable-' and `--with-' options that the
12318099Spstpackage recognizes.
12418099Spst
12518099Spst   For packages that use the X Window System, `configure' can usually
12618099Spstfind the X include and library files automatically, but if it doesn't,
12718099Spstyou can use the `configure' options `--x-includes=DIR' and
12818099Spst`--x-libraries=DIR' to specify their locations.
12918099Spst
13018099SpstSpecifying the System Type
13118099Spst==========================
13218099Spst
133104862Sru   There may be some features `configure' cannot figure out
13418099Spstautomatically, but needs to determine by the type of host the package
13518099Spstwill run on.  Usually `configure' can figure that out, but if it prints
136104862Srua message saying it cannot guess the host type, give it the
137104862Sru`--build=TYPE' option.  TYPE can either be a short name for the system
138104862Srutype, such as `sun4', or a canonical name which has the form:
139104862Sru
14018099Spst     CPU-COMPANY-SYSTEM
14118099Spst
142104862Sruwhere SYSTEM can have one of these forms:
143104862Sru
144104862Sru     OS
145104862Sru     KERNEL-OS
146104862Sru
147104862Sru   See the file `config.sub' for the possible values of each field.  If
14818099Spst`config.sub' isn't included in this package, then this package doesn't
14918099Spstneed to know the host type.
15018099Spst
151104862Sru   If you are _building_ compiler tools for cross-compiling, you should
15218099Spstuse the `--target=TYPE' option to select the type of system they will
153104862Sruproduce code for.
15418099Spst
155104862Sru   If you want to _use_ a cross compiler, that generates code for a
156104862Sruplatform different from the build platform, you should specify the host
157104862Sruplatform (i.e., that on which the generated programs will eventually be
158104862Srurun) with `--host=TYPE'.  In this case, you should also specify the
159104862Srubuild platform with `--build=TYPE', because, in this case, it may not
160104862Srube possible to guess the build platform (it sometimes involves
161104862Srucompiling and running simple test programs, and this can't be done if
162104862Sruthe compiler is a cross compiler).
163104862Sru
16418099SpstSharing Defaults
16518099Spst================
16618099Spst
16718099Spst   If you want to set default values for `configure' scripts to share,
16818099Spstyou can create a site shell script called `config.site' that gives
16918099Spstdefault values for variables like `CC', `cache_file', and `prefix'.
17018099Spst`configure' looks for `PREFIX/share/config.site' if it exists, then
17118099Spst`PREFIX/etc/config.site' if it exists.  Or, you can set the
17218099Spst`CONFIG_SITE' environment variable to the location of the site script.
17318099SpstA warning: not all `configure' scripts look for a site script.
17418099Spst
175104862SruEnvironment Variables
176104862Sru=====================
17718099Spst
178104862Sru   Variables not defined in a site shell script can be set in the
179104862Sruenvironment passed to configure.  However, some packages may run
180104862Sruconfigure again during the build, and the customized values of these
181104862Sruvariables may be lost.  In order to avoid this problem, you should set
182104862Sruthem in the `configure' command line, using `VAR=value'.  For example:
183104862Sru
184104862Sru     ./configure CC=/usr/local2/bin/gcc
185104862Sru
186104862Sruwill cause the specified gcc to be used as the C compiler (unless it is
187104862Sruoverridden in the site shell script).
188104862Sru
189104862Sru`configure' Invocation
190104862Sru======================
191104862Sru
19218099Spst   `configure' recognizes the following options to control how it
19318099Spstoperates.
19418099Spst
19518099Spst`--help'
196104862Sru`-h'
19718099Spst     Print a summary of the options to `configure', and exit.
19818099Spst
199104862Sru`--version'
200104862Sru`-V'
201104862Sru     Print the version of Autoconf used to generate the `configure'
202104862Sru     script, and exit.
203104862Sru
204104862Sru`--cache-file=FILE'
205104862Sru     Enable the cache: use and save the results of the tests in FILE,
206104862Sru     traditionally `config.cache'.  FILE defaults to `/dev/null' to
207104862Sru     disable caching.
208104862Sru
209104862Sru`--config-cache'
210104862Sru`-C'
211104862Sru     Alias for `--cache-file=config.cache'.
212104862Sru
21318099Spst`--quiet'
21418099Spst`--silent'
21518099Spst`-q'
21669626Sru     Do not print messages saying which checks are being made.  To
21769626Sru     suppress all normal output, redirect it to `/dev/null' (any error
21869626Sru     messages will still be shown).
21918099Spst
22018099Spst`--srcdir=DIR'
22118099Spst     Look for the package's source code in directory DIR.  Usually
22218099Spst     `configure' can determine that directory automatically.
22318099Spst
224104862Sru`configure' also accepts some other, not widely useful, options.  Run
225104862Sru`configure --help' for more details.
22618099Spst
227