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