1@c This file is included by autoconf.texi and is used to produce
2@c the INSTALL file.
3
4@node Basic Installation
5@section Basic Installation
6
7These are generic installation instructions.
8
9The @code{configure} shell script attempts to guess correct values for
10various system-dependent variables used during compilation.  It uses
11those values to create a @file{Makefile} in each directory of the
12package.  It may also create one or more @file{.h} files containing
13system-dependent definitions.  Finally, it creates a shell script
14@file{config.status} that you can run in the future to recreate the
15current configuration, a file @file{config.cache} that saves the results
16of its tests to speed up reconfiguring, and a file @file{config.log}
17containing compiler output (useful mainly for debugging
18@code{configure}).
19
20If you need to do unusual things to compile the package, please try to
21figure out how @code{configure} could check whether to do them, and mail
22diffs or instructions to the address given in the @file{README} so they
23can be considered for the next release.  If at some point
24@file{config.cache} contains results you don't want to keep, you may
25remove or edit it.
26
27The file @file{configure.in} is used to create @file{configure} by a
28program called @code{autoconf}.  You only need @file{configure.in} if
29you want to change it or regenerate @file{configure} using a newer
30version of @code{autoconf}.
31
32@noindent
33The simplest way to compile this package is:
34
35@enumerate
36@item
37@code{cd} to the directory containing the package's source code and type
38@samp{./configure} to configure the package for your system.  If you're
39using @code{csh} on an old version of System V, you might need to type
40@samp{sh ./configure} instead to prevent @code{csh} from trying to
41execute @code{configure} itself.
42
43Running @code{configure} takes awhile.  While running, it prints some
44messages telling which features it is checking for.
45
46@item
47Type @samp{make} to compile the package.
48
49@item
50Optionally, type @samp{make check} to run any self-tests that come with
51the package.
52
53@item
54Type @samp{make install} to install the programs and any data files and
55documentation.
56
57@item
58You can remove the program binaries and object files from the source code
59directory by typing @samp{make clean}.  To also remove the files that
60@code{configure} created (so you can compile the package for a different
61kind of computer), type @samp{make distclean}.  There is also a
62@samp{make maintainer-clean} target, but that is intended mainly for the
63package's developers.  If you use it, you may have to get all sorts of
64other programs in order to regenerate files that came with the distribution.
65@end enumerate
66
67@node Compilers and Options
68@section Compilers and Options
69
70Some systems require unusual options for compilation or linking that
71the @code{configure} script does not know about.  You can give
72@code{configure} initial values for variables by setting them in the
73environment.  Using a Bourne-compatible shell, you can do that on the
74command line like this:
75@example
76CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
77@end example
78
79@noindent
80Or on systems that have the @code{env} program, you can do it like this:
81@example
82env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
83@end example
84
85@node Multiple Architectures
86@section Compiling For Multiple Architectures
87
88You can compile the package for more than one kind of computer at the
89same time, by placing the object files for each architecture in their
90own directory.  To do this, you must use a version of @code{make} that
91supports the @code{VPATH} variable, such as GNU @code{make}.  @code{cd}
92to the directory where you want the object files and executables to go
93and run the @code{configure} script.  @code{configure} automatically
94checks for the source code in the directory that @code{configure} is in
95and in @file{..}.
96
97If you have to use a @code{make} that does not supports the @code{VPATH}
98variable, you have to compile the package for one architecture at a time
99in the source code directory.  After you have installed the package for
100one architecture, use @samp{make distclean} before reconfiguring for
101another architecture.
102
103@node Installation Names
104@section Installation Names
105
106By default, @samp{make install} will install the package's files in
107@file{/usr/local/bin}, @file{/usr/local/man}, etc.  You can specify an
108installation prefix other than @file{/usr/local} by giving
109@code{configure} the option @samp{--prefix=@var{path}}.
110
111You can specify separate installation prefixes for architecture-specific
112files and architecture-independent files.  If you give @code{configure}
113the option @samp{--exec-prefix=@var{path}}, the package will use
114@var{path} as the prefix for installing programs and libraries.
115Documentation and other data files will still use the regular prefix.
116
117In addition, if you use an unusual directory layout you can give options
118like @samp{--bindir=@var{path}} to specify different values for
119particular kinds of files.  Run @samp{configure --help} for a list of
120the directories you can set and what kinds of files go in them.
121
122If the package supports it, you can cause programs to be installed with
123an extra prefix or suffix on their names by giving @code{configure} the
124option @samp{--program-prefix=@var{PREFIX}} or
125@samp{--program-suffix=@var{SUFFIX}}.
126
127@node Optional Features
128@section Optional Features
129
130Some packages pay attention to @samp{--enable-@var{feature}} options to
131@code{configure}, where @var{feature} indicates an optional part of the
132package.  They may also pay attention to @samp{--with-@var{package}}
133options, where @var{package} is something like @samp{gnu-as} or @samp{x}
134(for the X Window System).  The @file{README} should mention any
135@samp{--enable-} and @samp{--with-} options that the package recognizes.
136
137For packages that use the X Window System, @code{configure} can usually
138find the X include and library files automatically, but if it doesn't,
139you can use the @code{configure} options @samp{--x-includes=@var{dir}}
140and @samp{--x-libraries=@var{dir}} to specify their locations.
141
142@node System Type
143@section Specifying the System Type
144
145There may be some features @code{configure} can not figure out
146automatically, but needs to determine by the type of host the package
147will run on.  Usually @code{configure} can figure that out, but if it
148prints a message saying it can not guess the host type, give it the
149@samp{--host=@var{type}} option.  @var{type} can either be a short name
150for the system type, such as @samp{sun4}, or a canonical name with three
151fields:
152@example
153@var{cpu}-@var{company}-@var{system}
154@end example
155@noindent
156See the file @file{config.sub} for the possible values of each field.
157If @file{config.sub} isn't included in this package, then this package
158doesn't need to know the host type.
159
160If you are building compiler tools for cross-compiling, you can also use
161the @samp{--target=@var{type}} option to select the type of system
162they will produce code for and the @samp{--build=@var{type}} option
163to select the type of system on which you are compiling the package.
164
165@node Sharing Defaults
166@section Sharing Defaults
167
168If you want to set default values for @code{configure} scripts to share,
169you can create a site shell script called @file{config.site} that gives
170default values for variables like @code{CC}, @code{cache_file}, and
171@code{prefix}.  @code{configure} looks for
172@file{@var{prefix}/share/config.site} if it exists, then
173@file{@var{prefix}/etc/config.site} if it exists.  Or, you can set
174the @code{CONFIG_SITE} environment variable to the location of the site
175script.  A warning: not all @code{configure} scripts look for a site script.
176
177@node Operation Controls
178@section Operation Controls
179
180@code{configure} recognizes the following options to control how it
181operates.
182
183@table @code
184@item --cache-file=@var{file}
185Use and save the results of the tests in @var{file} instead of
186@file{./config.cache}.  Set @var{file} to @file{/dev/null} to disable
187caching, for debugging @code{configure}.
188
189@item --help
190Print a summary of the options to @code{configure}, and exit.
191
192@item --quiet
193@itemx --silent
194@itemx -q
195Do not print messages saying which checks are being made.
196To suppress all normal output, redirect it to @file{/dev/null}
197(any error messages will still be shown).
198
199@item --srcdir=@var{dir}
200Look for the package's source code in directory @var{dir}.  Usually
201@code{configure} can determine that directory automatically.
202
203@item --version
204Print the version of Autoconf used to generate the @code{configure}
205script, and exit.
206@end table
207
208@noindent
209@code{configure} also accepts some other, not widely useful, options.
210