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