1186690SobrienInstallation Instructions
2186690Sobrien*************************
3186690Sobrien
4186690SobrienCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5237983Sobrien2006, 2007, 2008, 2009 Free Software Foundation, Inc.
6186690Sobrien
7237983Sobrien   Copying and distribution of this file, with or without modification,
8237983Sobrienare permitted in any medium without royalty provided the copyright
9237983Sobriennotice and this notice are preserved.  This file is offered as-is,
10237983Sobrienwithout warranty of any kind.
11186690Sobrien
12186690SobrienBasic Installation
13186690Sobrien==================
14186690Sobrien
15237983Sobrien   Briefly, the shell commands `./configure; make; make install' should
16186690Sobrienconfigure, build, and install this package.  The following
17186690Sobrienmore-detailed instructions are generic; see the `README' file for
18237983Sobrieninstructions specific to this package.  Some packages provide this
19237983Sobrien`INSTALL' file but do not implement all of the features documented
20237983Sobrienbelow.  The lack of an optional feature in a given package is not
21237983Sobriennecessarily a bug.  More recommendations for GNU packages can be found
22237983Sobrienin *note Makefile Conventions: (standards)Makefile Conventions.
23186690Sobrien
24186690Sobrien   The `configure' shell script attempts to guess correct values for
25186690Sobrienvarious system-dependent variables used during compilation.  It uses
26186690Sobrienthose values to create a `Makefile' in each directory of the package.
27186690SobrienIt may also create one or more `.h' files containing system-dependent
28186690Sobriendefinitions.  Finally, it creates a shell script `config.status' that
29186690Sobrienyou can run in the future to recreate the current configuration, and a
30186690Sobrienfile `config.log' containing compiler output (useful mainly for
31186690Sobriendebugging `configure').
32186690Sobrien
33186690Sobrien   It can also use an optional file (typically called `config.cache'
34186690Sobrienand enabled with `--cache-file=config.cache' or simply `-C') that saves
35186690Sobrienthe results of its tests to speed up reconfiguring.  Caching is
36186690Sobriendisabled by default to prevent problems with accidental use of stale
37186690Sobriencache files.
38186690Sobrien
39186690Sobrien   If you need to do unusual things to compile the package, please try
40186690Sobriento figure out how `configure' could check whether to do them, and mail
41186690Sobriendiffs or instructions to the address given in the `README' so they can
42186690Sobrienbe considered for the next release.  If you are using the cache, and at
43186690Sobriensome point `config.cache' contains results you don't want to keep, you
44186690Sobrienmay remove or edit it.
45186690Sobrien
46186690Sobrien   The file `configure.ac' (or `configure.in') is used to create
47186690Sobrien`configure' by a program called `autoconf'.  You need `configure.ac' if
48186690Sobrienyou want to change it or regenerate `configure' using a newer version
49186690Sobrienof `autoconf'.
50186690Sobrien
51237983Sobrien   The simplest way to compile this package is:
52186690Sobrien
53186690Sobrien  1. `cd' to the directory containing the package's source code and type
54186690Sobrien     `./configure' to configure the package for your system.
55186690Sobrien
56186690Sobrien     Running `configure' might take a while.  While running, it prints
57186690Sobrien     some messages telling which features it is checking for.
58186690Sobrien
59186690Sobrien  2. Type `make' to compile the package.
60186690Sobrien
61186690Sobrien  3. Optionally, type `make check' to run any self-tests that come with
62237983Sobrien     the package, generally using the just-built uninstalled binaries.
63186690Sobrien
64186690Sobrien  4. Type `make install' to install the programs and any data files and
65237983Sobrien     documentation.  When installing into a prefix owned by root, it is
66237983Sobrien     recommended that the package be configured and built as a regular
67237983Sobrien     user, and only the `make install' phase executed with root
68237983Sobrien     privileges.
69186690Sobrien
70237983Sobrien  5. Optionally, type `make installcheck' to repeat any self-tests, but
71237983Sobrien     this time using the binaries in their final installed location.
72237983Sobrien     This target does not install anything.  Running this target as a
73237983Sobrien     regular user, particularly if the prior `make install' required
74237983Sobrien     root privileges, verifies that the installation completed
75237983Sobrien     correctly.
76237983Sobrien
77237983Sobrien  6. You can remove the program binaries and object files from the
78186690Sobrien     source code directory by typing `make clean'.  To also remove the
79186690Sobrien     files that `configure' created (so you can compile the package for
80186690Sobrien     a different kind of computer), type `make distclean'.  There is
81186690Sobrien     also a `make maintainer-clean' target, but that is intended mainly
82186690Sobrien     for the package's developers.  If you use it, you may have to get
83186690Sobrien     all sorts of other programs in order to regenerate files that came
84186690Sobrien     with the distribution.
85186690Sobrien
86237983Sobrien  7. Often, you can also type `make uninstall' to remove the installed
87237983Sobrien     files again.  In practice, not all packages have tested that
88237983Sobrien     uninstallation works correctly, even though it is required by the
89237983Sobrien     GNU Coding Standards.
90237983Sobrien
91237983Sobrien  8. Some packages, particularly those that use Automake, provide `make
92237983Sobrien     distcheck', which can by used by developers to test that all other
93237983Sobrien     targets like `make install' and `make uninstall' work correctly.
94237983Sobrien     This target is generally not run by end users.
95237983Sobrien
96186690SobrienCompilers and Options
97186690Sobrien=====================
98186690Sobrien
99237983Sobrien   Some systems require unusual options for compilation or linking that
100237983Sobrienthe `configure' script does not know about.  Run `./configure --help'
101237983Sobrienfor details on some of the pertinent environment variables.
102186690Sobrien
103186690Sobrien   You can give `configure' initial values for configuration parameters
104186690Sobrienby setting variables in the command line or in the environment.  Here
105186690Sobrienis an example:
106186690Sobrien
107186690Sobrien     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108186690Sobrien
109186690Sobrien   *Note Defining Variables::, for more details.
110186690Sobrien
111186690SobrienCompiling For Multiple Architectures
112186690Sobrien====================================
113186690Sobrien
114237983Sobrien   You can compile the package for more than one kind of computer at the
115186690Sobriensame time, by placing the object files for each architecture in their
116186690Sobrienown directory.  To do this, you can use GNU `make'.  `cd' to the
117186690Sobriendirectory where you want the object files and executables to go and run
118186690Sobrienthe `configure' script.  `configure' automatically checks for the
119237983Sobriensource code in the directory that `configure' is in and in `..'.  This
120237983Sobrienis known as a "VPATH" build.
121186690Sobrien
122186690Sobrien   With a non-GNU `make', it is safer to compile the package for one
123186690Sobrienarchitecture at a time in the source code directory.  After you have
124186690Sobrieninstalled the package for one architecture, use `make distclean' before
125186690Sobrienreconfiguring for another architecture.
126186690Sobrien
127237983Sobrien   On MacOS X 10.5 and later systems, you can create libraries and
128237983Sobrienexecutables that work on multiple system types--known as "fat" or
129237983Sobrien"universal" binaries--by specifying multiple `-arch' options to the
130237983Sobriencompiler but only a single `-arch' option to the preprocessor.  Like
131237983Sobrienthis:
132237983Sobrien
133237983Sobrien     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134237983Sobrien                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135237983Sobrien                 CPP="gcc -E" CXXCPP="g++ -E"
136237983Sobrien
137237983Sobrien   This is not guaranteed to produce working output in all cases, you
138237983Sobrienmay have to build one architecture at a time and combine the results
139237983Sobrienusing the `lipo' tool if you have problems.
140237983Sobrien
141186690SobrienInstallation Names
142186690Sobrien==================
143186690Sobrien
144237983Sobrien   By default, `make install' installs the package's commands under
145186690Sobrien`/usr/local/bin', include files under `/usr/local/include', etc.  You
146186690Sobriencan specify an installation prefix other than `/usr/local' by giving
147237983Sobrien`configure' the option `--prefix=PREFIX', where PREFIX must be an
148237983Sobrienabsolute file name.
149186690Sobrien
150186690Sobrien   You can specify separate installation prefixes for
151186690Sobrienarchitecture-specific files and architecture-independent files.  If you
152186690Sobrienpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153186690SobrienPREFIX as the prefix for installing programs and libraries.
154186690SobrienDocumentation and other data files still use the regular prefix.
155186690Sobrien
156186690Sobrien   In addition, if you use an unusual directory layout you can give
157186690Sobrienoptions like `--bindir=DIR' to specify different values for particular
158186690Sobrienkinds of files.  Run `configure --help' for a list of the directories
159237983Sobrienyou can set and what kinds of files go in them.  In general, the
160237983Sobriendefault for these options is expressed in terms of `${prefix}', so that
161237983Sobrienspecifying just `--prefix' will affect all of the other directory
162237983Sobrienspecifications that were not explicitly provided.
163186690Sobrien
164237983Sobrien   The most portable way to affect installation locations is to pass the
165237983Sobriencorrect locations to `configure'; however, many packages provide one or
166237983Sobrienboth of the following shortcuts of passing variable assignments to the
167237983Sobrien`make install' command line to change installation locations without
168237983Sobrienhaving to reconfigure or recompile.
169237983Sobrien
170237983Sobrien   The first method involves providing an override variable for each
171237983Sobrienaffected directory.  For example, `make install
172237983Sobrienprefix=/alternate/directory' will choose an alternate location for all
173237983Sobriendirectory configuration variables that were expressed in terms of
174237983Sobrien`${prefix}'.  Any directories that were specified during `configure',
175237983Sobrienbut not in terms of `${prefix}', must each be overridden at install
176237983Sobrientime for the entire installation to be relocated.  The approach of
177237983Sobrienmakefile variable overrides for each directory variable is required by
178237983Sobrienthe GNU Coding Standards, and ideally causes no recompilation.
179237983SobrienHowever, some platforms have known limitations with the semantics of
180237983Sobrienshared libraries that end up requiring recompilation when using this
181237983Sobrienmethod, particularly noticeable in packages that use GNU Libtool.
182237983Sobrien
183237983Sobrien   The second method involves providing the `DESTDIR' variable.  For
184237983Sobrienexample, `make install DESTDIR=/alternate/directory' will prepend
185237983Sobrien`/alternate/directory' before all installation names.  The approach of
186237983Sobrien`DESTDIR' overrides is not required by the GNU Coding Standards, and
187237983Sobriendoes not work on platforms that have drive letters.  On the other hand,
188237983Sobrienit does better at avoiding recompilation issues, and works well even
189237983Sobrienwhen some directory options were not specified in terms of `${prefix}'
190237983Sobrienat `configure' time.
191237983Sobrien
192237983SobrienOptional Features
193237983Sobrien=================
194237983Sobrien
195186690Sobrien   If the package supports it, you can cause programs to be installed
196186690Sobrienwith an extra prefix or suffix on their names by giving `configure' the
197186690Sobrienoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198186690Sobrien
199237983Sobrien   Some packages pay attention to `--enable-FEATURE' options to
200186690Sobrien`configure', where FEATURE indicates an optional part of the package.
201186690SobrienThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202186690Sobrienis something like `gnu-as' or `x' (for the X Window System).  The
203186690Sobrien`README' should mention any `--enable-' and `--with-' options that the
204186690Sobrienpackage recognizes.
205186690Sobrien
206186690Sobrien   For packages that use the X Window System, `configure' can usually
207186690Sobrienfind the X include and library files automatically, but if it doesn't,
208186690Sobrienyou can use the `configure' options `--x-includes=DIR' and
209186690Sobrien`--x-libraries=DIR' to specify their locations.
210186690Sobrien
211237983Sobrien   Some packages offer the ability to configure how verbose the
212237983Sobrienexecution of `make' will be.  For these packages, running `./configure
213237983Sobrien--enable-silent-rules' sets the default to minimal output, which can be
214237983Sobrienoverridden with `make V=1'; while running `./configure
215237983Sobrien--disable-silent-rules' sets the default to verbose, which can be
216237983Sobrienoverridden with `make V=0'.
217237983Sobrien
218237983SobrienParticular systems
219237983Sobrien==================
220237983Sobrien
221237983Sobrien   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222237983SobrienCC is not installed, it is recommended to use the following options in
223237983Sobrienorder to use an ANSI C compiler:
224237983Sobrien
225237983Sobrien     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226237983Sobrien
227237983Sobrienand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228237983Sobrien
229237983Sobrien   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
230237983Sobrienparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
231237983Sobriena workaround.  If GNU CC is not installed, it is therefore recommended
232237983Sobriento try
233237983Sobrien
234237983Sobrien     ./configure CC="cc"
235237983Sobrien
236237983Sobrienand if that doesn't work, try
237237983Sobrien
238237983Sobrien     ./configure CC="cc -nodtk"
239237983Sobrien
240237983Sobrien   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
241237983Sobriendirectory contains several dysfunctional programs; working variants of
242237983Sobrienthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
243237983Sobrienin your `PATH', put it _after_ `/usr/bin'.
244237983Sobrien
245237983Sobrien   On Haiku, software installed for all users goes in `/boot/common',
246237983Sobriennot `/usr/local'.  It is recommended to use the following options:
247237983Sobrien
248237983Sobrien     ./configure --prefix=/boot/common
249237983Sobrien
250186690SobrienSpecifying the System Type
251186690Sobrien==========================
252186690Sobrien
253237983Sobrien   There may be some features `configure' cannot figure out
254237983Sobrienautomatically, but needs to determine by the type of machine the package
255237983Sobrienwill run on.  Usually, assuming the package is built to be run on the
256237983Sobrien_same_ architectures, `configure' can figure that out, but if it prints
257237983Sobriena message saying it cannot guess the machine type, give it the
258186690Sobrien`--build=TYPE' option.  TYPE can either be a short name for the system
259186690Sobrientype, such as `sun4', or a canonical name which has the form:
260186690Sobrien
261186690Sobrien     CPU-COMPANY-SYSTEM
262186690Sobrien
263186690Sobrienwhere SYSTEM can have one of these forms:
264186690Sobrien
265237983Sobrien     OS
266237983Sobrien     KERNEL-OS
267186690Sobrien
268186690Sobrien   See the file `config.sub' for the possible values of each field.  If
269186690Sobrien`config.sub' isn't included in this package, then this package doesn't
270186690Sobrienneed to know the machine type.
271186690Sobrien
272186690Sobrien   If you are _building_ compiler tools for cross-compiling, you should
273186690Sobrienuse the option `--target=TYPE' to select the type of system they will
274186690Sobrienproduce code for.
275186690Sobrien
276186690Sobrien   If you want to _use_ a cross compiler, that generates code for a
277186690Sobrienplatform different from the build platform, you should specify the
278186690Sobrien"host" platform (i.e., that on which the generated programs will
279186690Sobrieneventually be run) with `--host=TYPE'.
280186690Sobrien
281186690SobrienSharing Defaults
282186690Sobrien================
283186690Sobrien
284237983Sobrien   If you want to set default values for `configure' scripts to share,
285237983Sobrienyou can create a site shell script called `config.site' that gives
286237983Sobriendefault values for variables like `CC', `cache_file', and `prefix'.
287186690Sobrien`configure' looks for `PREFIX/share/config.site' if it exists, then
288186690Sobrien`PREFIX/etc/config.site' if it exists.  Or, you can set the
289186690Sobrien`CONFIG_SITE' environment variable to the location of the site script.
290186690SobrienA warning: not all `configure' scripts look for a site script.
291186690Sobrien
292186690SobrienDefining Variables
293186690Sobrien==================
294186690Sobrien
295237983Sobrien   Variables not defined in a site shell script can be set in the
296186690Sobrienenvironment passed to `configure'.  However, some packages may run
297186690Sobrienconfigure again during the build, and the customized values of these
298186690Sobrienvariables may be lost.  In order to avoid this problem, you should set
299186690Sobrienthem in the `configure' command line, using `VAR=value'.  For example:
300186690Sobrien
301186690Sobrien     ./configure CC=/usr/local2/bin/gcc
302186690Sobrien
303186690Sobriencauses the specified `gcc' to be used as the C compiler (unless it is
304186690Sobrienoverridden in the site shell script).
305186690Sobrien
306186690SobrienUnfortunately, this technique does not work for `CONFIG_SHELL' due to
307186690Sobrienan Autoconf bug.  Until the bug is fixed you can use this workaround:
308186690Sobrien
309186690Sobrien     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
310186690Sobrien
311186690Sobrien`configure' Invocation
312186690Sobrien======================
313186690Sobrien
314237983Sobrien   `configure' recognizes the following options to control how it
315237983Sobrienoperates.
316186690Sobrien
317186690Sobrien`--help'
318186690Sobrien`-h'
319237983Sobrien     Print a summary of all of the options to `configure', and exit.
320186690Sobrien
321237983Sobrien`--help=short'
322237983Sobrien`--help=recursive'
323237983Sobrien     Print a summary of the options unique to this package's
324237983Sobrien     `configure', and exit.  The `short' variant lists options used
325237983Sobrien     only in the top level, while the `recursive' variant lists options
326237983Sobrien     also present in any nested packages.
327237983Sobrien
328186690Sobrien`--version'
329186690Sobrien`-V'
330186690Sobrien     Print the version of Autoconf used to generate the `configure'
331186690Sobrien     script, and exit.
332186690Sobrien
333186690Sobrien`--cache-file=FILE'
334186690Sobrien     Enable the cache: use and save the results of the tests in FILE,
335186690Sobrien     traditionally `config.cache'.  FILE defaults to `/dev/null' to
336186690Sobrien     disable caching.
337186690Sobrien
338186690Sobrien`--config-cache'
339186690Sobrien`-C'
340186690Sobrien     Alias for `--cache-file=config.cache'.
341186690Sobrien
342186690Sobrien`--quiet'
343186690Sobrien`--silent'
344186690Sobrien`-q'
345186690Sobrien     Do not print messages saying which checks are being made.  To
346186690Sobrien     suppress all normal output, redirect it to `/dev/null' (any error
347186690Sobrien     messages will still be shown).
348186690Sobrien
349186690Sobrien`--srcdir=DIR'
350186690Sobrien     Look for the package's source code in directory DIR.  Usually
351186690Sobrien     `configure' can determine that directory automatically.
352186690Sobrien
353237983Sobrien`--prefix=DIR'
354237983Sobrien     Use DIR as the installation prefix.  *note Installation Names::
355237983Sobrien     for more details, including other options available for fine-tuning
356237983Sobrien     the installation locations.
357237983Sobrien
358237983Sobrien`--no-create'
359237983Sobrien`-n'
360237983Sobrien     Run the configure checks, but stop before creating any output
361237983Sobrien     files.
362237983Sobrien
363186690Sobrien`configure' also accepts some other, not widely useful, options.  Run
364186690Sobrien`configure --help' for more details.
365186690Sobrien
366