1356f6debSmrgInstallation Instructions
2356f6debSmrg*************************
3356f6debSmrg
4c1e3c5d0SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5c1e3c5d0SmrgInc.
6356f6debSmrg
7c1e3c5d0Smrg   Copying and distribution of this file, with or without modification,
8c1e3c5d0Smrgare permitted in any medium without royalty provided the copyright
9c1e3c5d0Smrgnotice and this notice are preserved.  This file is offered as-is,
10c1e3c5d0Smrgwithout warranty of any kind.
11356f6debSmrg
12356f6debSmrgBasic Installation
13356f6debSmrg==================
14356f6debSmrg
15356f6debSmrg   Briefly, the shell commands `./configure; make; make install' should
16356f6debSmrgconfigure, build, and install this package.  The following
17356f6debSmrgmore-detailed instructions are generic; see the `README' file for
18c1e3c5d0Smrginstructions specific to this package.  Some packages provide this
19c1e3c5d0Smrg`INSTALL' file but do not implement all of the features documented
20c1e3c5d0Smrgbelow.  The lack of an optional feature in a given package is not
21c1e3c5d0Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22c1e3c5d0Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23356f6debSmrg
24356f6debSmrg   The `configure' shell script attempts to guess correct values for
25356f6debSmrgvarious system-dependent variables used during compilation.  It uses
26356f6debSmrgthose values to create a `Makefile' in each directory of the package.
27356f6debSmrgIt may also create one or more `.h' files containing system-dependent
28356f6debSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29356f6debSmrgyou can run in the future to recreate the current configuration, and a
30356f6debSmrgfile `config.log' containing compiler output (useful mainly for
31356f6debSmrgdebugging `configure').
32356f6debSmrg
33356f6debSmrg   It can also use an optional file (typically called `config.cache'
34356f6debSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35356f6debSmrgthe results of its tests to speed up reconfiguring.  Caching is
36356f6debSmrgdisabled by default to prevent problems with accidental use of stale
37356f6debSmrgcache files.
38356f6debSmrg
39356f6debSmrg   If you need to do unusual things to compile the package, please try
40356f6debSmrgto figure out how `configure' could check whether to do them, and mail
41356f6debSmrgdiffs or instructions to the address given in the `README' so they can
42356f6debSmrgbe considered for the next release.  If you are using the cache, and at
43356f6debSmrgsome point `config.cache' contains results you don't want to keep, you
44356f6debSmrgmay remove or edit it.
45356f6debSmrg
46356f6debSmrg   The file `configure.ac' (or `configure.in') is used to create
47356f6debSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48356f6debSmrgyou want to change it or regenerate `configure' using a newer version
49356f6debSmrgof `autoconf'.
50356f6debSmrg
51c1e3c5d0Smrg   The simplest way to compile this package is:
52356f6debSmrg
53356f6debSmrg  1. `cd' to the directory containing the package's source code and type
54356f6debSmrg     `./configure' to configure the package for your system.
55356f6debSmrg
56356f6debSmrg     Running `configure' might take a while.  While running, it prints
57356f6debSmrg     some messages telling which features it is checking for.
58356f6debSmrg
59356f6debSmrg  2. Type `make' to compile the package.
60356f6debSmrg
61356f6debSmrg  3. Optionally, type `make check' to run any self-tests that come with
62c1e3c5d0Smrg     the package, generally using the just-built uninstalled binaries.
63356f6debSmrg
64356f6debSmrg  4. Type `make install' to install the programs and any data files and
65c1e3c5d0Smrg     documentation.  When installing into a prefix owned by root, it is
66c1e3c5d0Smrg     recommended that the package be configured and built as a regular
67c1e3c5d0Smrg     user, and only the `make install' phase executed with root
68c1e3c5d0Smrg     privileges.
69c1e3c5d0Smrg
70c1e3c5d0Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71c1e3c5d0Smrg     this time using the binaries in their final installed location.
72c1e3c5d0Smrg     This target does not install anything.  Running this target as a
73c1e3c5d0Smrg     regular user, particularly if the prior `make install' required
74c1e3c5d0Smrg     root privileges, verifies that the installation completed
75c1e3c5d0Smrg     correctly.
76c1e3c5d0Smrg
77c1e3c5d0Smrg  6. You can remove the program binaries and object files from the
78356f6debSmrg     source code directory by typing `make clean'.  To also remove the
79356f6debSmrg     files that `configure' created (so you can compile the package for
80356f6debSmrg     a different kind of computer), type `make distclean'.  There is
81356f6debSmrg     also a `make maintainer-clean' target, but that is intended mainly
82356f6debSmrg     for the package's developers.  If you use it, you may have to get
83356f6debSmrg     all sorts of other programs in order to regenerate files that came
84356f6debSmrg     with the distribution.
85356f6debSmrg
86c1e3c5d0Smrg  7. Often, you can also type `make uninstall' to remove the installed
87c1e3c5d0Smrg     files again.  In practice, not all packages have tested that
88c1e3c5d0Smrg     uninstallation works correctly, even though it is required by the
89c1e3c5d0Smrg     GNU Coding Standards.
90c1e3c5d0Smrg
91c1e3c5d0Smrg  8. Some packages, particularly those that use Automake, provide `make
92c1e3c5d0Smrg     distcheck', which can by used by developers to test that all other
93c1e3c5d0Smrg     targets like `make install' and `make uninstall' work correctly.
94c1e3c5d0Smrg     This target is generally not run by end users.
95356f6debSmrg
96356f6debSmrgCompilers and Options
97356f6debSmrg=====================
98356f6debSmrg
99356f6debSmrg   Some systems require unusual options for compilation or linking that
100356f6debSmrgthe `configure' script does not know about.  Run `./configure --help'
101356f6debSmrgfor details on some of the pertinent environment variables.
102356f6debSmrg
103356f6debSmrg   You can give `configure' initial values for configuration parameters
104356f6debSmrgby setting variables in the command line or in the environment.  Here
105356f6debSmrgis an example:
106356f6debSmrg
107356f6debSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108356f6debSmrg
109356f6debSmrg   *Note Defining Variables::, for more details.
110356f6debSmrg
111356f6debSmrgCompiling For Multiple Architectures
112356f6debSmrg====================================
113356f6debSmrg
114356f6debSmrg   You can compile the package for more than one kind of computer at the
115356f6debSmrgsame time, by placing the object files for each architecture in their
116356f6debSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117356f6debSmrgdirectory where you want the object files and executables to go and run
118356f6debSmrgthe `configure' script.  `configure' automatically checks for the
119c1e3c5d0Smrgsource code in the directory that `configure' is in and in `..'.  This
120c1e3c5d0Smrgis known as a "VPATH" build.
121356f6debSmrg
122356f6debSmrg   With a non-GNU `make', it is safer to compile the package for one
123356f6debSmrgarchitecture at a time in the source code directory.  After you have
124356f6debSmrginstalled the package for one architecture, use `make distclean' before
125356f6debSmrgreconfiguring for another architecture.
126356f6debSmrg
127356f6debSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128356f6debSmrgexecutables that work on multiple system types--known as "fat" or
129356f6debSmrg"universal" binaries--by specifying multiple `-arch' options to the
130356f6debSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131356f6debSmrgthis:
132356f6debSmrg
133356f6debSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134356f6debSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135356f6debSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136356f6debSmrg
137356f6debSmrg   This is not guaranteed to produce working output in all cases, you
138356f6debSmrgmay have to build one architecture at a time and combine the results
139356f6debSmrgusing the `lipo' tool if you have problems.
140356f6debSmrg
141356f6debSmrgInstallation Names
142356f6debSmrg==================
143356f6debSmrg
144356f6debSmrg   By default, `make install' installs the package's commands under
145356f6debSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146356f6debSmrgcan specify an installation prefix other than `/usr/local' by giving
147c1e3c5d0Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148c1e3c5d0Smrgabsolute file name.
149356f6debSmrg
150356f6debSmrg   You can specify separate installation prefixes for
151356f6debSmrgarchitecture-specific files and architecture-independent files.  If you
152356f6debSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153356f6debSmrgPREFIX as the prefix for installing programs and libraries.
154356f6debSmrgDocumentation and other data files still use the regular prefix.
155356f6debSmrg
156356f6debSmrg   In addition, if you use an unusual directory layout you can give
157356f6debSmrgoptions like `--bindir=DIR' to specify different values for particular
158356f6debSmrgkinds of files.  Run `configure --help' for a list of the directories
159c1e3c5d0Smrgyou can set and what kinds of files go in them.  In general, the
160c1e3c5d0Smrgdefault for these options is expressed in terms of `${prefix}', so that
161c1e3c5d0Smrgspecifying just `--prefix' will affect all of the other directory
162c1e3c5d0Smrgspecifications that were not explicitly provided.
163c1e3c5d0Smrg
164c1e3c5d0Smrg   The most portable way to affect installation locations is to pass the
165c1e3c5d0Smrgcorrect locations to `configure'; however, many packages provide one or
166c1e3c5d0Smrgboth of the following shortcuts of passing variable assignments to the
167c1e3c5d0Smrg`make install' command line to change installation locations without
168c1e3c5d0Smrghaving to reconfigure or recompile.
169c1e3c5d0Smrg
170c1e3c5d0Smrg   The first method involves providing an override variable for each
171c1e3c5d0Smrgaffected directory.  For example, `make install
172c1e3c5d0Smrgprefix=/alternate/directory' will choose an alternate location for all
173c1e3c5d0Smrgdirectory configuration variables that were expressed in terms of
174c1e3c5d0Smrg`${prefix}'.  Any directories that were specified during `configure',
175c1e3c5d0Smrgbut not in terms of `${prefix}', must each be overridden at install
176c1e3c5d0Smrgtime for the entire installation to be relocated.  The approach of
177c1e3c5d0Smrgmakefile variable overrides for each directory variable is required by
178c1e3c5d0Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179c1e3c5d0SmrgHowever, some platforms have known limitations with the semantics of
180c1e3c5d0Smrgshared libraries that end up requiring recompilation when using this
181c1e3c5d0Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182c1e3c5d0Smrg
183c1e3c5d0Smrg   The second method involves providing the `DESTDIR' variable.  For
184c1e3c5d0Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185c1e3c5d0Smrg`/alternate/directory' before all installation names.  The approach of
186c1e3c5d0Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187c1e3c5d0Smrgdoes not work on platforms that have drive letters.  On the other hand,
188c1e3c5d0Smrgit does better at avoiding recompilation issues, and works well even
189c1e3c5d0Smrgwhen some directory options were not specified in terms of `${prefix}'
190c1e3c5d0Smrgat `configure' time.
191c1e3c5d0Smrg
192c1e3c5d0SmrgOptional Features
193c1e3c5d0Smrg=================
194356f6debSmrg
195356f6debSmrg   If the package supports it, you can cause programs to be installed
196356f6debSmrgwith an extra prefix or suffix on their names by giving `configure' the
197356f6debSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198356f6debSmrg
199356f6debSmrg   Some packages pay attention to `--enable-FEATURE' options to
200356f6debSmrg`configure', where FEATURE indicates an optional part of the package.
201356f6debSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202356f6debSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203356f6debSmrg`README' should mention any `--enable-' and `--with-' options that the
204356f6debSmrgpackage recognizes.
205356f6debSmrg
206356f6debSmrg   For packages that use the X Window System, `configure' can usually
207356f6debSmrgfind the X include and library files automatically, but if it doesn't,
208356f6debSmrgyou can use the `configure' options `--x-includes=DIR' and
209356f6debSmrg`--x-libraries=DIR' to specify their locations.
210356f6debSmrg
211c1e3c5d0Smrg   Some packages offer the ability to configure how verbose the
212c1e3c5d0Smrgexecution of `make' will be.  For these packages, running `./configure
213c1e3c5d0Smrg--enable-silent-rules' sets the default to minimal output, which can be
214c1e3c5d0Smrgoverridden with `make V=1'; while running `./configure
215c1e3c5d0Smrg--disable-silent-rules' sets the default to verbose, which can be
216c1e3c5d0Smrgoverridden with `make V=0'.
217c1e3c5d0Smrg
218356f6debSmrgParticular systems
219356f6debSmrg==================
220356f6debSmrg
221356f6debSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222356f6debSmrgCC is not installed, it is recommended to use the following options in
223356f6debSmrgorder to use an ANSI C compiler:
224356f6debSmrg
225c1e3c5d0Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226356f6debSmrg
227356f6debSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228356f6debSmrg
229c1e3c5d0Smrg   HP-UX `make' updates targets which have the same time stamps as
230c1e3c5d0Smrgtheir prerequisites, which makes it generally unusable when shipped
231c1e3c5d0Smrggenerated files such as `configure' are involved.  Use GNU `make'
232c1e3c5d0Smrginstead.
233c1e3c5d0Smrg
234356f6debSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235356f6debSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236356f6debSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237356f6debSmrgto try
238356f6debSmrg
239356f6debSmrg     ./configure CC="cc"
240356f6debSmrg
241356f6debSmrgand if that doesn't work, try
242356f6debSmrg
243356f6debSmrg     ./configure CC="cc -nodtk"
244356f6debSmrg
245c1e3c5d0Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246c1e3c5d0Smrgdirectory contains several dysfunctional programs; working variants of
247c1e3c5d0Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248c1e3c5d0Smrgin your `PATH', put it _after_ `/usr/bin'.
249c1e3c5d0Smrg
250c1e3c5d0Smrg   On Haiku, software installed for all users goes in `/boot/common',
251c1e3c5d0Smrgnot `/usr/local'.  It is recommended to use the following options:
252c1e3c5d0Smrg
253c1e3c5d0Smrg     ./configure --prefix=/boot/common
254c1e3c5d0Smrg
255356f6debSmrgSpecifying the System Type
256356f6debSmrg==========================
257356f6debSmrg
258356f6debSmrg   There may be some features `configure' cannot figure out
259356f6debSmrgautomatically, but needs to determine by the type of machine the package
260356f6debSmrgwill run on.  Usually, assuming the package is built to be run on the
261356f6debSmrg_same_ architectures, `configure' can figure that out, but if it prints
262356f6debSmrga message saying it cannot guess the machine type, give it the
263356f6debSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264356f6debSmrgtype, such as `sun4', or a canonical name which has the form:
265356f6debSmrg
266356f6debSmrg     CPU-COMPANY-SYSTEM
267356f6debSmrg
268356f6debSmrgwhere SYSTEM can have one of these forms:
269356f6debSmrg
270c1e3c5d0Smrg     OS
271c1e3c5d0Smrg     KERNEL-OS
272356f6debSmrg
273356f6debSmrg   See the file `config.sub' for the possible values of each field.  If
274356f6debSmrg`config.sub' isn't included in this package, then this package doesn't
275356f6debSmrgneed to know the machine type.
276356f6debSmrg
277356f6debSmrg   If you are _building_ compiler tools for cross-compiling, you should
278356f6debSmrguse the option `--target=TYPE' to select the type of system they will
279356f6debSmrgproduce code for.
280356f6debSmrg
281356f6debSmrg   If you want to _use_ a cross compiler, that generates code for a
282356f6debSmrgplatform different from the build platform, you should specify the
283356f6debSmrg"host" platform (i.e., that on which the generated programs will
284356f6debSmrgeventually be run) with `--host=TYPE'.
285356f6debSmrg
286356f6debSmrgSharing Defaults
287356f6debSmrg================
288356f6debSmrg
289356f6debSmrg   If you want to set default values for `configure' scripts to share,
290356f6debSmrgyou can create a site shell script called `config.site' that gives
291356f6debSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292356f6debSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293356f6debSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294356f6debSmrg`CONFIG_SITE' environment variable to the location of the site script.
295356f6debSmrgA warning: not all `configure' scripts look for a site script.
296356f6debSmrg
297356f6debSmrgDefining Variables
298356f6debSmrg==================
299356f6debSmrg
300356f6debSmrg   Variables not defined in a site shell script can be set in the
301356f6debSmrgenvironment passed to `configure'.  However, some packages may run
302356f6debSmrgconfigure again during the build, and the customized values of these
303356f6debSmrgvariables may be lost.  In order to avoid this problem, you should set
304356f6debSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305356f6debSmrg
306356f6debSmrg     ./configure CC=/usr/local2/bin/gcc
307356f6debSmrg
308356f6debSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309356f6debSmrgoverridden in the site shell script).
310356f6debSmrg
311356f6debSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312356f6debSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313356f6debSmrg
314356f6debSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315356f6debSmrg
316356f6debSmrg`configure' Invocation
317356f6debSmrg======================
318356f6debSmrg
319356f6debSmrg   `configure' recognizes the following options to control how it
320356f6debSmrgoperates.
321356f6debSmrg
322356f6debSmrg`--help'
323356f6debSmrg`-h'
324356f6debSmrg     Print a summary of all of the options to `configure', and exit.
325356f6debSmrg
326356f6debSmrg`--help=short'
327356f6debSmrg`--help=recursive'
328356f6debSmrg     Print a summary of the options unique to this package's
329356f6debSmrg     `configure', and exit.  The `short' variant lists options used
330356f6debSmrg     only in the top level, while the `recursive' variant lists options
331356f6debSmrg     also present in any nested packages.
332356f6debSmrg
333356f6debSmrg`--version'
334356f6debSmrg`-V'
335356f6debSmrg     Print the version of Autoconf used to generate the `configure'
336356f6debSmrg     script, and exit.
337356f6debSmrg
338356f6debSmrg`--cache-file=FILE'
339356f6debSmrg     Enable the cache: use and save the results of the tests in FILE,
340356f6debSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341356f6debSmrg     disable caching.
342356f6debSmrg
343356f6debSmrg`--config-cache'
344356f6debSmrg`-C'
345356f6debSmrg     Alias for `--cache-file=config.cache'.
346356f6debSmrg
347356f6debSmrg`--quiet'
348356f6debSmrg`--silent'
349356f6debSmrg`-q'
350356f6debSmrg     Do not print messages saying which checks are being made.  To
351356f6debSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352356f6debSmrg     messages will still be shown).
353356f6debSmrg
354356f6debSmrg`--srcdir=DIR'
355356f6debSmrg     Look for the package's source code in directory DIR.  Usually
356356f6debSmrg     `configure' can determine that directory automatically.
357356f6debSmrg
358356f6debSmrg`--prefix=DIR'
359c1e3c5d0Smrg     Use DIR as the installation prefix.  *note Installation Names::
360356f6debSmrg     for more details, including other options available for fine-tuning
361356f6debSmrg     the installation locations.
362356f6debSmrg
363356f6debSmrg`--no-create'
364356f6debSmrg`-n'
365356f6debSmrg     Run the configure checks, but stop before creating any output
366356f6debSmrg     files.
367356f6debSmrg
368356f6debSmrg`configure' also accepts some other, not widely useful, options.  Run
369356f6debSmrg`configure --help' for more details.
370356f6debSmrg
371