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