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