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