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