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