INSTALL revision 169a0819
1169a0819SmrgInstallation Instructions
2169a0819Smrg*************************
3169a0819Smrg
4169a0819SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5169a0819Smrg2006, 2007, 2008 Free Software Foundation, Inc.
6169a0819Smrg
7169a0819Smrg   This file is free documentation; the Free Software Foundation gives
8169a0819Smrgunlimited permission to copy, distribute and modify it.
9169a0819Smrg
10169a0819SmrgBasic Installation
11169a0819Smrg==================
12169a0819Smrg
13169a0819Smrg   Briefly, the shell commands `./configure; make; make install' should
14169a0819Smrgconfigure, build, and install this package.  The following
15169a0819Smrgmore-detailed instructions are generic; see the `README' file for
16169a0819Smrginstructions specific to this package.
17169a0819Smrg
18169a0819Smrg   The `configure' shell script attempts to guess correct values for
19169a0819Smrgvarious system-dependent variables used during compilation.  It uses
20169a0819Smrgthose values to create a `Makefile' in each directory of the package.
21169a0819SmrgIt may also create one or more `.h' files containing system-dependent
22169a0819Smrgdefinitions.  Finally, it creates a shell script `config.status' that
23169a0819Smrgyou can run in the future to recreate the current configuration, and a
24169a0819Smrgfile `config.log' containing compiler output (useful mainly for
25169a0819Smrgdebugging `configure').
26169a0819Smrg
27169a0819Smrg   It can also use an optional file (typically called `config.cache'
28169a0819Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
29169a0819Smrgthe results of its tests to speed up reconfiguring.  Caching is
30169a0819Smrgdisabled by default to prevent problems with accidental use of stale
31169a0819Smrgcache files.
32169a0819Smrg
33169a0819Smrg   If you need to do unusual things to compile the package, please try
34169a0819Smrgto figure out how `configure' could check whether to do them, and mail
35169a0819Smrgdiffs or instructions to the address given in the `README' so they can
36169a0819Smrgbe considered for the next release.  If you are using the cache, and at
37169a0819Smrgsome point `config.cache' contains results you don't want to keep, you
38169a0819Smrgmay remove or edit it.
39169a0819Smrg
40169a0819Smrg   The file `configure.ac' (or `configure.in') is used to create
41169a0819Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
42169a0819Smrgyou want to change it or regenerate `configure' using a newer version
43169a0819Smrgof `autoconf'.
44169a0819Smrg
45169a0819SmrgThe simplest way to compile this package is:
46169a0819Smrg
47169a0819Smrg  1. `cd' to the directory containing the package's source code and type
48169a0819Smrg     `./configure' to configure the package for your system.
49169a0819Smrg
50169a0819Smrg     Running `configure' might take a while.  While running, it prints
51169a0819Smrg     some messages telling which features it is checking for.
52169a0819Smrg
53169a0819Smrg  2. Type `make' to compile the package.
54169a0819Smrg
55169a0819Smrg  3. Optionally, type `make check' to run any self-tests that come with
56169a0819Smrg     the package.
57169a0819Smrg
58169a0819Smrg  4. Type `make install' to install the programs and any data files and
59169a0819Smrg     documentation.
60169a0819Smrg
61169a0819Smrg  5. You can remove the program binaries and object files from the
62169a0819Smrg     source code directory by typing `make clean'.  To also remove the
63169a0819Smrg     files that `configure' created (so you can compile the package for
64169a0819Smrg     a different kind of computer), type `make distclean'.  There is
65169a0819Smrg     also a `make maintainer-clean' target, but that is intended mainly
66169a0819Smrg     for the package's developers.  If you use it, you may have to get
67169a0819Smrg     all sorts of other programs in order to regenerate files that came
68169a0819Smrg     with the distribution.
69169a0819Smrg
70169a0819Smrg  6. Often, you can also type `make uninstall' to remove the installed
71169a0819Smrg     files again.
72169a0819Smrg
73169a0819SmrgCompilers and Options
74169a0819Smrg=====================
75169a0819Smrg
76169a0819Smrg   Some systems require unusual options for compilation or linking that
77169a0819Smrgthe `configure' script does not know about.  Run `./configure --help'
78169a0819Smrgfor details on some of the pertinent environment variables.
79169a0819Smrg
80169a0819Smrg   You can give `configure' initial values for configuration parameters
81169a0819Smrgby setting variables in the command line or in the environment.  Here
82169a0819Smrgis an example:
83169a0819Smrg
84169a0819Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
85169a0819Smrg
86169a0819Smrg   *Note Defining Variables::, for more details.
87169a0819Smrg
88169a0819SmrgCompiling For Multiple Architectures
89169a0819Smrg====================================
90169a0819Smrg
91169a0819Smrg   You can compile the package for more than one kind of computer at the
92169a0819Smrgsame time, by placing the object files for each architecture in their
93169a0819Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
94169a0819Smrgdirectory where you want the object files and executables to go and run
95169a0819Smrgthe `configure' script.  `configure' automatically checks for the
96169a0819Smrgsource code in the directory that `configure' is in and in `..'.
97169a0819Smrg
98169a0819Smrg   With a non-GNU `make', it is safer to compile the package for one
99169a0819Smrgarchitecture at a time in the source code directory.  After you have
100169a0819Smrginstalled the package for one architecture, use `make distclean' before
101169a0819Smrgreconfiguring for another architecture.
102169a0819Smrg
103169a0819Smrg   On MacOS X 10.5 and later systems, you can create libraries and
104169a0819Smrgexecutables that work on multiple system types--known as "fat" or
105169a0819Smrg"universal" binaries--by specifying multiple `-arch' options to the
106169a0819Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
107169a0819Smrgthis:
108169a0819Smrg
109169a0819Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110169a0819Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
111169a0819Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
112169a0819Smrg
113169a0819Smrg   This is not guaranteed to produce working output in all cases, you
114169a0819Smrgmay have to build one architecture at a time and combine the results
115169a0819Smrgusing the `lipo' tool if you have problems.
116169a0819Smrg
117169a0819SmrgInstallation Names
118169a0819Smrg==================
119169a0819Smrg
120169a0819Smrg   By default, `make install' installs the package's commands under
121169a0819Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
122169a0819Smrgcan specify an installation prefix other than `/usr/local' by giving
123169a0819Smrg`configure' the option `--prefix=PREFIX'.
124169a0819Smrg
125169a0819Smrg   You can specify separate installation prefixes for
126169a0819Smrgarchitecture-specific files and architecture-independent files.  If you
127169a0819Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
128169a0819SmrgPREFIX as the prefix for installing programs and libraries.
129169a0819SmrgDocumentation and other data files still use the regular prefix.
130169a0819Smrg
131169a0819Smrg   In addition, if you use an unusual directory layout you can give
132169a0819Smrgoptions like `--bindir=DIR' to specify different values for particular
133169a0819Smrgkinds of files.  Run `configure --help' for a list of the directories
134169a0819Smrgyou can set and what kinds of files go in them.
135169a0819Smrg
136169a0819Smrg   If the package supports it, you can cause programs to be installed
137169a0819Smrgwith an extra prefix or suffix on their names by giving `configure' the
138169a0819Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
139169a0819Smrg
140169a0819SmrgOptional Features
141169a0819Smrg=================
142169a0819Smrg
143169a0819Smrg   Some packages pay attention to `--enable-FEATURE' options to
144169a0819Smrg`configure', where FEATURE indicates an optional part of the package.
145169a0819SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
146169a0819Smrgis something like `gnu-as' or `x' (for the X Window System).  The
147169a0819Smrg`README' should mention any `--enable-' and `--with-' options that the
148169a0819Smrgpackage recognizes.
149169a0819Smrg
150169a0819Smrg   For packages that use the X Window System, `configure' can usually
151169a0819Smrgfind the X include and library files automatically, but if it doesn't,
152169a0819Smrgyou can use the `configure' options `--x-includes=DIR' and
153169a0819Smrg`--x-libraries=DIR' to specify their locations.
154169a0819Smrg
155169a0819SmrgParticular systems
156169a0819Smrg==================
157169a0819Smrg
158169a0819Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
159169a0819SmrgCC is not installed, it is recommended to use the following options in
160169a0819Smrgorder to use an ANSI C compiler:
161169a0819Smrg
162169a0819Smrg     ./configure CC="cc -Ae"
163169a0819Smrg
164169a0819Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
165169a0819Smrg
166169a0819Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
167169a0819Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
168169a0819Smrga workaround.  If GNU CC is not installed, it is therefore recommended
169169a0819Smrgto try
170169a0819Smrg
171169a0819Smrg     ./configure CC="cc"
172169a0819Smrg
173169a0819Smrgand if that doesn't work, try
174169a0819Smrg
175169a0819Smrg     ./configure CC="cc -nodtk"
176169a0819Smrg
177169a0819SmrgSpecifying the System Type
178169a0819Smrg==========================
179169a0819Smrg
180169a0819Smrg   There may be some features `configure' cannot figure out
181169a0819Smrgautomatically, but needs to determine by the type of machine the package
182169a0819Smrgwill run on.  Usually, assuming the package is built to be run on the
183169a0819Smrg_same_ architectures, `configure' can figure that out, but if it prints
184169a0819Smrga message saying it cannot guess the machine type, give it the
185169a0819Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
186169a0819Smrgtype, such as `sun4', or a canonical name which has the form:
187169a0819Smrg
188169a0819Smrg     CPU-COMPANY-SYSTEM
189169a0819Smrg
190169a0819Smrgwhere SYSTEM can have one of these forms:
191169a0819Smrg
192169a0819Smrg     OS KERNEL-OS
193169a0819Smrg
194169a0819Smrg   See the file `config.sub' for the possible values of each field.  If
195169a0819Smrg`config.sub' isn't included in this package, then this package doesn't
196169a0819Smrgneed to know the machine type.
197169a0819Smrg
198169a0819Smrg   If you are _building_ compiler tools for cross-compiling, you should
199169a0819Smrguse the option `--target=TYPE' to select the type of system they will
200169a0819Smrgproduce code for.
201169a0819Smrg
202169a0819Smrg   If you want to _use_ a cross compiler, that generates code for a
203169a0819Smrgplatform different from the build platform, you should specify the
204169a0819Smrg"host" platform (i.e., that on which the generated programs will
205169a0819Smrgeventually be run) with `--host=TYPE'.
206169a0819Smrg
207169a0819SmrgSharing Defaults
208169a0819Smrg================
209169a0819Smrg
210169a0819Smrg   If you want to set default values for `configure' scripts to share,
211169a0819Smrgyou can create a site shell script called `config.site' that gives
212169a0819Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
213169a0819Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
214169a0819Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
215169a0819Smrg`CONFIG_SITE' environment variable to the location of the site script.
216169a0819SmrgA warning: not all `configure' scripts look for a site script.
217169a0819Smrg
218169a0819SmrgDefining Variables
219169a0819Smrg==================
220169a0819Smrg
221169a0819Smrg   Variables not defined in a site shell script can be set in the
222169a0819Smrgenvironment passed to `configure'.  However, some packages may run
223169a0819Smrgconfigure again during the build, and the customized values of these
224169a0819Smrgvariables may be lost.  In order to avoid this problem, you should set
225169a0819Smrgthem in the `configure' command line, using `VAR=value'.  For example:
226169a0819Smrg
227169a0819Smrg     ./configure CC=/usr/local2/bin/gcc
228169a0819Smrg
229169a0819Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
230169a0819Smrgoverridden in the site shell script).
231169a0819Smrg
232169a0819SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
233169a0819Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
234169a0819Smrg
235169a0819Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
236169a0819Smrg
237169a0819Smrg`configure' Invocation
238169a0819Smrg======================
239169a0819Smrg
240169a0819Smrg   `configure' recognizes the following options to control how it
241169a0819Smrgoperates.
242169a0819Smrg
243169a0819Smrg`--help'
244169a0819Smrg`-h'
245169a0819Smrg     Print a summary of all of the options to `configure', and exit.
246169a0819Smrg
247169a0819Smrg`--help=short'
248169a0819Smrg`--help=recursive'
249169a0819Smrg     Print a summary of the options unique to this package's
250169a0819Smrg     `configure', and exit.  The `short' variant lists options used
251169a0819Smrg     only in the top level, while the `recursive' variant lists options
252169a0819Smrg     also present in any nested packages.
253169a0819Smrg
254169a0819Smrg`--version'
255169a0819Smrg`-V'
256169a0819Smrg     Print the version of Autoconf used to generate the `configure'
257169a0819Smrg     script, and exit.
258169a0819Smrg
259169a0819Smrg`--cache-file=FILE'
260169a0819Smrg     Enable the cache: use and save the results of the tests in FILE,
261169a0819Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
262169a0819Smrg     disable caching.
263169a0819Smrg
264169a0819Smrg`--config-cache'
265169a0819Smrg`-C'
266169a0819Smrg     Alias for `--cache-file=config.cache'.
267169a0819Smrg
268169a0819Smrg`--quiet'
269169a0819Smrg`--silent'
270169a0819Smrg`-q'
271169a0819Smrg     Do not print messages saying which checks are being made.  To
272169a0819Smrg     suppress all normal output, redirect it to `/dev/null' (any error
273169a0819Smrg     messages will still be shown).
274169a0819Smrg
275169a0819Smrg`--srcdir=DIR'
276169a0819Smrg     Look for the package's source code in directory DIR.  Usually
277169a0819Smrg     `configure' can determine that directory automatically.
278169a0819Smrg
279169a0819Smrg`--prefix=DIR'
280169a0819Smrg     Use DIR as the installation prefix.  *Note Installation Names::
281169a0819Smrg     for more details, including other options available for fine-tuning
282169a0819Smrg     the installation locations.
283169a0819Smrg
284169a0819Smrg`--no-create'
285169a0819Smrg`-n'
286169a0819Smrg     Run the configure checks, but stop before creating any output
287169a0819Smrg     files.
288169a0819Smrg
289169a0819Smrg`configure' also accepts some other, not widely useful, options.  Run
290169a0819Smrg`configure --help' for more details.
291169a0819Smrg
292