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