1d7ffce2aSmrgInstallation Instructions
2d7ffce2aSmrg*************************
3d7ffce2aSmrg
441fe0c2aSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
541fe0c2aSmrgInc.
6d7ffce2aSmrg
741fe0c2aSmrg   Copying and distribution of this file, with or without modification,
841fe0c2aSmrgare permitted in any medium without royalty provided the copyright
941fe0c2aSmrgnotice and this notice are preserved.  This file is offered as-is,
1041fe0c2aSmrgwithout warranty of any kind.
11d7ffce2aSmrg
12d7ffce2aSmrgBasic Installation
13d7ffce2aSmrg==================
14d7ffce2aSmrg
15d7ffce2aSmrg   Briefly, the shell commands `./configure; make; make install' should
16d7ffce2aSmrgconfigure, build, and install this package.  The following
17d7ffce2aSmrgmore-detailed instructions are generic; see the `README' file for
1841fe0c2aSmrginstructions specific to this package.  Some packages provide this
1941fe0c2aSmrg`INSTALL' file but do not implement all of the features documented
2041fe0c2aSmrgbelow.  The lack of an optional feature in a given package is not
2141fe0c2aSmrgnecessarily a bug.  More recommendations for GNU packages can be found
2241fe0c2aSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23d7ffce2aSmrg
24d7ffce2aSmrg   The `configure' shell script attempts to guess correct values for
25d7ffce2aSmrgvarious system-dependent variables used during compilation.  It uses
26d7ffce2aSmrgthose values to create a `Makefile' in each directory of the package.
27d7ffce2aSmrgIt may also create one or more `.h' files containing system-dependent
28d7ffce2aSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29d7ffce2aSmrgyou can run in the future to recreate the current configuration, and a
30d7ffce2aSmrgfile `config.log' containing compiler output (useful mainly for
31d7ffce2aSmrgdebugging `configure').
32d7ffce2aSmrg
33d7ffce2aSmrg   It can also use an optional file (typically called `config.cache'
34d7ffce2aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35d7ffce2aSmrgthe results of its tests to speed up reconfiguring.  Caching is
36d7ffce2aSmrgdisabled by default to prevent problems with accidental use of stale
37d7ffce2aSmrgcache files.
38d7ffce2aSmrg
39d7ffce2aSmrg   If you need to do unusual things to compile the package, please try
40d7ffce2aSmrgto figure out how `configure' could check whether to do them, and mail
41d7ffce2aSmrgdiffs or instructions to the address given in the `README' so they can
42d7ffce2aSmrgbe considered for the next release.  If you are using the cache, and at
43d7ffce2aSmrgsome point `config.cache' contains results you don't want to keep, you
44d7ffce2aSmrgmay remove or edit it.
45d7ffce2aSmrg
46d7ffce2aSmrg   The file `configure.ac' (or `configure.in') is used to create
47d7ffce2aSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48d7ffce2aSmrgyou want to change it or regenerate `configure' using a newer version
49d7ffce2aSmrgof `autoconf'.
50d7ffce2aSmrg
5141fe0c2aSmrg   The simplest way to compile this package is:
52d7ffce2aSmrg
53d7ffce2aSmrg  1. `cd' to the directory containing the package's source code and type
54d7ffce2aSmrg     `./configure' to configure the package for your system.
55d7ffce2aSmrg
56d7ffce2aSmrg     Running `configure' might take a while.  While running, it prints
57d7ffce2aSmrg     some messages telling which features it is checking for.
58d7ffce2aSmrg
59d7ffce2aSmrg  2. Type `make' to compile the package.
60d7ffce2aSmrg
61d7ffce2aSmrg  3. Optionally, type `make check' to run any self-tests that come with
6241fe0c2aSmrg     the package, generally using the just-built uninstalled binaries.
63d7ffce2aSmrg
64d7ffce2aSmrg  4. Type `make install' to install the programs and any data files and
6541fe0c2aSmrg     documentation.  When installing into a prefix owned by root, it is
6641fe0c2aSmrg     recommended that the package be configured and built as a regular
6741fe0c2aSmrg     user, and only the `make install' phase executed with root
6841fe0c2aSmrg     privileges.
6941fe0c2aSmrg
7041fe0c2aSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7141fe0c2aSmrg     this time using the binaries in their final installed location.
7241fe0c2aSmrg     This target does not install anything.  Running this target as a
7341fe0c2aSmrg     regular user, particularly if the prior `make install' required
7441fe0c2aSmrg     root privileges, verifies that the installation completed
7541fe0c2aSmrg     correctly.
7641fe0c2aSmrg
7741fe0c2aSmrg  6. You can remove the program binaries and object files from the
78d7ffce2aSmrg     source code directory by typing `make clean'.  To also remove the
79d7ffce2aSmrg     files that `configure' created (so you can compile the package for
80d7ffce2aSmrg     a different kind of computer), type `make distclean'.  There is
81d7ffce2aSmrg     also a `make maintainer-clean' target, but that is intended mainly
82d7ffce2aSmrg     for the package's developers.  If you use it, you may have to get
83d7ffce2aSmrg     all sorts of other programs in order to regenerate files that came
84d7ffce2aSmrg     with the distribution.
85d7ffce2aSmrg
8641fe0c2aSmrg  7. Often, you can also type `make uninstall' to remove the installed
8741fe0c2aSmrg     files again.  In practice, not all packages have tested that
8841fe0c2aSmrg     uninstallation works correctly, even though it is required by the
8941fe0c2aSmrg     GNU Coding Standards.
9041fe0c2aSmrg
9141fe0c2aSmrg  8. Some packages, particularly those that use Automake, provide `make
9241fe0c2aSmrg     distcheck', which can by used by developers to test that all other
9341fe0c2aSmrg     targets like `make install' and `make uninstall' work correctly.
9441fe0c2aSmrg     This target is generally not run by end users.
95d7ffce2aSmrg
96d7ffce2aSmrgCompilers and Options
97d7ffce2aSmrg=====================
98d7ffce2aSmrg
99d7ffce2aSmrg   Some systems require unusual options for compilation or linking that
100d7ffce2aSmrgthe `configure' script does not know about.  Run `./configure --help'
101d7ffce2aSmrgfor details on some of the pertinent environment variables.
102d7ffce2aSmrg
103d7ffce2aSmrg   You can give `configure' initial values for configuration parameters
104d7ffce2aSmrgby setting variables in the command line or in the environment.  Here
105d7ffce2aSmrgis an example:
106d7ffce2aSmrg
107d7ffce2aSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108d7ffce2aSmrg
109d7ffce2aSmrg   *Note Defining Variables::, for more details.
110d7ffce2aSmrg
111d7ffce2aSmrgCompiling For Multiple Architectures
112d7ffce2aSmrg====================================
113d7ffce2aSmrg
114d7ffce2aSmrg   You can compile the package for more than one kind of computer at the
115d7ffce2aSmrgsame time, by placing the object files for each architecture in their
116d7ffce2aSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117d7ffce2aSmrgdirectory where you want the object files and executables to go and run
118d7ffce2aSmrgthe `configure' script.  `configure' automatically checks for the
11941fe0c2aSmrgsource code in the directory that `configure' is in and in `..'.  This
12041fe0c2aSmrgis known as a "VPATH" build.
121d7ffce2aSmrg
122d7ffce2aSmrg   With a non-GNU `make', it is safer to compile the package for one
123d7ffce2aSmrgarchitecture at a time in the source code directory.  After you have
124d7ffce2aSmrginstalled the package for one architecture, use `make distclean' before
125d7ffce2aSmrgreconfiguring for another architecture.
126d7ffce2aSmrg
127d7ffce2aSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128d7ffce2aSmrgexecutables that work on multiple system types--known as "fat" or
129d7ffce2aSmrg"universal" binaries--by specifying multiple `-arch' options to the
130d7ffce2aSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131d7ffce2aSmrgthis:
132d7ffce2aSmrg
133d7ffce2aSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134d7ffce2aSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135d7ffce2aSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136d7ffce2aSmrg
137d7ffce2aSmrg   This is not guaranteed to produce working output in all cases, you
138d7ffce2aSmrgmay have to build one architecture at a time and combine the results
139d7ffce2aSmrgusing the `lipo' tool if you have problems.
140d7ffce2aSmrg
141d7ffce2aSmrgInstallation Names
142d7ffce2aSmrg==================
143d7ffce2aSmrg
144d7ffce2aSmrg   By default, `make install' installs the package's commands under
145d7ffce2aSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146d7ffce2aSmrgcan specify an installation prefix other than `/usr/local' by giving
14741fe0c2aSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14841fe0c2aSmrgabsolute file name.
149d7ffce2aSmrg
150d7ffce2aSmrg   You can specify separate installation prefixes for
151d7ffce2aSmrgarchitecture-specific files and architecture-independent files.  If you
152d7ffce2aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153d7ffce2aSmrgPREFIX as the prefix for installing programs and libraries.
154d7ffce2aSmrgDocumentation and other data files still use the regular prefix.
155d7ffce2aSmrg
156d7ffce2aSmrg   In addition, if you use an unusual directory layout you can give
157d7ffce2aSmrgoptions like `--bindir=DIR' to specify different values for particular
158d7ffce2aSmrgkinds of files.  Run `configure --help' for a list of the directories
15941fe0c2aSmrgyou can set and what kinds of files go in them.  In general, the
16041fe0c2aSmrgdefault for these options is expressed in terms of `${prefix}', so that
16141fe0c2aSmrgspecifying just `--prefix' will affect all of the other directory
16241fe0c2aSmrgspecifications that were not explicitly provided.
16341fe0c2aSmrg
16441fe0c2aSmrg   The most portable way to affect installation locations is to pass the
16541fe0c2aSmrgcorrect locations to `configure'; however, many packages provide one or
16641fe0c2aSmrgboth of the following shortcuts of passing variable assignments to the
16741fe0c2aSmrg`make install' command line to change installation locations without
16841fe0c2aSmrghaving to reconfigure or recompile.
16941fe0c2aSmrg
17041fe0c2aSmrg   The first method involves providing an override variable for each
17141fe0c2aSmrgaffected directory.  For example, `make install
17241fe0c2aSmrgprefix=/alternate/directory' will choose an alternate location for all
17341fe0c2aSmrgdirectory configuration variables that were expressed in terms of
17441fe0c2aSmrg`${prefix}'.  Any directories that were specified during `configure',
17541fe0c2aSmrgbut not in terms of `${prefix}', must each be overridden at install
17641fe0c2aSmrgtime for the entire installation to be relocated.  The approach of
17741fe0c2aSmrgmakefile variable overrides for each directory variable is required by
17841fe0c2aSmrgthe GNU Coding Standards, and ideally causes no recompilation.
17941fe0c2aSmrgHowever, some platforms have known limitations with the semantics of
18041fe0c2aSmrgshared libraries that end up requiring recompilation when using this
18141fe0c2aSmrgmethod, particularly noticeable in packages that use GNU Libtool.
18241fe0c2aSmrg
18341fe0c2aSmrg   The second method involves providing the `DESTDIR' variable.  For
18441fe0c2aSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
18541fe0c2aSmrg`/alternate/directory' before all installation names.  The approach of
18641fe0c2aSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18741fe0c2aSmrgdoes not work on platforms that have drive letters.  On the other hand,
18841fe0c2aSmrgit does better at avoiding recompilation issues, and works well even
18941fe0c2aSmrgwhen some directory options were not specified in terms of `${prefix}'
19041fe0c2aSmrgat `configure' time.
19141fe0c2aSmrg
19241fe0c2aSmrgOptional Features
19341fe0c2aSmrg=================
194d7ffce2aSmrg
195d7ffce2aSmrg   If the package supports it, you can cause programs to be installed
196d7ffce2aSmrgwith an extra prefix or suffix on their names by giving `configure' the
197d7ffce2aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198d7ffce2aSmrg
199d7ffce2aSmrg   Some packages pay attention to `--enable-FEATURE' options to
200d7ffce2aSmrg`configure', where FEATURE indicates an optional part of the package.
201d7ffce2aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202d7ffce2aSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203d7ffce2aSmrg`README' should mention any `--enable-' and `--with-' options that the
204d7ffce2aSmrgpackage recognizes.
205d7ffce2aSmrg
206d7ffce2aSmrg   For packages that use the X Window System, `configure' can usually
207d7ffce2aSmrgfind the X include and library files automatically, but if it doesn't,
208d7ffce2aSmrgyou can use the `configure' options `--x-includes=DIR' and
209d7ffce2aSmrg`--x-libraries=DIR' to specify their locations.
210d7ffce2aSmrg
21141fe0c2aSmrg   Some packages offer the ability to configure how verbose the
21241fe0c2aSmrgexecution of `make' will be.  For these packages, running `./configure
21341fe0c2aSmrg--enable-silent-rules' sets the default to minimal output, which can be
21441fe0c2aSmrgoverridden with `make V=1'; while running `./configure
21541fe0c2aSmrg--disable-silent-rules' sets the default to verbose, which can be
21641fe0c2aSmrgoverridden with `make V=0'.
21741fe0c2aSmrg
218d7ffce2aSmrgParticular systems
219d7ffce2aSmrg==================
220d7ffce2aSmrg
221d7ffce2aSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222d7ffce2aSmrgCC is not installed, it is recommended to use the following options in
223d7ffce2aSmrgorder to use an ANSI C compiler:
224d7ffce2aSmrg
22541fe0c2aSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226d7ffce2aSmrg
227d7ffce2aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228d7ffce2aSmrg
22941fe0c2aSmrg   HP-UX `make' updates targets which have the same time stamps as
23041fe0c2aSmrgtheir prerequisites, which makes it generally unusable when shipped
23141fe0c2aSmrggenerated files such as `configure' are involved.  Use GNU `make'
23241fe0c2aSmrginstead.
23341fe0c2aSmrg
234d7ffce2aSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235d7ffce2aSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236d7ffce2aSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237d7ffce2aSmrgto try
238d7ffce2aSmrg
239d7ffce2aSmrg     ./configure CC="cc"
240d7ffce2aSmrg
241d7ffce2aSmrgand if that doesn't work, try
242d7ffce2aSmrg
243d7ffce2aSmrg     ./configure CC="cc -nodtk"
244d7ffce2aSmrg
24541fe0c2aSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24641fe0c2aSmrgdirectory contains several dysfunctional programs; working variants of
24741fe0c2aSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24841fe0c2aSmrgin your `PATH', put it _after_ `/usr/bin'.
24941fe0c2aSmrg
25041fe0c2aSmrg   On Haiku, software installed for all users goes in `/boot/common',
25141fe0c2aSmrgnot `/usr/local'.  It is recommended to use the following options:
25241fe0c2aSmrg
25341fe0c2aSmrg     ./configure --prefix=/boot/common
25441fe0c2aSmrg
255d7ffce2aSmrgSpecifying the System Type
256d7ffce2aSmrg==========================
257d7ffce2aSmrg
258d7ffce2aSmrg   There may be some features `configure' cannot figure out
259d7ffce2aSmrgautomatically, but needs to determine by the type of machine the package
260d7ffce2aSmrgwill run on.  Usually, assuming the package is built to be run on the
261d7ffce2aSmrg_same_ architectures, `configure' can figure that out, but if it prints
262d7ffce2aSmrga message saying it cannot guess the machine type, give it the
263d7ffce2aSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264d7ffce2aSmrgtype, such as `sun4', or a canonical name which has the form:
265d7ffce2aSmrg
266d7ffce2aSmrg     CPU-COMPANY-SYSTEM
267d7ffce2aSmrg
268d7ffce2aSmrgwhere SYSTEM can have one of these forms:
269d7ffce2aSmrg
27041fe0c2aSmrg     OS
27141fe0c2aSmrg     KERNEL-OS
272d7ffce2aSmrg
273d7ffce2aSmrg   See the file `config.sub' for the possible values of each field.  If
274d7ffce2aSmrg`config.sub' isn't included in this package, then this package doesn't
275d7ffce2aSmrgneed to know the machine type.
276d7ffce2aSmrg
277d7ffce2aSmrg   If you are _building_ compiler tools for cross-compiling, you should
278d7ffce2aSmrguse the option `--target=TYPE' to select the type of system they will
279d7ffce2aSmrgproduce code for.
280d7ffce2aSmrg
281d7ffce2aSmrg   If you want to _use_ a cross compiler, that generates code for a
282d7ffce2aSmrgplatform different from the build platform, you should specify the
283d7ffce2aSmrg"host" platform (i.e., that on which the generated programs will
284d7ffce2aSmrgeventually be run) with `--host=TYPE'.
285d7ffce2aSmrg
286d7ffce2aSmrgSharing Defaults
287d7ffce2aSmrg================
288d7ffce2aSmrg
289d7ffce2aSmrg   If you want to set default values for `configure' scripts to share,
290d7ffce2aSmrgyou can create a site shell script called `config.site' that gives
291d7ffce2aSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292d7ffce2aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293d7ffce2aSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294d7ffce2aSmrg`CONFIG_SITE' environment variable to the location of the site script.
295d7ffce2aSmrgA warning: not all `configure' scripts look for a site script.
296d7ffce2aSmrg
297d7ffce2aSmrgDefining Variables
298d7ffce2aSmrg==================
299d7ffce2aSmrg
300d7ffce2aSmrg   Variables not defined in a site shell script can be set in the
301d7ffce2aSmrgenvironment passed to `configure'.  However, some packages may run
302d7ffce2aSmrgconfigure again during the build, and the customized values of these
303d7ffce2aSmrgvariables may be lost.  In order to avoid this problem, you should set
304d7ffce2aSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305d7ffce2aSmrg
306d7ffce2aSmrg     ./configure CC=/usr/local2/bin/gcc
307d7ffce2aSmrg
308d7ffce2aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309d7ffce2aSmrgoverridden in the site shell script).
310d7ffce2aSmrg
311d7ffce2aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312d7ffce2aSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313d7ffce2aSmrg
314d7ffce2aSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315d7ffce2aSmrg
316d7ffce2aSmrg`configure' Invocation
317d7ffce2aSmrg======================
318d7ffce2aSmrg
319d7ffce2aSmrg   `configure' recognizes the following options to control how it
320d7ffce2aSmrgoperates.
321d7ffce2aSmrg
322d7ffce2aSmrg`--help'
323d7ffce2aSmrg`-h'
324d7ffce2aSmrg     Print a summary of all of the options to `configure', and exit.
325d7ffce2aSmrg
326d7ffce2aSmrg`--help=short'
327d7ffce2aSmrg`--help=recursive'
328d7ffce2aSmrg     Print a summary of the options unique to this package's
329d7ffce2aSmrg     `configure', and exit.  The `short' variant lists options used
330d7ffce2aSmrg     only in the top level, while the `recursive' variant lists options
331d7ffce2aSmrg     also present in any nested packages.
332d7ffce2aSmrg
333d7ffce2aSmrg`--version'
334d7ffce2aSmrg`-V'
335d7ffce2aSmrg     Print the version of Autoconf used to generate the `configure'
336d7ffce2aSmrg     script, and exit.
337d7ffce2aSmrg
338d7ffce2aSmrg`--cache-file=FILE'
339d7ffce2aSmrg     Enable the cache: use and save the results of the tests in FILE,
340d7ffce2aSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341d7ffce2aSmrg     disable caching.
342d7ffce2aSmrg
343d7ffce2aSmrg`--config-cache'
344d7ffce2aSmrg`-C'
345d7ffce2aSmrg     Alias for `--cache-file=config.cache'.
346d7ffce2aSmrg
347d7ffce2aSmrg`--quiet'
348d7ffce2aSmrg`--silent'
349d7ffce2aSmrg`-q'
350d7ffce2aSmrg     Do not print messages saying which checks are being made.  To
351d7ffce2aSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352d7ffce2aSmrg     messages will still be shown).
353d7ffce2aSmrg
354d7ffce2aSmrg`--srcdir=DIR'
355d7ffce2aSmrg     Look for the package's source code in directory DIR.  Usually
356d7ffce2aSmrg     `configure' can determine that directory automatically.
357d7ffce2aSmrg
358d7ffce2aSmrg`--prefix=DIR'
35941fe0c2aSmrg     Use DIR as the installation prefix.  *note Installation Names::
360d7ffce2aSmrg     for more details, including other options available for fine-tuning
361d7ffce2aSmrg     the installation locations.
362d7ffce2aSmrg
363d7ffce2aSmrg`--no-create'
364d7ffce2aSmrg`-n'
365d7ffce2aSmrg     Run the configure checks, but stop before creating any output
366d7ffce2aSmrg     files.
367d7ffce2aSmrg
368d7ffce2aSmrg`configure' also accepts some other, not widely useful, options.  Run
369d7ffce2aSmrg`configure --help' for more details.
370d7ffce2aSmrg
371