INSTALL revision a966c04f
1a966c04fSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
2a966c04fSmrgFoundation, Inc.
3a966c04fSmrg
4a966c04fSmrg   This file is free documentation; the Free Software Foundation gives
5a966c04fSmrgunlimited permission to copy, distribute and modify it.
6a966c04fSmrg
7a966c04fSmrgBasic Installation
8a966c04fSmrg==================
9a966c04fSmrg
10a966c04fSmrg   These are generic installation instructions.
11a966c04fSmrg
12a966c04fSmrg   The `configure' shell script attempts to guess correct values for
13a966c04fSmrgvarious system-dependent variables used during compilation.  It uses
14a966c04fSmrgthose values to create a `Makefile' in each directory of the package.
15a966c04fSmrgIt may also create one or more `.h' files containing system-dependent
16a966c04fSmrgdefinitions.  Finally, it creates a shell script `config.status' that
17a966c04fSmrgyou can run in the future to recreate the current configuration, and a
18a966c04fSmrgfile `config.log' containing compiler output (useful mainly for
19a966c04fSmrgdebugging `configure').
20a966c04fSmrg
21a966c04fSmrg   It can also use an optional file (typically called `config.cache'
22a966c04fSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
23a966c04fSmrgthe results of its tests to speed up reconfiguring.  (Caching is
24a966c04fSmrgdisabled by default to prevent problems with accidental use of stale
25a966c04fSmrgcache files.)
26a966c04fSmrg
27a966c04fSmrg   If you need to do unusual things to compile the package, please try
28a966c04fSmrgto figure out how `configure' could check whether to do them, and mail
29a966c04fSmrgdiffs or instructions to the address given in the `README' so they can
30a966c04fSmrgbe considered for the next release.  If you are using the cache, and at
31a966c04fSmrgsome point `config.cache' contains results you don't want to keep, you
32a966c04fSmrgmay remove or edit it.
33a966c04fSmrg
34a966c04fSmrg   The file `configure.ac' (or `configure.in') is used to create
35a966c04fSmrg`configure' by a program called `autoconf'.  You only need
36a966c04fSmrg`configure.ac' if you want to change it or regenerate `configure' using
37a966c04fSmrga newer version of `autoconf'.
38a966c04fSmrg
39a966c04fSmrgThe simplest way to compile this package is:
40a966c04fSmrg
41a966c04fSmrg  1. `cd' to the directory containing the package's source code and type
42a966c04fSmrg     `./configure' to configure the package for your system.  If you're
43a966c04fSmrg     using `csh' on an old version of System V, you might need to type
44a966c04fSmrg     `sh ./configure' instead to prevent `csh' from trying to execute
45a966c04fSmrg     `configure' itself.
46a966c04fSmrg
47a966c04fSmrg     Running `configure' takes awhile.  While running, it prints some
48a966c04fSmrg     messages telling which features it is checking for.
49a966c04fSmrg
50a966c04fSmrg  2. Type `make' to compile the package.
51a966c04fSmrg
52a966c04fSmrg  3. Optionally, type `make check' to run any self-tests that come with
53a966c04fSmrg     the package.
54a966c04fSmrg
55a966c04fSmrg  4. Type `make install' to install the programs and any data files and
56a966c04fSmrg     documentation.
57a966c04fSmrg
58a966c04fSmrg  5. You can remove the program binaries and object files from the
59a966c04fSmrg     source code directory by typing `make clean'.  To also remove the
60a966c04fSmrg     files that `configure' created (so you can compile the package for
61a966c04fSmrg     a different kind of computer), type `make distclean'.  There is
62a966c04fSmrg     also a `make maintainer-clean' target, but that is intended mainly
63a966c04fSmrg     for the package's developers.  If you use it, you may have to get
64a966c04fSmrg     all sorts of other programs in order to regenerate files that came
65a966c04fSmrg     with the distribution.
66a966c04fSmrg
67a966c04fSmrgCompilers and Options
68a966c04fSmrg=====================
69a966c04fSmrg
70a966c04fSmrg   Some systems require unusual options for compilation or linking that
71a966c04fSmrgthe `configure' script does not know about.  Run `./configure --help'
72a966c04fSmrgfor details on some of the pertinent environment variables.
73a966c04fSmrg
74a966c04fSmrg   You can give `configure' initial values for configuration parameters
75a966c04fSmrgby setting variables in the command line or in the environment.  Here
76a966c04fSmrgis an example:
77a966c04fSmrg
78a966c04fSmrg     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
79a966c04fSmrg
80a966c04fSmrg   *Note Defining Variables::, for more details.
81a966c04fSmrg
82a966c04fSmrgCompiling For Multiple Architectures
83a966c04fSmrg====================================
84a966c04fSmrg
85a966c04fSmrg   You can compile the package for more than one kind of computer at the
86a966c04fSmrgsame time, by placing the object files for each architecture in their
87a966c04fSmrgown directory.  To do this, you must use a version of `make' that
88a966c04fSmrgsupports the `VPATH' variable, such as GNU `make'.  `cd' to the
89a966c04fSmrgdirectory where you want the object files and executables to go and run
90a966c04fSmrgthe `configure' script.  `configure' automatically checks for the
91a966c04fSmrgsource code in the directory that `configure' is in and in `..'.
92a966c04fSmrg
93a966c04fSmrg   If you have to use a `make' that does not support the `VPATH'
94a966c04fSmrgvariable, you have to compile the package for one architecture at a
95a966c04fSmrgtime in the source code directory.  After you have installed the
96a966c04fSmrgpackage for one architecture, use `make distclean' before reconfiguring
97a966c04fSmrgfor another architecture.
98a966c04fSmrg
99a966c04fSmrgInstallation Names
100a966c04fSmrg==================
101a966c04fSmrg
102a966c04fSmrg   By default, `make install' will install the package's files in
103a966c04fSmrg`/usr/local/bin', `/usr/local/man', etc.  You can specify an
104a966c04fSmrginstallation prefix other than `/usr/local' by giving `configure' the
105a966c04fSmrgoption `--prefix=PATH'.
106a966c04fSmrg
107a966c04fSmrg   You can specify separate installation prefixes for
108a966c04fSmrgarchitecture-specific files and architecture-independent files.  If you
109a966c04fSmrggive `configure' the option `--exec-prefix=PATH', the package will use
110a966c04fSmrgPATH as the prefix for installing programs and libraries.
111a966c04fSmrgDocumentation and other data files will still use the regular prefix.
112a966c04fSmrg
113a966c04fSmrg   In addition, if you use an unusual directory layout you can give
114a966c04fSmrgoptions like `--bindir=PATH' to specify different values for particular
115a966c04fSmrgkinds of files.  Run `configure --help' for a list of the directories
116a966c04fSmrgyou can set and what kinds of files go in them.
117a966c04fSmrg
118a966c04fSmrg   If the package supports it, you can cause programs to be installed
119a966c04fSmrgwith an extra prefix or suffix on their names by giving `configure' the
120a966c04fSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
121a966c04fSmrg
122a966c04fSmrgOptional Features
123a966c04fSmrg=================
124a966c04fSmrg
125a966c04fSmrg   Some packages pay attention to `--enable-FEATURE' options to
126a966c04fSmrg`configure', where FEATURE indicates an optional part of the package.
127a966c04fSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
128a966c04fSmrgis something like `gnu-as' or `x' (for the X Window System).  The
129a966c04fSmrg`README' should mention any `--enable-' and `--with-' options that the
130a966c04fSmrgpackage recognizes.
131a966c04fSmrg
132a966c04fSmrg   For packages that use the X Window System, `configure' can usually
133a966c04fSmrgfind the X include and library files automatically, but if it doesn't,
134a966c04fSmrgyou can use the `configure' options `--x-includes=DIR' and
135a966c04fSmrg`--x-libraries=DIR' to specify their locations.
136a966c04fSmrg
137a966c04fSmrgSpecifying the System Type
138a966c04fSmrg==========================
139a966c04fSmrg
140a966c04fSmrg   There may be some features `configure' cannot figure out
141a966c04fSmrgautomatically, but needs to determine by the type of machine the package
142a966c04fSmrgwill run on.  Usually, assuming the package is built to be run on the
143a966c04fSmrg_same_ architectures, `configure' can figure that out, but if it prints
144a966c04fSmrga message saying it cannot guess the machine type, give it the
145a966c04fSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
146a966c04fSmrgtype, such as `sun4', or a canonical name which has the form:
147a966c04fSmrg
148a966c04fSmrg     CPU-COMPANY-SYSTEM
149a966c04fSmrg
150a966c04fSmrgwhere SYSTEM can have one of these forms:
151a966c04fSmrg
152a966c04fSmrg     OS KERNEL-OS
153a966c04fSmrg
154a966c04fSmrg   See the file `config.sub' for the possible values of each field.  If
155a966c04fSmrg`config.sub' isn't included in this package, then this package doesn't
156a966c04fSmrgneed to know the machine type.
157a966c04fSmrg
158a966c04fSmrg   If you are _building_ compiler tools for cross-compiling, you should
159a966c04fSmrguse the `--target=TYPE' option to select the type of system they will
160a966c04fSmrgproduce code for.
161a966c04fSmrg
162a966c04fSmrg   If you want to _use_ a cross compiler, that generates code for a
163a966c04fSmrgplatform different from the build platform, you should specify the
164a966c04fSmrg"host" platform (i.e., that on which the generated programs will
165a966c04fSmrgeventually be run) with `--host=TYPE'.
166a966c04fSmrg
167a966c04fSmrgSharing Defaults
168a966c04fSmrg================
169a966c04fSmrg
170a966c04fSmrg   If you want to set default values for `configure' scripts to share,
171a966c04fSmrgyou can create a site shell script called `config.site' that gives
172a966c04fSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
173a966c04fSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
174a966c04fSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
175a966c04fSmrg`CONFIG_SITE' environment variable to the location of the site script.
176a966c04fSmrgA warning: not all `configure' scripts look for a site script.
177a966c04fSmrg
178a966c04fSmrgDefining Variables
179a966c04fSmrg==================
180a966c04fSmrg
181a966c04fSmrg   Variables not defined in a site shell script can be set in the
182a966c04fSmrgenvironment passed to `configure'.  However, some packages may run
183a966c04fSmrgconfigure again during the build, and the customized values of these
184a966c04fSmrgvariables may be lost.  In order to avoid this problem, you should set
185a966c04fSmrgthem in the `configure' command line, using `VAR=value'.  For example:
186a966c04fSmrg
187a966c04fSmrg     ./configure CC=/usr/local2/bin/gcc
188a966c04fSmrg
189a966c04fSmrgwill cause the specified gcc to be used as the C compiler (unless it is
190a966c04fSmrgoverridden in the site shell script).
191a966c04fSmrg
192a966c04fSmrg`configure' Invocation
193a966c04fSmrg======================
194a966c04fSmrg
195a966c04fSmrg   `configure' recognizes the following options to control how it
196a966c04fSmrgoperates.
197a966c04fSmrg
198a966c04fSmrg`--help'
199a966c04fSmrg`-h'
200a966c04fSmrg     Print a summary of the options to `configure', and exit.
201a966c04fSmrg
202a966c04fSmrg`--version'
203a966c04fSmrg`-V'
204a966c04fSmrg     Print the version of Autoconf used to generate the `configure'
205a966c04fSmrg     script, and exit.
206a966c04fSmrg
207a966c04fSmrg`--cache-file=FILE'
208a966c04fSmrg     Enable the cache: use and save the results of the tests in FILE,
209a966c04fSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
210a966c04fSmrg     disable caching.
211a966c04fSmrg
212a966c04fSmrg`--config-cache'
213a966c04fSmrg`-C'
214a966c04fSmrg     Alias for `--cache-file=config.cache'.
215a966c04fSmrg
216a966c04fSmrg`--quiet'
217a966c04fSmrg`--silent'
218a966c04fSmrg`-q'
219a966c04fSmrg     Do not print messages saying which checks are being made.  To
220a966c04fSmrg     suppress all normal output, redirect it to `/dev/null' (any error
221a966c04fSmrg     messages will still be shown).
222a966c04fSmrg
223a966c04fSmrg`--srcdir=DIR'
224a966c04fSmrg     Look for the package's source code in directory DIR.  Usually
225a966c04fSmrg     `configure' can determine that directory automatically.
226a966c04fSmrg
227a966c04fSmrg`configure' also accepts some other, not widely useful, options.  Run
228a966c04fSmrg`configure --help' for more details.
229a966c04fSmrg
230