INSTALL revision 555991fd
1555991fdSmrgInstallation Instructions
2555991fdSmrg*************************
3555991fdSmrg
4555991fdSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5555991fdSmrg2006, 2007, 2008 Free Software Foundation, Inc.
6126a8a12Smrg
7126a8a12Smrg   This file is free documentation; the Free Software Foundation gives
8126a8a12Smrgunlimited permission to copy, distribute and modify it.
9126a8a12Smrg
10126a8a12SmrgBasic Installation
11126a8a12Smrg==================
12126a8a12Smrg
13555991fdSmrg   Briefly, the shell commands `./configure; make; make install' should
14555991fdSmrgconfigure, build, and install this package.  The following
15555991fdSmrgmore-detailed instructions are generic; see the `README' file for
16555991fdSmrginstructions specific to this package.
17126a8a12Smrg
18126a8a12Smrg   The `configure' shell script attempts to guess correct values for
19126a8a12Smrgvarious system-dependent variables used during compilation.  It uses
20126a8a12Smrgthose values to create a `Makefile' in each directory of the package.
21126a8a12SmrgIt may also create one or more `.h' files containing system-dependent
22126a8a12Smrgdefinitions.  Finally, it creates a shell script `config.status' that
23126a8a12Smrgyou can run in the future to recreate the current configuration, and a
24126a8a12Smrgfile `config.log' containing compiler output (useful mainly for
25126a8a12Smrgdebugging `configure').
26126a8a12Smrg
27126a8a12Smrg   It can also use an optional file (typically called `config.cache'
28126a8a12Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
29555991fdSmrgthe results of its tests to speed up reconfiguring.  Caching is
30126a8a12Smrgdisabled by default to prevent problems with accidental use of stale
31555991fdSmrgcache files.
32126a8a12Smrg
33126a8a12Smrg   If you need to do unusual things to compile the package, please try
34126a8a12Smrgto figure out how `configure' could check whether to do them, and mail
35126a8a12Smrgdiffs or instructions to the address given in the `README' so they can
36126a8a12Smrgbe considered for the next release.  If you are using the cache, and at
37126a8a12Smrgsome point `config.cache' contains results you don't want to keep, you
38126a8a12Smrgmay remove or edit it.
39126a8a12Smrg
40126a8a12Smrg   The file `configure.ac' (or `configure.in') is used to create
41555991fdSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
42555991fdSmrgyou want to change it or regenerate `configure' using a newer version
43555991fdSmrgof `autoconf'.
44126a8a12Smrg
45126a8a12SmrgThe simplest way to compile this package is:
46126a8a12Smrg
47126a8a12Smrg  1. `cd' to the directory containing the package's source code and type
48555991fdSmrg     `./configure' to configure the package for your system.
49126a8a12Smrg
50555991fdSmrg     Running `configure' might take a while.  While running, it prints
51555991fdSmrg     some messages telling which features it is checking for.
52126a8a12Smrg
53126a8a12Smrg  2. Type `make' to compile the package.
54126a8a12Smrg
55126a8a12Smrg  3. Optionally, type `make check' to run any self-tests that come with
56126a8a12Smrg     the package.
57126a8a12Smrg
58126a8a12Smrg  4. Type `make install' to install the programs and any data files and
59126a8a12Smrg     documentation.
60126a8a12Smrg
61126a8a12Smrg  5. You can remove the program binaries and object files from the
62126a8a12Smrg     source code directory by typing `make clean'.  To also remove the
63126a8a12Smrg     files that `configure' created (so you can compile the package for
64126a8a12Smrg     a different kind of computer), type `make distclean'.  There is
65126a8a12Smrg     also a `make maintainer-clean' target, but that is intended mainly
66126a8a12Smrg     for the package's developers.  If you use it, you may have to get
67126a8a12Smrg     all sorts of other programs in order to regenerate files that came
68126a8a12Smrg     with the distribution.
69126a8a12Smrg
70555991fdSmrg  6. Often, you can also type `make uninstall' to remove the installed
71555991fdSmrg     files again.
72555991fdSmrg
73126a8a12SmrgCompilers and Options
74126a8a12Smrg=====================
75126a8a12Smrg
76126a8a12Smrg   Some systems require unusual options for compilation or linking that
77126a8a12Smrgthe `configure' script does not know about.  Run `./configure --help'
78126a8a12Smrgfor details on some of the pertinent environment variables.
79126a8a12Smrg
80126a8a12Smrg   You can give `configure' initial values for configuration parameters
81126a8a12Smrgby setting variables in the command line or in the environment.  Here
82126a8a12Smrgis an example:
83126a8a12Smrg
84555991fdSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
85126a8a12Smrg
86126a8a12Smrg   *Note Defining Variables::, for more details.
87126a8a12Smrg
88126a8a12SmrgCompiling For Multiple Architectures
89126a8a12Smrg====================================
90126a8a12Smrg
91126a8a12Smrg   You can compile the package for more than one kind of computer at the
92126a8a12Smrgsame time, by placing the object files for each architecture in their
93555991fdSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
94126a8a12Smrgdirectory where you want the object files and executables to go and run
95126a8a12Smrgthe `configure' script.  `configure' automatically checks for the
96126a8a12Smrgsource code in the directory that `configure' is in and in `..'.
97126a8a12Smrg
98555991fdSmrg   With a non-GNU `make', it is safer to compile the package for one
99555991fdSmrgarchitecture at a time in the source code directory.  After you have
100555991fdSmrginstalled the package for one architecture, use `make distclean' before
101555991fdSmrgreconfiguring for another architecture.
102555991fdSmrg
103555991fdSmrg   On MacOS X 10.5 and later systems, you can create libraries and
104555991fdSmrgexecutables that work on multiple system types--known as "fat" or
105555991fdSmrg"universal" binaries--by specifying multiple `-arch' options to the
106555991fdSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
107555991fdSmrgthis:
108555991fdSmrg
109555991fdSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110555991fdSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
111555991fdSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
112555991fdSmrg
113555991fdSmrg   This is not guaranteed to produce working output in all cases, you
114555991fdSmrgmay have to build one architecture at a time and combine the results
115555991fdSmrgusing the `lipo' tool if you have problems.
116126a8a12Smrg
117126a8a12SmrgInstallation Names
118126a8a12Smrg==================
119126a8a12Smrg
120555991fdSmrg   By default, `make install' installs the package's commands under
121555991fdSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
122555991fdSmrgcan specify an installation prefix other than `/usr/local' by giving
123555991fdSmrg`configure' the option `--prefix=PREFIX'.
124126a8a12Smrg
125126a8a12Smrg   You can specify separate installation prefixes for
126126a8a12Smrgarchitecture-specific files and architecture-independent files.  If you
127555991fdSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
128555991fdSmrgPREFIX as the prefix for installing programs and libraries.
129555991fdSmrgDocumentation and other data files still use the regular prefix.
130126a8a12Smrg
131126a8a12Smrg   In addition, if you use an unusual directory layout you can give
132555991fdSmrgoptions like `--bindir=DIR' to specify different values for particular
133126a8a12Smrgkinds of files.  Run `configure --help' for a list of the directories
134126a8a12Smrgyou can set and what kinds of files go in them.
135126a8a12Smrg
136126a8a12Smrg   If the package supports it, you can cause programs to be installed
137126a8a12Smrgwith an extra prefix or suffix on their names by giving `configure' the
138126a8a12Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
139126a8a12Smrg
140126a8a12SmrgOptional Features
141126a8a12Smrg=================
142126a8a12Smrg
143126a8a12Smrg   Some packages pay attention to `--enable-FEATURE' options to
144126a8a12Smrg`configure', where FEATURE indicates an optional part of the package.
145126a8a12SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
146126a8a12Smrgis something like `gnu-as' or `x' (for the X Window System).  The
147126a8a12Smrg`README' should mention any `--enable-' and `--with-' options that the
148126a8a12Smrgpackage recognizes.
149126a8a12Smrg
150126a8a12Smrg   For packages that use the X Window System, `configure' can usually
151126a8a12Smrgfind the X include and library files automatically, but if it doesn't,
152126a8a12Smrgyou can use the `configure' options `--x-includes=DIR' and
153126a8a12Smrg`--x-libraries=DIR' to specify their locations.
154126a8a12Smrg
155555991fdSmrgParticular systems
156555991fdSmrg==================
157555991fdSmrg
158555991fdSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
159555991fdSmrgCC is not installed, it is recommended to use the following options in
160555991fdSmrgorder to use an ANSI C compiler:
161555991fdSmrg
162555991fdSmrg     ./configure CC="cc -Ae"
163555991fdSmrg
164555991fdSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
165555991fdSmrg
166555991fdSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
167555991fdSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
168555991fdSmrga workaround.  If GNU CC is not installed, it is therefore recommended
169555991fdSmrgto try
170555991fdSmrg
171555991fdSmrg     ./configure CC="cc"
172555991fdSmrg
173555991fdSmrgand if that doesn't work, try
174555991fdSmrg
175555991fdSmrg     ./configure CC="cc -nodtk"
176555991fdSmrg
177126a8a12SmrgSpecifying the System Type
178126a8a12Smrg==========================
179126a8a12Smrg
180126a8a12Smrg   There may be some features `configure' cannot figure out
181126a8a12Smrgautomatically, but needs to determine by the type of machine the package
182126a8a12Smrgwill run on.  Usually, assuming the package is built to be run on the
183126a8a12Smrg_same_ architectures, `configure' can figure that out, but if it prints
184126a8a12Smrga message saying it cannot guess the machine type, give it the
185126a8a12Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
186126a8a12Smrgtype, such as `sun4', or a canonical name which has the form:
187126a8a12Smrg
188126a8a12Smrg     CPU-COMPANY-SYSTEM
189126a8a12Smrg
190126a8a12Smrgwhere SYSTEM can have one of these forms:
191126a8a12Smrg
192126a8a12Smrg     OS KERNEL-OS
193126a8a12Smrg
194126a8a12Smrg   See the file `config.sub' for the possible values of each field.  If
195126a8a12Smrg`config.sub' isn't included in this package, then this package doesn't
196126a8a12Smrgneed to know the machine type.
197126a8a12Smrg
198126a8a12Smrg   If you are _building_ compiler tools for cross-compiling, you should
199555991fdSmrguse the option `--target=TYPE' to select the type of system they will
200126a8a12Smrgproduce code for.
201126a8a12Smrg
202126a8a12Smrg   If you want to _use_ a cross compiler, that generates code for a
203126a8a12Smrgplatform different from the build platform, you should specify the
204126a8a12Smrg"host" platform (i.e., that on which the generated programs will
205126a8a12Smrgeventually be run) with `--host=TYPE'.
206126a8a12Smrg
207126a8a12SmrgSharing Defaults
208126a8a12Smrg================
209126a8a12Smrg
210126a8a12Smrg   If you want to set default values for `configure' scripts to share,
211126a8a12Smrgyou can create a site shell script called `config.site' that gives
212126a8a12Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
213126a8a12Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
214126a8a12Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
215126a8a12Smrg`CONFIG_SITE' environment variable to the location of the site script.
216126a8a12SmrgA warning: not all `configure' scripts look for a site script.
217126a8a12Smrg
218126a8a12SmrgDefining Variables
219126a8a12Smrg==================
220126a8a12Smrg
221126a8a12Smrg   Variables not defined in a site shell script can be set in the
222126a8a12Smrgenvironment passed to `configure'.  However, some packages may run
223126a8a12Smrgconfigure again during the build, and the customized values of these
224126a8a12Smrgvariables may be lost.  In order to avoid this problem, you should set
225126a8a12Smrgthem in the `configure' command line, using `VAR=value'.  For example:
226126a8a12Smrg
227126a8a12Smrg     ./configure CC=/usr/local2/bin/gcc
228126a8a12Smrg
229555991fdSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
230126a8a12Smrgoverridden in the site shell script).
231126a8a12Smrg
232555991fdSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
233555991fdSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
234555991fdSmrg
235555991fdSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
236555991fdSmrg
237126a8a12Smrg`configure' Invocation
238126a8a12Smrg======================
239126a8a12Smrg
240126a8a12Smrg   `configure' recognizes the following options to control how it
241126a8a12Smrgoperates.
242126a8a12Smrg
243126a8a12Smrg`--help'
244126a8a12Smrg`-h'
245555991fdSmrg     Print a summary of all of the options to `configure', and exit.
246555991fdSmrg
247555991fdSmrg`--help=short'
248555991fdSmrg`--help=recursive'
249555991fdSmrg     Print a summary of the options unique to this package's
250555991fdSmrg     `configure', and exit.  The `short' variant lists options used
251555991fdSmrg     only in the top level, while the `recursive' variant lists options
252555991fdSmrg     also present in any nested packages.
253126a8a12Smrg
254126a8a12Smrg`--version'
255126a8a12Smrg`-V'
256126a8a12Smrg     Print the version of Autoconf used to generate the `configure'
257126a8a12Smrg     script, and exit.
258126a8a12Smrg
259126a8a12Smrg`--cache-file=FILE'
260126a8a12Smrg     Enable the cache: use and save the results of the tests in FILE,
261126a8a12Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
262126a8a12Smrg     disable caching.
263126a8a12Smrg
264126a8a12Smrg`--config-cache'
265126a8a12Smrg`-C'
266126a8a12Smrg     Alias for `--cache-file=config.cache'.
267126a8a12Smrg
268126a8a12Smrg`--quiet'
269126a8a12Smrg`--silent'
270126a8a12Smrg`-q'
271126a8a12Smrg     Do not print messages saying which checks are being made.  To
272126a8a12Smrg     suppress all normal output, redirect it to `/dev/null' (any error
273126a8a12Smrg     messages will still be shown).
274126a8a12Smrg
275126a8a12Smrg`--srcdir=DIR'
276126a8a12Smrg     Look for the package's source code in directory DIR.  Usually
277126a8a12Smrg     `configure' can determine that directory automatically.
278126a8a12Smrg
279555991fdSmrg`--prefix=DIR'
280555991fdSmrg     Use DIR as the installation prefix.  *Note Installation Names::
281555991fdSmrg     for more details, including other options available for fine-tuning
282555991fdSmrg     the installation locations.
283555991fdSmrg
284555991fdSmrg`--no-create'
285555991fdSmrg`-n'
286555991fdSmrg     Run the configure checks, but stop before creating any output
287555991fdSmrg     files.
288555991fdSmrg
289126a8a12Smrg`configure' also accepts some other, not widely useful, options.  Run
290126a8a12Smrg`configure --help' for more details.
291126a8a12Smrg
292