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