INSTALL revision f29dbc25
1f29dbc25SmrgInstallation Instructions
2f29dbc25Smrg*************************
3f29dbc25Smrg
4f29dbc25SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5f29dbc25Smrg2006, 2007, 2008 Free Software Foundation, Inc.
6f29dbc25Smrg
7f29dbc25Smrg   This file is free documentation; the Free Software Foundation gives
8f29dbc25Smrgunlimited permission to copy, distribute and modify it.
9f29dbc25Smrg
10f29dbc25SmrgBasic Installation
11f29dbc25Smrg==================
12f29dbc25Smrg
13f29dbc25Smrg   Briefly, the shell commands `./configure; make; make install' should
14f29dbc25Smrgconfigure, build, and install this package.  The following
15f29dbc25Smrgmore-detailed instructions are generic; see the `README' file for
16f29dbc25Smrginstructions specific to this package.
17f29dbc25Smrg
18f29dbc25Smrg   The `configure' shell script attempts to guess correct values for
19f29dbc25Smrgvarious system-dependent variables used during compilation.  It uses
20f29dbc25Smrgthose values to create a `Makefile' in each directory of the package.
21f29dbc25SmrgIt may also create one or more `.h' files containing system-dependent
22f29dbc25Smrgdefinitions.  Finally, it creates a shell script `config.status' that
23f29dbc25Smrgyou can run in the future to recreate the current configuration, and a
24f29dbc25Smrgfile `config.log' containing compiler output (useful mainly for
25f29dbc25Smrgdebugging `configure').
26f29dbc25Smrg
27f29dbc25Smrg   It can also use an optional file (typically called `config.cache'
28f29dbc25Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
29f29dbc25Smrgthe results of its tests to speed up reconfiguring.  Caching is
30f29dbc25Smrgdisabled by default to prevent problems with accidental use of stale
31f29dbc25Smrgcache files.
32f29dbc25Smrg
33f29dbc25Smrg   If you need to do unusual things to compile the package, please try
34f29dbc25Smrgto figure out how `configure' could check whether to do them, and mail
35f29dbc25Smrgdiffs or instructions to the address given in the `README' so they can
36f29dbc25Smrgbe considered for the next release.  If you are using the cache, and at
37f29dbc25Smrgsome point `config.cache' contains results you don't want to keep, you
38f29dbc25Smrgmay remove or edit it.
39f29dbc25Smrg
40f29dbc25Smrg   The file `configure.ac' (or `configure.in') is used to create
41f29dbc25Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
42f29dbc25Smrgyou want to change it or regenerate `configure' using a newer version
43f29dbc25Smrgof `autoconf'.
44f29dbc25Smrg
45f29dbc25SmrgThe simplest way to compile this package is:
46f29dbc25Smrg
47f29dbc25Smrg  1. `cd' to the directory containing the package's source code and type
48f29dbc25Smrg     `./configure' to configure the package for your system.
49f29dbc25Smrg
50f29dbc25Smrg     Running `configure' might take a while.  While running, it prints
51f29dbc25Smrg     some messages telling which features it is checking for.
52f29dbc25Smrg
53f29dbc25Smrg  2. Type `make' to compile the package.
54f29dbc25Smrg
55f29dbc25Smrg  3. Optionally, type `make check' to run any self-tests that come with
56f29dbc25Smrg     the package.
57f29dbc25Smrg
58f29dbc25Smrg  4. Type `make install' to install the programs and any data files and
59f29dbc25Smrg     documentation.
60f29dbc25Smrg
61f29dbc25Smrg  5. You can remove the program binaries and object files from the
62f29dbc25Smrg     source code directory by typing `make clean'.  To also remove the
63f29dbc25Smrg     files that `configure' created (so you can compile the package for
64f29dbc25Smrg     a different kind of computer), type `make distclean'.  There is
65f29dbc25Smrg     also a `make maintainer-clean' target, but that is intended mainly
66f29dbc25Smrg     for the package's developers.  If you use it, you may have to get
67f29dbc25Smrg     all sorts of other programs in order to regenerate files that came
68f29dbc25Smrg     with the distribution.
69f29dbc25Smrg
70f29dbc25Smrg  6. Often, you can also type `make uninstall' to remove the installed
71f29dbc25Smrg     files again.
72f29dbc25Smrg
73f29dbc25SmrgCompilers and Options
74f29dbc25Smrg=====================
75f29dbc25Smrg
76f29dbc25Smrg   Some systems require unusual options for compilation or linking that
77f29dbc25Smrgthe `configure' script does not know about.  Run `./configure --help'
78f29dbc25Smrgfor details on some of the pertinent environment variables.
79f29dbc25Smrg
80f29dbc25Smrg   You can give `configure' initial values for configuration parameters
81f29dbc25Smrgby setting variables in the command line or in the environment.  Here
82f29dbc25Smrgis an example:
83f29dbc25Smrg
84f29dbc25Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
85f29dbc25Smrg
86f29dbc25Smrg   *Note Defining Variables::, for more details.
87f29dbc25Smrg
88f29dbc25SmrgCompiling For Multiple Architectures
89f29dbc25Smrg====================================
90f29dbc25Smrg
91f29dbc25Smrg   You can compile the package for more than one kind of computer at the
92f29dbc25Smrgsame time, by placing the object files for each architecture in their
93f29dbc25Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
94f29dbc25Smrgdirectory where you want the object files and executables to go and run
95f29dbc25Smrgthe `configure' script.  `configure' automatically checks for the
96f29dbc25Smrgsource code in the directory that `configure' is in and in `..'.
97f29dbc25Smrg
98f29dbc25Smrg   With a non-GNU `make', it is safer to compile the package for one
99f29dbc25Smrgarchitecture at a time in the source code directory.  After you have
100f29dbc25Smrginstalled the package for one architecture, use `make distclean' before
101f29dbc25Smrgreconfiguring for another architecture.
102f29dbc25Smrg
103f29dbc25Smrg   On MacOS X 10.5 and later systems, you can create libraries and
104f29dbc25Smrgexecutables that work on multiple system types--known as "fat" or
105f29dbc25Smrg"universal" binaries--by specifying multiple `-arch' options to the
106f29dbc25Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
107f29dbc25Smrgthis:
108f29dbc25Smrg
109f29dbc25Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110f29dbc25Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
111f29dbc25Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
112f29dbc25Smrg
113f29dbc25Smrg   This is not guaranteed to produce working output in all cases, you
114f29dbc25Smrgmay have to build one architecture at a time and combine the results
115f29dbc25Smrgusing the `lipo' tool if you have problems.
116f29dbc25Smrg
117f29dbc25SmrgInstallation Names
118f29dbc25Smrg==================
119f29dbc25Smrg
120f29dbc25Smrg   By default, `make install' installs the package's commands under
121f29dbc25Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
122f29dbc25Smrgcan specify an installation prefix other than `/usr/local' by giving
123f29dbc25Smrg`configure' the option `--prefix=PREFIX'.
124f29dbc25Smrg
125f29dbc25Smrg   You can specify separate installation prefixes for
126f29dbc25Smrgarchitecture-specific files and architecture-independent files.  If you
127f29dbc25Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
128f29dbc25SmrgPREFIX as the prefix for installing programs and libraries.
129f29dbc25SmrgDocumentation and other data files still use the regular prefix.
130f29dbc25Smrg
131f29dbc25Smrg   In addition, if you use an unusual directory layout you can give
132f29dbc25Smrgoptions like `--bindir=DIR' to specify different values for particular
133f29dbc25Smrgkinds of files.  Run `configure --help' for a list of the directories
134f29dbc25Smrgyou can set and what kinds of files go in them.
135f29dbc25Smrg
136f29dbc25Smrg   If the package supports it, you can cause programs to be installed
137f29dbc25Smrgwith an extra prefix or suffix on their names by giving `configure' the
138f29dbc25Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
139f29dbc25Smrg
140f29dbc25SmrgOptional Features
141f29dbc25Smrg=================
142f29dbc25Smrg
143f29dbc25Smrg   Some packages pay attention to `--enable-FEATURE' options to
144f29dbc25Smrg`configure', where FEATURE indicates an optional part of the package.
145f29dbc25SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
146f29dbc25Smrgis something like `gnu-as' or `x' (for the X Window System).  The
147f29dbc25Smrg`README' should mention any `--enable-' and `--with-' options that the
148f29dbc25Smrgpackage recognizes.
149f29dbc25Smrg
150f29dbc25Smrg   For packages that use the X Window System, `configure' can usually
151f29dbc25Smrgfind the X include and library files automatically, but if it doesn't,
152f29dbc25Smrgyou can use the `configure' options `--x-includes=DIR' and
153f29dbc25Smrg`--x-libraries=DIR' to specify their locations.
154f29dbc25Smrg
155f29dbc25SmrgParticular systems
156f29dbc25Smrg==================
157f29dbc25Smrg
158f29dbc25Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
159f29dbc25SmrgCC is not installed, it is recommended to use the following options in
160f29dbc25Smrgorder to use an ANSI C compiler:
161f29dbc25Smrg
162f29dbc25Smrg     ./configure CC="cc -Ae"
163f29dbc25Smrg
164f29dbc25Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
165f29dbc25Smrg
166f29dbc25Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
167f29dbc25Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
168f29dbc25Smrga workaround.  If GNU CC is not installed, it is therefore recommended
169f29dbc25Smrgto try
170f29dbc25Smrg
171f29dbc25Smrg     ./configure CC="cc"
172f29dbc25Smrg
173f29dbc25Smrgand if that doesn't work, try
174f29dbc25Smrg
175f29dbc25Smrg     ./configure CC="cc -nodtk"
176f29dbc25Smrg
177f29dbc25SmrgSpecifying the System Type
178f29dbc25Smrg==========================
179f29dbc25Smrg
180f29dbc25Smrg   There may be some features `configure' cannot figure out
181f29dbc25Smrgautomatically, but needs to determine by the type of machine the package
182f29dbc25Smrgwill run on.  Usually, assuming the package is built to be run on the
183f29dbc25Smrg_same_ architectures, `configure' can figure that out, but if it prints
184f29dbc25Smrga message saying it cannot guess the machine type, give it the
185f29dbc25Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
186f29dbc25Smrgtype, such as `sun4', or a canonical name which has the form:
187f29dbc25Smrg
188f29dbc25Smrg     CPU-COMPANY-SYSTEM
189f29dbc25Smrg
190f29dbc25Smrgwhere SYSTEM can have one of these forms:
191f29dbc25Smrg
192f29dbc25Smrg     OS KERNEL-OS
193f29dbc25Smrg
194f29dbc25Smrg   See the file `config.sub' for the possible values of each field.  If
195f29dbc25Smrg`config.sub' isn't included in this package, then this package doesn't
196f29dbc25Smrgneed to know the machine type.
197f29dbc25Smrg
198f29dbc25Smrg   If you are _building_ compiler tools for cross-compiling, you should
199f29dbc25Smrguse the option `--target=TYPE' to select the type of system they will
200f29dbc25Smrgproduce code for.
201f29dbc25Smrg
202f29dbc25Smrg   If you want to _use_ a cross compiler, that generates code for a
203f29dbc25Smrgplatform different from the build platform, you should specify the
204f29dbc25Smrg"host" platform (i.e., that on which the generated programs will
205f29dbc25Smrgeventually be run) with `--host=TYPE'.
206f29dbc25Smrg
207f29dbc25SmrgSharing Defaults
208f29dbc25Smrg================
209f29dbc25Smrg
210f29dbc25Smrg   If you want to set default values for `configure' scripts to share,
211f29dbc25Smrgyou can create a site shell script called `config.site' that gives
212f29dbc25Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
213f29dbc25Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
214f29dbc25Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
215f29dbc25Smrg`CONFIG_SITE' environment variable to the location of the site script.
216f29dbc25SmrgA warning: not all `configure' scripts look for a site script.
217f29dbc25Smrg
218f29dbc25SmrgDefining Variables
219f29dbc25Smrg==================
220f29dbc25Smrg
221f29dbc25Smrg   Variables not defined in a site shell script can be set in the
222f29dbc25Smrgenvironment passed to `configure'.  However, some packages may run
223f29dbc25Smrgconfigure again during the build, and the customized values of these
224f29dbc25Smrgvariables may be lost.  In order to avoid this problem, you should set
225f29dbc25Smrgthem in the `configure' command line, using `VAR=value'.  For example:
226f29dbc25Smrg
227f29dbc25Smrg     ./configure CC=/usr/local2/bin/gcc
228f29dbc25Smrg
229f29dbc25Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
230f29dbc25Smrgoverridden in the site shell script).
231f29dbc25Smrg
232f29dbc25SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
233f29dbc25Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
234f29dbc25Smrg
235f29dbc25Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
236f29dbc25Smrg
237f29dbc25Smrg`configure' Invocation
238f29dbc25Smrg======================
239f29dbc25Smrg
240f29dbc25Smrg   `configure' recognizes the following options to control how it
241f29dbc25Smrgoperates.
242f29dbc25Smrg
243f29dbc25Smrg`--help'
244f29dbc25Smrg`-h'
245f29dbc25Smrg     Print a summary of all of the options to `configure', and exit.
246f29dbc25Smrg
247f29dbc25Smrg`--help=short'
248f29dbc25Smrg`--help=recursive'
249f29dbc25Smrg     Print a summary of the options unique to this package's
250f29dbc25Smrg     `configure', and exit.  The `short' variant lists options used
251f29dbc25Smrg     only in the top level, while the `recursive' variant lists options
252f29dbc25Smrg     also present in any nested packages.
253f29dbc25Smrg
254f29dbc25Smrg`--version'
255f29dbc25Smrg`-V'
256f29dbc25Smrg     Print the version of Autoconf used to generate the `configure'
257f29dbc25Smrg     script, and exit.
258f29dbc25Smrg
259f29dbc25Smrg`--cache-file=FILE'
260f29dbc25Smrg     Enable the cache: use and save the results of the tests in FILE,
261f29dbc25Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
262f29dbc25Smrg     disable caching.
263f29dbc25Smrg
264f29dbc25Smrg`--config-cache'
265f29dbc25Smrg`-C'
266f29dbc25Smrg     Alias for `--cache-file=config.cache'.
267f29dbc25Smrg
268f29dbc25Smrg`--quiet'
269f29dbc25Smrg`--silent'
270f29dbc25Smrg`-q'
271f29dbc25Smrg     Do not print messages saying which checks are being made.  To
272f29dbc25Smrg     suppress all normal output, redirect it to `/dev/null' (any error
273f29dbc25Smrg     messages will still be shown).
274f29dbc25Smrg
275f29dbc25Smrg`--srcdir=DIR'
276f29dbc25Smrg     Look for the package's source code in directory DIR.  Usually
277f29dbc25Smrg     `configure' can determine that directory automatically.
278f29dbc25Smrg
279f29dbc25Smrg`--prefix=DIR'
280f29dbc25Smrg     Use DIR as the installation prefix.  *Note Installation Names::
281f29dbc25Smrg     for more details, including other options available for fine-tuning
282f29dbc25Smrg     the installation locations.
283f29dbc25Smrg
284f29dbc25Smrg`--no-create'
285f29dbc25Smrg`-n'
286f29dbc25Smrg     Run the configure checks, but stop before creating any output
287f29dbc25Smrg     files.
288f29dbc25Smrg
289f29dbc25Smrg`configure' also accepts some other, not widely useful, options.  Run
290f29dbc25Smrg`configure --help' for more details.
291f29dbc25Smrg
292