INSTALL revision 688b3aec
1c2b339b4SmrgInstallation Instructions
2c2b339b4Smrg*************************
3c2b339b4Smrg
4688b3aecSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5688b3aecSmrgInc.
6c2b339b4Smrg
7688b3aecSmrg   Copying and distribution of this file, with or without modification,
8688b3aecSmrgare permitted in any medium without royalty provided the copyright
9688b3aecSmrgnotice and this notice are preserved.  This file is offered as-is,
10688b3aecSmrgwithout warranty of any kind.
11c2b339b4Smrg
12c2b339b4SmrgBasic Installation
13c2b339b4Smrg==================
14c2b339b4Smrg
15c2b339b4Smrg   Briefly, the shell commands `./configure; make; make install' should
16c2b339b4Smrgconfigure, build, and install this package.  The following
17c2b339b4Smrgmore-detailed instructions are generic; see the `README' file for
18688b3aecSmrginstructions specific to this package.  Some packages provide this
19688b3aecSmrg`INSTALL' file but do not implement all of the features documented
20688b3aecSmrgbelow.  The lack of an optional feature in a given package is not
21688b3aecSmrgnecessarily a bug.  More recommendations for GNU packages can be found
22688b3aecSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23c2b339b4Smrg
24c2b339b4Smrg   The `configure' shell script attempts to guess correct values for
25c2b339b4Smrgvarious system-dependent variables used during compilation.  It uses
26c2b339b4Smrgthose values to create a `Makefile' in each directory of the package.
27c2b339b4SmrgIt may also create one or more `.h' files containing system-dependent
28c2b339b4Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29c2b339b4Smrgyou can run in the future to recreate the current configuration, and a
30c2b339b4Smrgfile `config.log' containing compiler output (useful mainly for
31c2b339b4Smrgdebugging `configure').
32c2b339b4Smrg
33c2b339b4Smrg   It can also use an optional file (typically called `config.cache'
34c2b339b4Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35c2b339b4Smrgthe results of its tests to speed up reconfiguring.  Caching is
36c2b339b4Smrgdisabled by default to prevent problems with accidental use of stale
37c2b339b4Smrgcache files.
38c2b339b4Smrg
39c2b339b4Smrg   If you need to do unusual things to compile the package, please try
40c2b339b4Smrgto figure out how `configure' could check whether to do them, and mail
41c2b339b4Smrgdiffs or instructions to the address given in the `README' so they can
42c2b339b4Smrgbe considered for the next release.  If you are using the cache, and at
43c2b339b4Smrgsome point `config.cache' contains results you don't want to keep, you
44c2b339b4Smrgmay remove or edit it.
45c2b339b4Smrg
46c2b339b4Smrg   The file `configure.ac' (or `configure.in') is used to create
47c2b339b4Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48c2b339b4Smrgyou want to change it or regenerate `configure' using a newer version
49c2b339b4Smrgof `autoconf'.
50c2b339b4Smrg
51688b3aecSmrg   The simplest way to compile this package is:
52c2b339b4Smrg
53c2b339b4Smrg  1. `cd' to the directory containing the package's source code and type
54c2b339b4Smrg     `./configure' to configure the package for your system.
55c2b339b4Smrg
56c2b339b4Smrg     Running `configure' might take a while.  While running, it prints
57c2b339b4Smrg     some messages telling which features it is checking for.
58c2b339b4Smrg
59c2b339b4Smrg  2. Type `make' to compile the package.
60c2b339b4Smrg
61c2b339b4Smrg  3. Optionally, type `make check' to run any self-tests that come with
62688b3aecSmrg     the package, generally using the just-built uninstalled binaries.
63c2b339b4Smrg
64c2b339b4Smrg  4. Type `make install' to install the programs and any data files and
65688b3aecSmrg     documentation.  When installing into a prefix owned by root, it is
66688b3aecSmrg     recommended that the package be configured and built as a regular
67688b3aecSmrg     user, and only the `make install' phase executed with root
68688b3aecSmrg     privileges.
69688b3aecSmrg
70688b3aecSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71688b3aecSmrg     this time using the binaries in their final installed location.
72688b3aecSmrg     This target does not install anything.  Running this target as a
73688b3aecSmrg     regular user, particularly if the prior `make install' required
74688b3aecSmrg     root privileges, verifies that the installation completed
75688b3aecSmrg     correctly.
76688b3aecSmrg
77688b3aecSmrg  6. You can remove the program binaries and object files from the
78c2b339b4Smrg     source code directory by typing `make clean'.  To also remove the
79c2b339b4Smrg     files that `configure' created (so you can compile the package for
80c2b339b4Smrg     a different kind of computer), type `make distclean'.  There is
81c2b339b4Smrg     also a `make maintainer-clean' target, but that is intended mainly
82c2b339b4Smrg     for the package's developers.  If you use it, you may have to get
83c2b339b4Smrg     all sorts of other programs in order to regenerate files that came
84c2b339b4Smrg     with the distribution.
85c2b339b4Smrg
86688b3aecSmrg  7. Often, you can also type `make uninstall' to remove the installed
87688b3aecSmrg     files again.  In practice, not all packages have tested that
88688b3aecSmrg     uninstallation works correctly, even though it is required by the
89688b3aecSmrg     GNU Coding Standards.
90688b3aecSmrg
91688b3aecSmrg  8. Some packages, particularly those that use Automake, provide `make
92688b3aecSmrg     distcheck', which can by used by developers to test that all other
93688b3aecSmrg     targets like `make install' and `make uninstall' work correctly.
94688b3aecSmrg     This target is generally not run by end users.
95c2b339b4Smrg
96c2b339b4SmrgCompilers and Options
97c2b339b4Smrg=====================
98c2b339b4Smrg
99c2b339b4Smrg   Some systems require unusual options for compilation or linking that
100c2b339b4Smrgthe `configure' script does not know about.  Run `./configure --help'
101c2b339b4Smrgfor details on some of the pertinent environment variables.
102c2b339b4Smrg
103c2b339b4Smrg   You can give `configure' initial values for configuration parameters
104c2b339b4Smrgby setting variables in the command line or in the environment.  Here
105c2b339b4Smrgis an example:
106c2b339b4Smrg
107c2b339b4Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108c2b339b4Smrg
109c2b339b4Smrg   *Note Defining Variables::, for more details.
110c2b339b4Smrg
111c2b339b4SmrgCompiling For Multiple Architectures
112c2b339b4Smrg====================================
113c2b339b4Smrg
114c2b339b4Smrg   You can compile the package for more than one kind of computer at the
115c2b339b4Smrgsame time, by placing the object files for each architecture in their
116c2b339b4Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117c2b339b4Smrgdirectory where you want the object files and executables to go and run
118c2b339b4Smrgthe `configure' script.  `configure' automatically checks for the
119688b3aecSmrgsource code in the directory that `configure' is in and in `..'.  This
120688b3aecSmrgis known as a "VPATH" build.
121c2b339b4Smrg
122c2b339b4Smrg   With a non-GNU `make', it is safer to compile the package for one
123c2b339b4Smrgarchitecture at a time in the source code directory.  After you have
124c2b339b4Smrginstalled the package for one architecture, use `make distclean' before
125c2b339b4Smrgreconfiguring for another architecture.
126c2b339b4Smrg
127c2b339b4Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128c2b339b4Smrgexecutables that work on multiple system types--known as "fat" or
129c2b339b4Smrg"universal" binaries--by specifying multiple `-arch' options to the
130c2b339b4Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131c2b339b4Smrgthis:
132c2b339b4Smrg
133c2b339b4Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134c2b339b4Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135c2b339b4Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136c2b339b4Smrg
137c2b339b4Smrg   This is not guaranteed to produce working output in all cases, you
138c2b339b4Smrgmay have to build one architecture at a time and combine the results
139c2b339b4Smrgusing the `lipo' tool if you have problems.
140c2b339b4Smrg
141c2b339b4SmrgInstallation Names
142c2b339b4Smrg==================
143c2b339b4Smrg
144c2b339b4Smrg   By default, `make install' installs the package's commands under
145c2b339b4Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146c2b339b4Smrgcan specify an installation prefix other than `/usr/local' by giving
147688b3aecSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148688b3aecSmrgabsolute file name.
149c2b339b4Smrg
150c2b339b4Smrg   You can specify separate installation prefixes for
151c2b339b4Smrgarchitecture-specific files and architecture-independent files.  If you
152c2b339b4Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153c2b339b4SmrgPREFIX as the prefix for installing programs and libraries.
154c2b339b4SmrgDocumentation and other data files still use the regular prefix.
155c2b339b4Smrg
156c2b339b4Smrg   In addition, if you use an unusual directory layout you can give
157c2b339b4Smrgoptions like `--bindir=DIR' to specify different values for particular
158c2b339b4Smrgkinds of files.  Run `configure --help' for a list of the directories
159688b3aecSmrgyou can set and what kinds of files go in them.  In general, the
160688b3aecSmrgdefault for these options is expressed in terms of `${prefix}', so that
161688b3aecSmrgspecifying just `--prefix' will affect all of the other directory
162688b3aecSmrgspecifications that were not explicitly provided.
163688b3aecSmrg
164688b3aecSmrg   The most portable way to affect installation locations is to pass the
165688b3aecSmrgcorrect locations to `configure'; however, many packages provide one or
166688b3aecSmrgboth of the following shortcuts of passing variable assignments to the
167688b3aecSmrg`make install' command line to change installation locations without
168688b3aecSmrghaving to reconfigure or recompile.
169688b3aecSmrg
170688b3aecSmrg   The first method involves providing an override variable for each
171688b3aecSmrgaffected directory.  For example, `make install
172688b3aecSmrgprefix=/alternate/directory' will choose an alternate location for all
173688b3aecSmrgdirectory configuration variables that were expressed in terms of
174688b3aecSmrg`${prefix}'.  Any directories that were specified during `configure',
175688b3aecSmrgbut not in terms of `${prefix}', must each be overridden at install
176688b3aecSmrgtime for the entire installation to be relocated.  The approach of
177688b3aecSmrgmakefile variable overrides for each directory variable is required by
178688b3aecSmrgthe GNU Coding Standards, and ideally causes no recompilation.
179688b3aecSmrgHowever, some platforms have known limitations with the semantics of
180688b3aecSmrgshared libraries that end up requiring recompilation when using this
181688b3aecSmrgmethod, particularly noticeable in packages that use GNU Libtool.
182688b3aecSmrg
183688b3aecSmrg   The second method involves providing the `DESTDIR' variable.  For
184688b3aecSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
185688b3aecSmrg`/alternate/directory' before all installation names.  The approach of
186688b3aecSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187688b3aecSmrgdoes not work on platforms that have drive letters.  On the other hand,
188688b3aecSmrgit does better at avoiding recompilation issues, and works well even
189688b3aecSmrgwhen some directory options were not specified in terms of `${prefix}'
190688b3aecSmrgat `configure' time.
191688b3aecSmrg
192688b3aecSmrgOptional Features
193688b3aecSmrg=================
194c2b339b4Smrg
195c2b339b4Smrg   If the package supports it, you can cause programs to be installed
196c2b339b4Smrgwith an extra prefix or suffix on their names by giving `configure' the
197c2b339b4Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198c2b339b4Smrg
199c2b339b4Smrg   Some packages pay attention to `--enable-FEATURE' options to
200c2b339b4Smrg`configure', where FEATURE indicates an optional part of the package.
201c2b339b4SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202c2b339b4Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203c2b339b4Smrg`README' should mention any `--enable-' and `--with-' options that the
204c2b339b4Smrgpackage recognizes.
205c2b339b4Smrg
206c2b339b4Smrg   For packages that use the X Window System, `configure' can usually
207c2b339b4Smrgfind the X include and library files automatically, but if it doesn't,
208c2b339b4Smrgyou can use the `configure' options `--x-includes=DIR' and
209c2b339b4Smrg`--x-libraries=DIR' to specify their locations.
210c2b339b4Smrg
211688b3aecSmrg   Some packages offer the ability to configure how verbose the
212688b3aecSmrgexecution of `make' will be.  For these packages, running `./configure
213688b3aecSmrg--enable-silent-rules' sets the default to minimal output, which can be
214688b3aecSmrgoverridden with `make V=1'; while running `./configure
215688b3aecSmrg--disable-silent-rules' sets the default to verbose, which can be
216688b3aecSmrgoverridden with `make V=0'.
217688b3aecSmrg
218c2b339b4SmrgParticular systems
219c2b339b4Smrg==================
220c2b339b4Smrg
221c2b339b4Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222c2b339b4SmrgCC is not installed, it is recommended to use the following options in
223c2b339b4Smrgorder to use an ANSI C compiler:
224c2b339b4Smrg
225688b3aecSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226c2b339b4Smrg
227c2b339b4Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228c2b339b4Smrg
229688b3aecSmrg   HP-UX `make' updates targets which have the same time stamps as
230688b3aecSmrgtheir prerequisites, which makes it generally unusable when shipped
231688b3aecSmrggenerated files such as `configure' are involved.  Use GNU `make'
232688b3aecSmrginstead.
233688b3aecSmrg
234c2b339b4Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235c2b339b4Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236c2b339b4Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237c2b339b4Smrgto try
238c2b339b4Smrg
239c2b339b4Smrg     ./configure CC="cc"
240c2b339b4Smrg
241c2b339b4Smrgand if that doesn't work, try
242c2b339b4Smrg
243c2b339b4Smrg     ./configure CC="cc -nodtk"
244c2b339b4Smrg
245688b3aecSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246688b3aecSmrgdirectory contains several dysfunctional programs; working variants of
247688b3aecSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248688b3aecSmrgin your `PATH', put it _after_ `/usr/bin'.
249688b3aecSmrg
250688b3aecSmrg   On Haiku, software installed for all users goes in `/boot/common',
251688b3aecSmrgnot `/usr/local'.  It is recommended to use the following options:
252688b3aecSmrg
253688b3aecSmrg     ./configure --prefix=/boot/common
254688b3aecSmrg
255c2b339b4SmrgSpecifying the System Type
256c2b339b4Smrg==========================
257c2b339b4Smrg
258c2b339b4Smrg   There may be some features `configure' cannot figure out
259c2b339b4Smrgautomatically, but needs to determine by the type of machine the package
260c2b339b4Smrgwill run on.  Usually, assuming the package is built to be run on the
261c2b339b4Smrg_same_ architectures, `configure' can figure that out, but if it prints
262c2b339b4Smrga message saying it cannot guess the machine type, give it the
263c2b339b4Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264c2b339b4Smrgtype, such as `sun4', or a canonical name which has the form:
265c2b339b4Smrg
266c2b339b4Smrg     CPU-COMPANY-SYSTEM
267c2b339b4Smrg
268c2b339b4Smrgwhere SYSTEM can have one of these forms:
269c2b339b4Smrg
270688b3aecSmrg     OS
271688b3aecSmrg     KERNEL-OS
272c2b339b4Smrg
273c2b339b4Smrg   See the file `config.sub' for the possible values of each field.  If
274c2b339b4Smrg`config.sub' isn't included in this package, then this package doesn't
275c2b339b4Smrgneed to know the machine type.
276c2b339b4Smrg
277c2b339b4Smrg   If you are _building_ compiler tools for cross-compiling, you should
278c2b339b4Smrguse the option `--target=TYPE' to select the type of system they will
279c2b339b4Smrgproduce code for.
280c2b339b4Smrg
281c2b339b4Smrg   If you want to _use_ a cross compiler, that generates code for a
282c2b339b4Smrgplatform different from the build platform, you should specify the
283c2b339b4Smrg"host" platform (i.e., that on which the generated programs will
284c2b339b4Smrgeventually be run) with `--host=TYPE'.
285c2b339b4Smrg
286c2b339b4SmrgSharing Defaults
287c2b339b4Smrg================
288c2b339b4Smrg
289c2b339b4Smrg   If you want to set default values for `configure' scripts to share,
290c2b339b4Smrgyou can create a site shell script called `config.site' that gives
291c2b339b4Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292c2b339b4Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293c2b339b4Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294c2b339b4Smrg`CONFIG_SITE' environment variable to the location of the site script.
295c2b339b4SmrgA warning: not all `configure' scripts look for a site script.
296c2b339b4Smrg
297c2b339b4SmrgDefining Variables
298c2b339b4Smrg==================
299c2b339b4Smrg
300c2b339b4Smrg   Variables not defined in a site shell script can be set in the
301c2b339b4Smrgenvironment passed to `configure'.  However, some packages may run
302c2b339b4Smrgconfigure again during the build, and the customized values of these
303c2b339b4Smrgvariables may be lost.  In order to avoid this problem, you should set
304c2b339b4Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305c2b339b4Smrg
306c2b339b4Smrg     ./configure CC=/usr/local2/bin/gcc
307c2b339b4Smrg
308c2b339b4Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309c2b339b4Smrgoverridden in the site shell script).
310c2b339b4Smrg
311c2b339b4SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312c2b339b4Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313c2b339b4Smrg
314c2b339b4Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315c2b339b4Smrg
316c2b339b4Smrg`configure' Invocation
317c2b339b4Smrg======================
318c2b339b4Smrg
319c2b339b4Smrg   `configure' recognizes the following options to control how it
320c2b339b4Smrgoperates.
321c2b339b4Smrg
322c2b339b4Smrg`--help'
323c2b339b4Smrg`-h'
324c2b339b4Smrg     Print a summary of all of the options to `configure', and exit.
325c2b339b4Smrg
326c2b339b4Smrg`--help=short'
327c2b339b4Smrg`--help=recursive'
328c2b339b4Smrg     Print a summary of the options unique to this package's
329c2b339b4Smrg     `configure', and exit.  The `short' variant lists options used
330c2b339b4Smrg     only in the top level, while the `recursive' variant lists options
331c2b339b4Smrg     also present in any nested packages.
332c2b339b4Smrg
333c2b339b4Smrg`--version'
334c2b339b4Smrg`-V'
335c2b339b4Smrg     Print the version of Autoconf used to generate the `configure'
336c2b339b4Smrg     script, and exit.
337c2b339b4Smrg
338c2b339b4Smrg`--cache-file=FILE'
339c2b339b4Smrg     Enable the cache: use and save the results of the tests in FILE,
340c2b339b4Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341c2b339b4Smrg     disable caching.
342c2b339b4Smrg
343c2b339b4Smrg`--config-cache'
344c2b339b4Smrg`-C'
345c2b339b4Smrg     Alias for `--cache-file=config.cache'.
346c2b339b4Smrg
347c2b339b4Smrg`--quiet'
348c2b339b4Smrg`--silent'
349c2b339b4Smrg`-q'
350c2b339b4Smrg     Do not print messages saying which checks are being made.  To
351c2b339b4Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352c2b339b4Smrg     messages will still be shown).
353c2b339b4Smrg
354c2b339b4Smrg`--srcdir=DIR'
355c2b339b4Smrg     Look for the package's source code in directory DIR.  Usually
356c2b339b4Smrg     `configure' can determine that directory automatically.
357c2b339b4Smrg
358c2b339b4Smrg`--prefix=DIR'
359688b3aecSmrg     Use DIR as the installation prefix.  *note Installation Names::
360c2b339b4Smrg     for more details, including other options available for fine-tuning
361c2b339b4Smrg     the installation locations.
362c2b339b4Smrg
363c2b339b4Smrg`--no-create'
364c2b339b4Smrg`-n'
365c2b339b4Smrg     Run the configure checks, but stop before creating any output
366c2b339b4Smrg     files.
367c2b339b4Smrg
368c2b339b4Smrg`configure' also accepts some other, not widely useful, options.  Run
369c2b339b4Smrg`configure --help' for more details.
370c2b339b4Smrg
371