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