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