1ba064abeSmrgInstallation Instructions
2ba064abeSmrg*************************
3ba064abeSmrg
458deefebSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
558deefebSmrgInc.
6ba064abeSmrg
758deefebSmrg   Copying and distribution of this file, with or without modification,
858deefebSmrgare permitted in any medium without royalty provided the copyright
958deefebSmrgnotice and this notice are preserved.  This file is offered as-is,
1058deefebSmrgwithout warranty of any kind.
11ba064abeSmrg
12ba064abeSmrgBasic Installation
13ba064abeSmrg==================
14ba064abeSmrg
15ba064abeSmrg   Briefly, the shell commands `./configure; make; make install' should
16ba064abeSmrgconfigure, build, and install this package.  The following
17ba064abeSmrgmore-detailed instructions are generic; see the `README' file for
1858deefebSmrginstructions specific to this package.  Some packages provide this
1958deefebSmrg`INSTALL' file but do not implement all of the features documented
2058deefebSmrgbelow.  The lack of an optional feature in a given package is not
2158deefebSmrgnecessarily a bug.  More recommendations for GNU packages can be found
2258deefebSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23ba064abeSmrg
24ba064abeSmrg   The `configure' shell script attempts to guess correct values for
25ba064abeSmrgvarious system-dependent variables used during compilation.  It uses
26ba064abeSmrgthose values to create a `Makefile' in each directory of the package.
27ba064abeSmrgIt may also create one or more `.h' files containing system-dependent
28ba064abeSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29ba064abeSmrgyou can run in the future to recreate the current configuration, and a
30ba064abeSmrgfile `config.log' containing compiler output (useful mainly for
31ba064abeSmrgdebugging `configure').
32ba064abeSmrg
33ba064abeSmrg   It can also use an optional file (typically called `config.cache'
34ba064abeSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35ba064abeSmrgthe results of its tests to speed up reconfiguring.  Caching is
36ba064abeSmrgdisabled by default to prevent problems with accidental use of stale
37ba064abeSmrgcache files.
38ba064abeSmrg
39ba064abeSmrg   If you need to do unusual things to compile the package, please try
40ba064abeSmrgto figure out how `configure' could check whether to do them, and mail
41ba064abeSmrgdiffs or instructions to the address given in the `README' so they can
42ba064abeSmrgbe considered for the next release.  If you are using the cache, and at
43ba064abeSmrgsome point `config.cache' contains results you don't want to keep, you
44ba064abeSmrgmay remove or edit it.
45ba064abeSmrg
46ba064abeSmrg   The file `configure.ac' (or `configure.in') is used to create
47ba064abeSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48ba064abeSmrgyou want to change it or regenerate `configure' using a newer version
49ba064abeSmrgof `autoconf'.
50ba064abeSmrg
5158deefebSmrg   The simplest way to compile this package is:
52ba064abeSmrg
53ba064abeSmrg  1. `cd' to the directory containing the package's source code and type
54ba064abeSmrg     `./configure' to configure the package for your system.
55ba064abeSmrg
56ba064abeSmrg     Running `configure' might take a while.  While running, it prints
57ba064abeSmrg     some messages telling which features it is checking for.
58ba064abeSmrg
59ba064abeSmrg  2. Type `make' to compile the package.
60ba064abeSmrg
61ba064abeSmrg  3. Optionally, type `make check' to run any self-tests that come with
6258deefebSmrg     the package, generally using the just-built uninstalled binaries.
63ba064abeSmrg
64ba064abeSmrg  4. Type `make install' to install the programs and any data files and
6558deefebSmrg     documentation.  When installing into a prefix owned by root, it is
6658deefebSmrg     recommended that the package be configured and built as a regular
6758deefebSmrg     user, and only the `make install' phase executed with root
6858deefebSmrg     privileges.
6958deefebSmrg
7058deefebSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7158deefebSmrg     this time using the binaries in their final installed location.
7258deefebSmrg     This target does not install anything.  Running this target as a
7358deefebSmrg     regular user, particularly if the prior `make install' required
7458deefebSmrg     root privileges, verifies that the installation completed
7558deefebSmrg     correctly.
7658deefebSmrg
7758deefebSmrg  6. You can remove the program binaries and object files from the
78ba064abeSmrg     source code directory by typing `make clean'.  To also remove the
79ba064abeSmrg     files that `configure' created (so you can compile the package for
80ba064abeSmrg     a different kind of computer), type `make distclean'.  There is
81ba064abeSmrg     also a `make maintainer-clean' target, but that is intended mainly
82ba064abeSmrg     for the package's developers.  If you use it, you may have to get
83ba064abeSmrg     all sorts of other programs in order to regenerate files that came
84ba064abeSmrg     with the distribution.
85ba064abeSmrg
8658deefebSmrg  7. Often, you can also type `make uninstall' to remove the installed
8758deefebSmrg     files again.  In practice, not all packages have tested that
8858deefebSmrg     uninstallation works correctly, even though it is required by the
8958deefebSmrg     GNU Coding Standards.
9058deefebSmrg
9158deefebSmrg  8. Some packages, particularly those that use Automake, provide `make
9258deefebSmrg     distcheck', which can by used by developers to test that all other
9358deefebSmrg     targets like `make install' and `make uninstall' work correctly.
9458deefebSmrg     This target is generally not run by end users.
95ba064abeSmrg
96ba064abeSmrgCompilers and Options
97ba064abeSmrg=====================
98ba064abeSmrg
99ba064abeSmrg   Some systems require unusual options for compilation or linking that
100ba064abeSmrgthe `configure' script does not know about.  Run `./configure --help'
101ba064abeSmrgfor details on some of the pertinent environment variables.
102ba064abeSmrg
103ba064abeSmrg   You can give `configure' initial values for configuration parameters
104ba064abeSmrgby setting variables in the command line or in the environment.  Here
105ba064abeSmrgis an example:
106ba064abeSmrg
107ba064abeSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108ba064abeSmrg
109ba064abeSmrg   *Note Defining Variables::, for more details.
110ba064abeSmrg
111ba064abeSmrgCompiling For Multiple Architectures
112ba064abeSmrg====================================
113ba064abeSmrg
114ba064abeSmrg   You can compile the package for more than one kind of computer at the
115ba064abeSmrgsame time, by placing the object files for each architecture in their
116ba064abeSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117ba064abeSmrgdirectory where you want the object files and executables to go and run
118ba064abeSmrgthe `configure' script.  `configure' automatically checks for the
11958deefebSmrgsource code in the directory that `configure' is in and in `..'.  This
12058deefebSmrgis known as a "VPATH" build.
121ba064abeSmrg
122ba064abeSmrg   With a non-GNU `make', it is safer to compile the package for one
123ba064abeSmrgarchitecture at a time in the source code directory.  After you have
124ba064abeSmrginstalled the package for one architecture, use `make distclean' before
125ba064abeSmrgreconfiguring for another architecture.
126ba064abeSmrg
127ba064abeSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128ba064abeSmrgexecutables that work on multiple system types--known as "fat" or
129ba064abeSmrg"universal" binaries--by specifying multiple `-arch' options to the
130ba064abeSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131ba064abeSmrgthis:
132ba064abeSmrg
133ba064abeSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134ba064abeSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135ba064abeSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136ba064abeSmrg
137ba064abeSmrg   This is not guaranteed to produce working output in all cases, you
138ba064abeSmrgmay have to build one architecture at a time and combine the results
139ba064abeSmrgusing the `lipo' tool if you have problems.
140ba064abeSmrg
141ba064abeSmrgInstallation Names
142ba064abeSmrg==================
143ba064abeSmrg
144ba064abeSmrg   By default, `make install' installs the package's commands under
145ba064abeSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146ba064abeSmrgcan specify an installation prefix other than `/usr/local' by giving
14758deefebSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14858deefebSmrgabsolute file name.
149ba064abeSmrg
150ba064abeSmrg   You can specify separate installation prefixes for
151ba064abeSmrgarchitecture-specific files and architecture-independent files.  If you
152ba064abeSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153ba064abeSmrgPREFIX as the prefix for installing programs and libraries.
154ba064abeSmrgDocumentation and other data files still use the regular prefix.
155ba064abeSmrg
156ba064abeSmrg   In addition, if you use an unusual directory layout you can give
157ba064abeSmrgoptions like `--bindir=DIR' to specify different values for particular
158ba064abeSmrgkinds of files.  Run `configure --help' for a list of the directories
15958deefebSmrgyou can set and what kinds of files go in them.  In general, the
16058deefebSmrgdefault for these options is expressed in terms of `${prefix}', so that
16158deefebSmrgspecifying just `--prefix' will affect all of the other directory
16258deefebSmrgspecifications that were not explicitly provided.
16358deefebSmrg
16458deefebSmrg   The most portable way to affect installation locations is to pass the
16558deefebSmrgcorrect locations to `configure'; however, many packages provide one or
16658deefebSmrgboth of the following shortcuts of passing variable assignments to the
16758deefebSmrg`make install' command line to change installation locations without
16858deefebSmrghaving to reconfigure or recompile.
16958deefebSmrg
17058deefebSmrg   The first method involves providing an override variable for each
17158deefebSmrgaffected directory.  For example, `make install
17258deefebSmrgprefix=/alternate/directory' will choose an alternate location for all
17358deefebSmrgdirectory configuration variables that were expressed in terms of
17458deefebSmrg`${prefix}'.  Any directories that were specified during `configure',
17558deefebSmrgbut not in terms of `${prefix}', must each be overridden at install
17658deefebSmrgtime for the entire installation to be relocated.  The approach of
17758deefebSmrgmakefile variable overrides for each directory variable is required by
17858deefebSmrgthe GNU Coding Standards, and ideally causes no recompilation.
17958deefebSmrgHowever, some platforms have known limitations with the semantics of
18058deefebSmrgshared libraries that end up requiring recompilation when using this
18158deefebSmrgmethod, particularly noticeable in packages that use GNU Libtool.
18258deefebSmrg
18358deefebSmrg   The second method involves providing the `DESTDIR' variable.  For
18458deefebSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
18558deefebSmrg`/alternate/directory' before all installation names.  The approach of
18658deefebSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18758deefebSmrgdoes not work on platforms that have drive letters.  On the other hand,
18858deefebSmrgit does better at avoiding recompilation issues, and works well even
18958deefebSmrgwhen some directory options were not specified in terms of `${prefix}'
19058deefebSmrgat `configure' time.
19158deefebSmrg
19258deefebSmrgOptional Features
19358deefebSmrg=================
194ba064abeSmrg
195ba064abeSmrg   If the package supports it, you can cause programs to be installed
196ba064abeSmrgwith an extra prefix or suffix on their names by giving `configure' the
197ba064abeSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198ba064abeSmrg
199ba064abeSmrg   Some packages pay attention to `--enable-FEATURE' options to
200ba064abeSmrg`configure', where FEATURE indicates an optional part of the package.
201ba064abeSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202ba064abeSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203ba064abeSmrg`README' should mention any `--enable-' and `--with-' options that the
204ba064abeSmrgpackage recognizes.
205ba064abeSmrg
206ba064abeSmrg   For packages that use the X Window System, `configure' can usually
207ba064abeSmrgfind the X include and library files automatically, but if it doesn't,
208ba064abeSmrgyou can use the `configure' options `--x-includes=DIR' and
209ba064abeSmrg`--x-libraries=DIR' to specify their locations.
210ba064abeSmrg
21158deefebSmrg   Some packages offer the ability to configure how verbose the
21258deefebSmrgexecution of `make' will be.  For these packages, running `./configure
21358deefebSmrg--enable-silent-rules' sets the default to minimal output, which can be
21458deefebSmrgoverridden with `make V=1'; while running `./configure
21558deefebSmrg--disable-silent-rules' sets the default to verbose, which can be
21658deefebSmrgoverridden with `make V=0'.
21758deefebSmrg
218ba064abeSmrgParticular systems
219ba064abeSmrg==================
220ba064abeSmrg
221ba064abeSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222ba064abeSmrgCC is not installed, it is recommended to use the following options in
223ba064abeSmrgorder to use an ANSI C compiler:
224ba064abeSmrg
22558deefebSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226ba064abeSmrg
227ba064abeSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228ba064abeSmrg
22958deefebSmrg   HP-UX `make' updates targets which have the same time stamps as
23058deefebSmrgtheir prerequisites, which makes it generally unusable when shipped
23158deefebSmrggenerated files such as `configure' are involved.  Use GNU `make'
23258deefebSmrginstead.
23358deefebSmrg
234ba064abeSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235ba064abeSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236ba064abeSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237ba064abeSmrgto try
238ba064abeSmrg
239ba064abeSmrg     ./configure CC="cc"
240ba064abeSmrg
241ba064abeSmrgand if that doesn't work, try
242ba064abeSmrg
243ba064abeSmrg     ./configure CC="cc -nodtk"
244ba064abeSmrg
24558deefebSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24658deefebSmrgdirectory contains several dysfunctional programs; working variants of
24758deefebSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24858deefebSmrgin your `PATH', put it _after_ `/usr/bin'.
24958deefebSmrg
25058deefebSmrg   On Haiku, software installed for all users goes in `/boot/common',
25158deefebSmrgnot `/usr/local'.  It is recommended to use the following options:
25258deefebSmrg
25358deefebSmrg     ./configure --prefix=/boot/common
25458deefebSmrg
255ba064abeSmrgSpecifying the System Type
256ba064abeSmrg==========================
257ba064abeSmrg
258ba064abeSmrg   There may be some features `configure' cannot figure out
259ba064abeSmrgautomatically, but needs to determine by the type of machine the package
260ba064abeSmrgwill run on.  Usually, assuming the package is built to be run on the
261ba064abeSmrg_same_ architectures, `configure' can figure that out, but if it prints
262ba064abeSmrga message saying it cannot guess the machine type, give it the
263ba064abeSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264ba064abeSmrgtype, such as `sun4', or a canonical name which has the form:
265ba064abeSmrg
266ba064abeSmrg     CPU-COMPANY-SYSTEM
267ba064abeSmrg
268ba064abeSmrgwhere SYSTEM can have one of these forms:
269ba064abeSmrg
27058deefebSmrg     OS
27158deefebSmrg     KERNEL-OS
272ba064abeSmrg
273ba064abeSmrg   See the file `config.sub' for the possible values of each field.  If
274ba064abeSmrg`config.sub' isn't included in this package, then this package doesn't
275ba064abeSmrgneed to know the machine type.
276ba064abeSmrg
277ba064abeSmrg   If you are _building_ compiler tools for cross-compiling, you should
278ba064abeSmrguse the option `--target=TYPE' to select the type of system they will
279ba064abeSmrgproduce code for.
280ba064abeSmrg
281ba064abeSmrg   If you want to _use_ a cross compiler, that generates code for a
282ba064abeSmrgplatform different from the build platform, you should specify the
283ba064abeSmrg"host" platform (i.e., that on which the generated programs will
284ba064abeSmrgeventually be run) with `--host=TYPE'.
285ba064abeSmrg
286ba064abeSmrgSharing Defaults
287ba064abeSmrg================
288ba064abeSmrg
289ba064abeSmrg   If you want to set default values for `configure' scripts to share,
290ba064abeSmrgyou can create a site shell script called `config.site' that gives
291ba064abeSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292ba064abeSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293ba064abeSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294ba064abeSmrg`CONFIG_SITE' environment variable to the location of the site script.
295ba064abeSmrgA warning: not all `configure' scripts look for a site script.
296ba064abeSmrg
297ba064abeSmrgDefining Variables
298ba064abeSmrg==================
299ba064abeSmrg
300ba064abeSmrg   Variables not defined in a site shell script can be set in the
301ba064abeSmrgenvironment passed to `configure'.  However, some packages may run
302ba064abeSmrgconfigure again during the build, and the customized values of these
303ba064abeSmrgvariables may be lost.  In order to avoid this problem, you should set
304ba064abeSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305ba064abeSmrg
306ba064abeSmrg     ./configure CC=/usr/local2/bin/gcc
307ba064abeSmrg
308ba064abeSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309ba064abeSmrgoverridden in the site shell script).
310ba064abeSmrg
311ba064abeSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312ba064abeSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313ba064abeSmrg
314ba064abeSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315ba064abeSmrg
316ba064abeSmrg`configure' Invocation
317ba064abeSmrg======================
318ba064abeSmrg
319ba064abeSmrg   `configure' recognizes the following options to control how it
320ba064abeSmrgoperates.
321ba064abeSmrg
322ba064abeSmrg`--help'
323ba064abeSmrg`-h'
324ba064abeSmrg     Print a summary of all of the options to `configure', and exit.
325ba064abeSmrg
326ba064abeSmrg`--help=short'
327ba064abeSmrg`--help=recursive'
328ba064abeSmrg     Print a summary of the options unique to this package's
329ba064abeSmrg     `configure', and exit.  The `short' variant lists options used
330ba064abeSmrg     only in the top level, while the `recursive' variant lists options
331ba064abeSmrg     also present in any nested packages.
332ba064abeSmrg
333ba064abeSmrg`--version'
334ba064abeSmrg`-V'
335ba064abeSmrg     Print the version of Autoconf used to generate the `configure'
336ba064abeSmrg     script, and exit.
337ba064abeSmrg
338ba064abeSmrg`--cache-file=FILE'
339ba064abeSmrg     Enable the cache: use and save the results of the tests in FILE,
340ba064abeSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341ba064abeSmrg     disable caching.
342ba064abeSmrg
343ba064abeSmrg`--config-cache'
344ba064abeSmrg`-C'
345ba064abeSmrg     Alias for `--cache-file=config.cache'.
346ba064abeSmrg
347ba064abeSmrg`--quiet'
348ba064abeSmrg`--silent'
349ba064abeSmrg`-q'
350ba064abeSmrg     Do not print messages saying which checks are being made.  To
351ba064abeSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352ba064abeSmrg     messages will still be shown).
353ba064abeSmrg
354ba064abeSmrg`--srcdir=DIR'
355ba064abeSmrg     Look for the package's source code in directory DIR.  Usually
356ba064abeSmrg     `configure' can determine that directory automatically.
357ba064abeSmrg
358ba064abeSmrg`--prefix=DIR'
35958deefebSmrg     Use DIR as the installation prefix.  *note Installation Names::
360ba064abeSmrg     for more details, including other options available for fine-tuning
361ba064abeSmrg     the installation locations.
362ba064abeSmrg
363ba064abeSmrg`--no-create'
364ba064abeSmrg`-n'
365ba064abeSmrg     Run the configure checks, but stop before creating any output
366ba064abeSmrg     files.
367ba064abeSmrg
368ba064abeSmrg`configure' also accepts some other, not widely useful, options.  Run
369ba064abeSmrg`configure --help' for more details.
370ba064abeSmrg
371