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