1d6c0b56eSmrgInstallation Instructions
2d6c0b56eSmrg*************************
3d6c0b56eSmrg
4d6c0b56eSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5d6c0b56eSmrgInc.
6d6c0b56eSmrg
7d6c0b56eSmrg   Copying and distribution of this file, with or without modification,
8d6c0b56eSmrgare permitted in any medium without royalty provided the copyright
9d6c0b56eSmrgnotice and this notice are preserved.  This file is offered as-is,
10d6c0b56eSmrgwithout warranty of any kind.
11d6c0b56eSmrg
12d6c0b56eSmrgBasic Installation
13d6c0b56eSmrg==================
14d6c0b56eSmrg
15d6c0b56eSmrg   Briefly, the shell commands `./configure; make; make install' should
16d6c0b56eSmrgconfigure, build, and install this package.  The following
17d6c0b56eSmrgmore-detailed instructions are generic; see the `README' file for
18d6c0b56eSmrginstructions specific to this package.  Some packages provide this
19d6c0b56eSmrg`INSTALL' file but do not implement all of the features documented
20d6c0b56eSmrgbelow.  The lack of an optional feature in a given package is not
21d6c0b56eSmrgnecessarily a bug.  More recommendations for GNU packages can be found
22d6c0b56eSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23d6c0b56eSmrg
24d6c0b56eSmrg   The `configure' shell script attempts to guess correct values for
25d6c0b56eSmrgvarious system-dependent variables used during compilation.  It uses
26d6c0b56eSmrgthose values to create a `Makefile' in each directory of the package.
27d6c0b56eSmrgIt may also create one or more `.h' files containing system-dependent
28d6c0b56eSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29d6c0b56eSmrgyou can run in the future to recreate the current configuration, and a
30d6c0b56eSmrgfile `config.log' containing compiler output (useful mainly for
31d6c0b56eSmrgdebugging `configure').
32d6c0b56eSmrg
33d6c0b56eSmrg   It can also use an optional file (typically called `config.cache'
34d6c0b56eSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35d6c0b56eSmrgthe results of its tests to speed up reconfiguring.  Caching is
36d6c0b56eSmrgdisabled by default to prevent problems with accidental use of stale
37d6c0b56eSmrgcache files.
38d6c0b56eSmrg
39d6c0b56eSmrg   If you need to do unusual things to compile the package, please try
40d6c0b56eSmrgto figure out how `configure' could check whether to do them, and mail
41d6c0b56eSmrgdiffs or instructions to the address given in the `README' so they can
42d6c0b56eSmrgbe considered for the next release.  If you are using the cache, and at
43d6c0b56eSmrgsome point `config.cache' contains results you don't want to keep, you
44d6c0b56eSmrgmay remove or edit it.
45d6c0b56eSmrg
46d6c0b56eSmrg   The file `configure.ac' (or `configure.in') is used to create
47d6c0b56eSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48d6c0b56eSmrgyou want to change it or regenerate `configure' using a newer version
49d6c0b56eSmrgof `autoconf'.
50d6c0b56eSmrg
51d6c0b56eSmrg   The simplest way to compile this package is:
52d6c0b56eSmrg
53d6c0b56eSmrg  1. `cd' to the directory containing the package's source code and type
54d6c0b56eSmrg     `./configure' to configure the package for your system.
55d6c0b56eSmrg
56d6c0b56eSmrg     Running `configure' might take a while.  While running, it prints
57d6c0b56eSmrg     some messages telling which features it is checking for.
58d6c0b56eSmrg
59d6c0b56eSmrg  2. Type `make' to compile the package.
60d6c0b56eSmrg
61d6c0b56eSmrg  3. Optionally, type `make check' to run any self-tests that come with
62d6c0b56eSmrg     the package, generally using the just-built uninstalled binaries.
63d6c0b56eSmrg
64d6c0b56eSmrg  4. Type `make install' to install the programs and any data files and
65d6c0b56eSmrg     documentation.  When installing into a prefix owned by root, it is
66d6c0b56eSmrg     recommended that the package be configured and built as a regular
67d6c0b56eSmrg     user, and only the `make install' phase executed with root
68d6c0b56eSmrg     privileges.
69d6c0b56eSmrg
70d6c0b56eSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71d6c0b56eSmrg     this time using the binaries in their final installed location.
72d6c0b56eSmrg     This target does not install anything.  Running this target as a
73d6c0b56eSmrg     regular user, particularly if the prior `make install' required
74d6c0b56eSmrg     root privileges, verifies that the installation completed
75d6c0b56eSmrg     correctly.
76d6c0b56eSmrg
77d6c0b56eSmrg  6. You can remove the program binaries and object files from the
78d6c0b56eSmrg     source code directory by typing `make clean'.  To also remove the
79d6c0b56eSmrg     files that `configure' created (so you can compile the package for
80d6c0b56eSmrg     a different kind of computer), type `make distclean'.  There is
81d6c0b56eSmrg     also a `make maintainer-clean' target, but that is intended mainly
82d6c0b56eSmrg     for the package's developers.  If you use it, you may have to get
83d6c0b56eSmrg     all sorts of other programs in order to regenerate files that came
84d6c0b56eSmrg     with the distribution.
85d6c0b56eSmrg
86d6c0b56eSmrg  7. Often, you can also type `make uninstall' to remove the installed
87d6c0b56eSmrg     files again.  In practice, not all packages have tested that
88d6c0b56eSmrg     uninstallation works correctly, even though it is required by the
89d6c0b56eSmrg     GNU Coding Standards.
90d6c0b56eSmrg
91d6c0b56eSmrg  8. Some packages, particularly those that use Automake, provide `make
92d6c0b56eSmrg     distcheck', which can by used by developers to test that all other
93d6c0b56eSmrg     targets like `make install' and `make uninstall' work correctly.
94d6c0b56eSmrg     This target is generally not run by end users.
95d6c0b56eSmrg
96d6c0b56eSmrgCompilers and Options
97d6c0b56eSmrg=====================
98d6c0b56eSmrg
99d6c0b56eSmrg   Some systems require unusual options for compilation or linking that
100d6c0b56eSmrgthe `configure' script does not know about.  Run `./configure --help'
101d6c0b56eSmrgfor details on some of the pertinent environment variables.
102d6c0b56eSmrg
103d6c0b56eSmrg   You can give `configure' initial values for configuration parameters
104d6c0b56eSmrgby setting variables in the command line or in the environment.  Here
105d6c0b56eSmrgis an example:
106d6c0b56eSmrg
107d6c0b56eSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108d6c0b56eSmrg
109d6c0b56eSmrg   *Note Defining Variables::, for more details.
110d6c0b56eSmrg
111d6c0b56eSmrgCompiling For Multiple Architectures
112d6c0b56eSmrg====================================
113d6c0b56eSmrg
114d6c0b56eSmrg   You can compile the package for more than one kind of computer at the
115d6c0b56eSmrgsame time, by placing the object files for each architecture in their
116d6c0b56eSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117d6c0b56eSmrgdirectory where you want the object files and executables to go and run
118d6c0b56eSmrgthe `configure' script.  `configure' automatically checks for the
119d6c0b56eSmrgsource code in the directory that `configure' is in and in `..'.  This
120d6c0b56eSmrgis known as a "VPATH" build.
121d6c0b56eSmrg
122d6c0b56eSmrg   With a non-GNU `make', it is safer to compile the package for one
123d6c0b56eSmrgarchitecture at a time in the source code directory.  After you have
124d6c0b56eSmrginstalled the package for one architecture, use `make distclean' before
125d6c0b56eSmrgreconfiguring for another architecture.
126d6c0b56eSmrg
127d6c0b56eSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128d6c0b56eSmrgexecutables that work on multiple system types--known as "fat" or
129d6c0b56eSmrg"universal" binaries--by specifying multiple `-arch' options to the
130d6c0b56eSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131d6c0b56eSmrgthis:
132d6c0b56eSmrg
133d6c0b56eSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134d6c0b56eSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135d6c0b56eSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136d6c0b56eSmrg
137d6c0b56eSmrg   This is not guaranteed to produce working output in all cases, you
138d6c0b56eSmrgmay have to build one architecture at a time and combine the results
139d6c0b56eSmrgusing the `lipo' tool if you have problems.
140d6c0b56eSmrg
141d6c0b56eSmrgInstallation Names
142d6c0b56eSmrg==================
143d6c0b56eSmrg
144d6c0b56eSmrg   By default, `make install' installs the package's commands under
145d6c0b56eSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146d6c0b56eSmrgcan specify an installation prefix other than `/usr/local' by giving
147d6c0b56eSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148d6c0b56eSmrgabsolute file name.
149d6c0b56eSmrg
150d6c0b56eSmrg   You can specify separate installation prefixes for
151d6c0b56eSmrgarchitecture-specific files and architecture-independent files.  If you
152d6c0b56eSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153d6c0b56eSmrgPREFIX as the prefix for installing programs and libraries.
154d6c0b56eSmrgDocumentation and other data files still use the regular prefix.
155d6c0b56eSmrg
156d6c0b56eSmrg   In addition, if you use an unusual directory layout you can give
157d6c0b56eSmrgoptions like `--bindir=DIR' to specify different values for particular
158d6c0b56eSmrgkinds of files.  Run `configure --help' for a list of the directories
159d6c0b56eSmrgyou can set and what kinds of files go in them.  In general, the
160d6c0b56eSmrgdefault for these options is expressed in terms of `${prefix}', so that
161d6c0b56eSmrgspecifying just `--prefix' will affect all of the other directory
162d6c0b56eSmrgspecifications that were not explicitly provided.
163d6c0b56eSmrg
164d6c0b56eSmrg   The most portable way to affect installation locations is to pass the
165d6c0b56eSmrgcorrect locations to `configure'; however, many packages provide one or
166d6c0b56eSmrgboth of the following shortcuts of passing variable assignments to the
167d6c0b56eSmrg`make install' command line to change installation locations without
168d6c0b56eSmrghaving to reconfigure or recompile.
169d6c0b56eSmrg
170d6c0b56eSmrg   The first method involves providing an override variable for each
171d6c0b56eSmrgaffected directory.  For example, `make install
172d6c0b56eSmrgprefix=/alternate/directory' will choose an alternate location for all
173d6c0b56eSmrgdirectory configuration variables that were expressed in terms of
174d6c0b56eSmrg`${prefix}'.  Any directories that were specified during `configure',
175d6c0b56eSmrgbut not in terms of `${prefix}', must each be overridden at install
176d6c0b56eSmrgtime for the entire installation to be relocated.  The approach of
177d6c0b56eSmrgmakefile variable overrides for each directory variable is required by
178d6c0b56eSmrgthe GNU Coding Standards, and ideally causes no recompilation.
179d6c0b56eSmrgHowever, some platforms have known limitations with the semantics of
180d6c0b56eSmrgshared libraries that end up requiring recompilation when using this
181d6c0b56eSmrgmethod, particularly noticeable in packages that use GNU Libtool.
182d6c0b56eSmrg
183d6c0b56eSmrg   The second method involves providing the `DESTDIR' variable.  For
184d6c0b56eSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
185d6c0b56eSmrg`/alternate/directory' before all installation names.  The approach of
186d6c0b56eSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187d6c0b56eSmrgdoes not work on platforms that have drive letters.  On the other hand,
188d6c0b56eSmrgit does better at avoiding recompilation issues, and works well even
189d6c0b56eSmrgwhen some directory options were not specified in terms of `${prefix}'
190d6c0b56eSmrgat `configure' time.
191d6c0b56eSmrg
192d6c0b56eSmrgOptional Features
193d6c0b56eSmrg=================
194d6c0b56eSmrg
195d6c0b56eSmrg   If the package supports it, you can cause programs to be installed
196d6c0b56eSmrgwith an extra prefix or suffix on their names by giving `configure' the
197d6c0b56eSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198d6c0b56eSmrg
199d6c0b56eSmrg   Some packages pay attention to `--enable-FEATURE' options to
200d6c0b56eSmrg`configure', where FEATURE indicates an optional part of the package.
201d6c0b56eSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202d6c0b56eSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203d6c0b56eSmrg`README' should mention any `--enable-' and `--with-' options that the
204d6c0b56eSmrgpackage recognizes.
205d6c0b56eSmrg
206d6c0b56eSmrg   For packages that use the X Window System, `configure' can usually
207d6c0b56eSmrgfind the X include and library files automatically, but if it doesn't,
208d6c0b56eSmrgyou can use the `configure' options `--x-includes=DIR' and
209d6c0b56eSmrg`--x-libraries=DIR' to specify their locations.
210d6c0b56eSmrg
211d6c0b56eSmrg   Some packages offer the ability to configure how verbose the
212d6c0b56eSmrgexecution of `make' will be.  For these packages, running `./configure
213d6c0b56eSmrg--enable-silent-rules' sets the default to minimal output, which can be
214d6c0b56eSmrgoverridden with `make V=1'; while running `./configure
215d6c0b56eSmrg--disable-silent-rules' sets the default to verbose, which can be
216d6c0b56eSmrgoverridden with `make V=0'.
217d6c0b56eSmrg
218d6c0b56eSmrgParticular systems
219d6c0b56eSmrg==================
220d6c0b56eSmrg
221d6c0b56eSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222d6c0b56eSmrgCC is not installed, it is recommended to use the following options in
223d6c0b56eSmrgorder to use an ANSI C compiler:
224d6c0b56eSmrg
225d6c0b56eSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226d6c0b56eSmrg
227d6c0b56eSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228d6c0b56eSmrg
229d6c0b56eSmrg   HP-UX `make' updates targets which have the same time stamps as
230d6c0b56eSmrgtheir prerequisites, which makes it generally unusable when shipped
231d6c0b56eSmrggenerated files such as `configure' are involved.  Use GNU `make'
232d6c0b56eSmrginstead.
233d6c0b56eSmrg
234d6c0b56eSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235d6c0b56eSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236d6c0b56eSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237d6c0b56eSmrgto try
238d6c0b56eSmrg
239d6c0b56eSmrg     ./configure CC="cc"
240d6c0b56eSmrg
241d6c0b56eSmrgand if that doesn't work, try
242d6c0b56eSmrg
243d6c0b56eSmrg     ./configure CC="cc -nodtk"
244d6c0b56eSmrg
245d6c0b56eSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246d6c0b56eSmrgdirectory contains several dysfunctional programs; working variants of
247d6c0b56eSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248d6c0b56eSmrgin your `PATH', put it _after_ `/usr/bin'.
249d6c0b56eSmrg
250d6c0b56eSmrg   On Haiku, software installed for all users goes in `/boot/common',
251d6c0b56eSmrgnot `/usr/local'.  It is recommended to use the following options:
252d6c0b56eSmrg
253d6c0b56eSmrg     ./configure --prefix=/boot/common
254d6c0b56eSmrg
255d6c0b56eSmrgSpecifying the System Type
256d6c0b56eSmrg==========================
257d6c0b56eSmrg
258d6c0b56eSmrg   There may be some features `configure' cannot figure out
259d6c0b56eSmrgautomatically, but needs to determine by the type of machine the package
260d6c0b56eSmrgwill run on.  Usually, assuming the package is built to be run on the
261d6c0b56eSmrg_same_ architectures, `configure' can figure that out, but if it prints
262d6c0b56eSmrga message saying it cannot guess the machine type, give it the
263d6c0b56eSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264d6c0b56eSmrgtype, such as `sun4', or a canonical name which has the form:
265d6c0b56eSmrg
266d6c0b56eSmrg     CPU-COMPANY-SYSTEM
267d6c0b56eSmrg
268d6c0b56eSmrgwhere SYSTEM can have one of these forms:
269d6c0b56eSmrg
270d6c0b56eSmrg     OS
271d6c0b56eSmrg     KERNEL-OS
272d6c0b56eSmrg
273d6c0b56eSmrg   See the file `config.sub' for the possible values of each field.  If
274d6c0b56eSmrg`config.sub' isn't included in this package, then this package doesn't
275d6c0b56eSmrgneed to know the machine type.
276d6c0b56eSmrg
277d6c0b56eSmrg   If you are _building_ compiler tools for cross-compiling, you should
278d6c0b56eSmrguse the option `--target=TYPE' to select the type of system they will
279d6c0b56eSmrgproduce code for.
280d6c0b56eSmrg
281d6c0b56eSmrg   If you want to _use_ a cross compiler, that generates code for a
282d6c0b56eSmrgplatform different from the build platform, you should specify the
283d6c0b56eSmrg"host" platform (i.e., that on which the generated programs will
284d6c0b56eSmrgeventually be run) with `--host=TYPE'.
285d6c0b56eSmrg
286d6c0b56eSmrgSharing Defaults
287d6c0b56eSmrg================
288d6c0b56eSmrg
289d6c0b56eSmrg   If you want to set default values for `configure' scripts to share,
290d6c0b56eSmrgyou can create a site shell script called `config.site' that gives
291d6c0b56eSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292d6c0b56eSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293d6c0b56eSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294d6c0b56eSmrg`CONFIG_SITE' environment variable to the location of the site script.
295d6c0b56eSmrgA warning: not all `configure' scripts look for a site script.
296d6c0b56eSmrg
297d6c0b56eSmrgDefining Variables
298d6c0b56eSmrg==================
299d6c0b56eSmrg
300d6c0b56eSmrg   Variables not defined in a site shell script can be set in the
301d6c0b56eSmrgenvironment passed to `configure'.  However, some packages may run
302d6c0b56eSmrgconfigure again during the build, and the customized values of these
303d6c0b56eSmrgvariables may be lost.  In order to avoid this problem, you should set
304d6c0b56eSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305d6c0b56eSmrg
306d6c0b56eSmrg     ./configure CC=/usr/local2/bin/gcc
307d6c0b56eSmrg
308d6c0b56eSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309d6c0b56eSmrgoverridden in the site shell script).
310d6c0b56eSmrg
311d6c0b56eSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312d6c0b56eSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313d6c0b56eSmrg
314d6c0b56eSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315d6c0b56eSmrg
316d6c0b56eSmrg`configure' Invocation
317d6c0b56eSmrg======================
318d6c0b56eSmrg
319d6c0b56eSmrg   `configure' recognizes the following options to control how it
320d6c0b56eSmrgoperates.
321d6c0b56eSmrg
322d6c0b56eSmrg`--help'
323d6c0b56eSmrg`-h'
324d6c0b56eSmrg     Print a summary of all of the options to `configure', and exit.
325d6c0b56eSmrg
326d6c0b56eSmrg`--help=short'
327d6c0b56eSmrg`--help=recursive'
328d6c0b56eSmrg     Print a summary of the options unique to this package's
329d6c0b56eSmrg     `configure', and exit.  The `short' variant lists options used
330d6c0b56eSmrg     only in the top level, while the `recursive' variant lists options
331d6c0b56eSmrg     also present in any nested packages.
332d6c0b56eSmrg
333d6c0b56eSmrg`--version'
334d6c0b56eSmrg`-V'
335d6c0b56eSmrg     Print the version of Autoconf used to generate the `configure'
336d6c0b56eSmrg     script, and exit.
337d6c0b56eSmrg
338d6c0b56eSmrg`--cache-file=FILE'
339d6c0b56eSmrg     Enable the cache: use and save the results of the tests in FILE,
340d6c0b56eSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341d6c0b56eSmrg     disable caching.
342d6c0b56eSmrg
343d6c0b56eSmrg`--config-cache'
344d6c0b56eSmrg`-C'
345d6c0b56eSmrg     Alias for `--cache-file=config.cache'.
346d6c0b56eSmrg
347d6c0b56eSmrg`--quiet'
348d6c0b56eSmrg`--silent'
349d6c0b56eSmrg`-q'
350d6c0b56eSmrg     Do not print messages saying which checks are being made.  To
351d6c0b56eSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352d6c0b56eSmrg     messages will still be shown).
353d6c0b56eSmrg
354d6c0b56eSmrg`--srcdir=DIR'
355d6c0b56eSmrg     Look for the package's source code in directory DIR.  Usually
356d6c0b56eSmrg     `configure' can determine that directory automatically.
357d6c0b56eSmrg
358d6c0b56eSmrg`--prefix=DIR'
359d6c0b56eSmrg     Use DIR as the installation prefix.  *note Installation Names::
360d6c0b56eSmrg     for more details, including other options available for fine-tuning
361d6c0b56eSmrg     the installation locations.
362d6c0b56eSmrg
363d6c0b56eSmrg`--no-create'
364d6c0b56eSmrg`-n'
365d6c0b56eSmrg     Run the configure checks, but stop before creating any output
366d6c0b56eSmrg     files.
367d6c0b56eSmrg
368d6c0b56eSmrg`configure' also accepts some other, not widely useful, options.  Run
369d6c0b56eSmrg`configure --help' for more details.
370d6c0b56eSmrg
371