1909209eeSmrgInstallation Instructions
2909209eeSmrg*************************
3909209eeSmrg
4e2463426SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5e2463426SmrgInc.
6909209eeSmrg
7e2463426Smrg   Copying and distribution of this file, with or without modification,
8e2463426Smrgare permitted in any medium without royalty provided the copyright
9e2463426Smrgnotice and this notice are preserved.  This file is offered as-is,
10e2463426Smrgwithout warranty of any kind.
11909209eeSmrg
12909209eeSmrgBasic Installation
13909209eeSmrg==================
14909209eeSmrg
15909209eeSmrg   Briefly, the shell commands `./configure; make; make install' should
16909209eeSmrgconfigure, build, and install this package.  The following
17909209eeSmrgmore-detailed instructions are generic; see the `README' file for
18e2463426Smrginstructions specific to this package.  Some packages provide this
19e2463426Smrg`INSTALL' file but do not implement all of the features documented
20e2463426Smrgbelow.  The lack of an optional feature in a given package is not
21e2463426Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22e2463426Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23909209eeSmrg
24909209eeSmrg   The `configure' shell script attempts to guess correct values for
25909209eeSmrgvarious system-dependent variables used during compilation.  It uses
26909209eeSmrgthose values to create a `Makefile' in each directory of the package.
27909209eeSmrgIt may also create one or more `.h' files containing system-dependent
28909209eeSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29909209eeSmrgyou can run in the future to recreate the current configuration, and a
30909209eeSmrgfile `config.log' containing compiler output (useful mainly for
31909209eeSmrgdebugging `configure').
32909209eeSmrg
33909209eeSmrg   It can also use an optional file (typically called `config.cache'
34909209eeSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35909209eeSmrgthe results of its tests to speed up reconfiguring.  Caching is
36909209eeSmrgdisabled by default to prevent problems with accidental use of stale
37909209eeSmrgcache files.
38909209eeSmrg
39909209eeSmrg   If you need to do unusual things to compile the package, please try
40909209eeSmrgto figure out how `configure' could check whether to do them, and mail
41909209eeSmrgdiffs or instructions to the address given in the `README' so they can
42909209eeSmrgbe considered for the next release.  If you are using the cache, and at
43909209eeSmrgsome point `config.cache' contains results you don't want to keep, you
44909209eeSmrgmay remove or edit it.
45909209eeSmrg
46909209eeSmrg   The file `configure.ac' (or `configure.in') is used to create
47909209eeSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48909209eeSmrgyou want to change it or regenerate `configure' using a newer version
49909209eeSmrgof `autoconf'.
50909209eeSmrg
51e2463426Smrg   The simplest way to compile this package is:
52909209eeSmrg
53909209eeSmrg  1. `cd' to the directory containing the package's source code and type
54909209eeSmrg     `./configure' to configure the package for your system.
55909209eeSmrg
56909209eeSmrg     Running `configure' might take a while.  While running, it prints
57909209eeSmrg     some messages telling which features it is checking for.
58909209eeSmrg
59909209eeSmrg  2. Type `make' to compile the package.
60909209eeSmrg
61909209eeSmrg  3. Optionally, type `make check' to run any self-tests that come with
62e2463426Smrg     the package, generally using the just-built uninstalled binaries.
63909209eeSmrg
64909209eeSmrg  4. Type `make install' to install the programs and any data files and
65e2463426Smrg     documentation.  When installing into a prefix owned by root, it is
66e2463426Smrg     recommended that the package be configured and built as a regular
67e2463426Smrg     user, and only the `make install' phase executed with root
68e2463426Smrg     privileges.
69e2463426Smrg
70e2463426Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71e2463426Smrg     this time using the binaries in their final installed location.
72e2463426Smrg     This target does not install anything.  Running this target as a
73e2463426Smrg     regular user, particularly if the prior `make install' required
74e2463426Smrg     root privileges, verifies that the installation completed
75e2463426Smrg     correctly.
76e2463426Smrg
77e2463426Smrg  6. You can remove the program binaries and object files from the
78909209eeSmrg     source code directory by typing `make clean'.  To also remove the
79909209eeSmrg     files that `configure' created (so you can compile the package for
80909209eeSmrg     a different kind of computer), type `make distclean'.  There is
81909209eeSmrg     also a `make maintainer-clean' target, but that is intended mainly
82909209eeSmrg     for the package's developers.  If you use it, you may have to get
83909209eeSmrg     all sorts of other programs in order to regenerate files that came
84909209eeSmrg     with the distribution.
85909209eeSmrg
86e2463426Smrg  7. Often, you can also type `make uninstall' to remove the installed
87e2463426Smrg     files again.  In practice, not all packages have tested that
88e2463426Smrg     uninstallation works correctly, even though it is required by the
89e2463426Smrg     GNU Coding Standards.
90e2463426Smrg
91e2463426Smrg  8. Some packages, particularly those that use Automake, provide `make
92e2463426Smrg     distcheck', which can by used by developers to test that all other
93e2463426Smrg     targets like `make install' and `make uninstall' work correctly.
94e2463426Smrg     This target is generally not run by end users.
95909209eeSmrg
96909209eeSmrgCompilers and Options
97909209eeSmrg=====================
98909209eeSmrg
99909209eeSmrg   Some systems require unusual options for compilation or linking that
100909209eeSmrgthe `configure' script does not know about.  Run `./configure --help'
101909209eeSmrgfor details on some of the pertinent environment variables.
102909209eeSmrg
103909209eeSmrg   You can give `configure' initial values for configuration parameters
104909209eeSmrgby setting variables in the command line or in the environment.  Here
105909209eeSmrgis an example:
106909209eeSmrg
107909209eeSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108909209eeSmrg
109909209eeSmrg   *Note Defining Variables::, for more details.
110909209eeSmrg
111909209eeSmrgCompiling For Multiple Architectures
112909209eeSmrg====================================
113909209eeSmrg
114909209eeSmrg   You can compile the package for more than one kind of computer at the
115909209eeSmrgsame time, by placing the object files for each architecture in their
116909209eeSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117909209eeSmrgdirectory where you want the object files and executables to go and run
118909209eeSmrgthe `configure' script.  `configure' automatically checks for the
119e2463426Smrgsource code in the directory that `configure' is in and in `..'.  This
120e2463426Smrgis known as a "VPATH" build.
121909209eeSmrg
122909209eeSmrg   With a non-GNU `make', it is safer to compile the package for one
123909209eeSmrgarchitecture at a time in the source code directory.  After you have
124909209eeSmrginstalled the package for one architecture, use `make distclean' before
125909209eeSmrgreconfiguring for another architecture.
126909209eeSmrg
127909209eeSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128909209eeSmrgexecutables that work on multiple system types--known as "fat" or
129909209eeSmrg"universal" binaries--by specifying multiple `-arch' options to the
130909209eeSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131909209eeSmrgthis:
132909209eeSmrg
133909209eeSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134909209eeSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135909209eeSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136909209eeSmrg
137909209eeSmrg   This is not guaranteed to produce working output in all cases, you
138909209eeSmrgmay have to build one architecture at a time and combine the results
139909209eeSmrgusing the `lipo' tool if you have problems.
140909209eeSmrg
141909209eeSmrgInstallation Names
142909209eeSmrg==================
143909209eeSmrg
144909209eeSmrg   By default, `make install' installs the package's commands under
145909209eeSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146909209eeSmrgcan specify an installation prefix other than `/usr/local' by giving
147e2463426Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148e2463426Smrgabsolute file name.
149909209eeSmrg
150909209eeSmrg   You can specify separate installation prefixes for
151909209eeSmrgarchitecture-specific files and architecture-independent files.  If you
152909209eeSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153909209eeSmrgPREFIX as the prefix for installing programs and libraries.
154909209eeSmrgDocumentation and other data files still use the regular prefix.
155909209eeSmrg
156909209eeSmrg   In addition, if you use an unusual directory layout you can give
157909209eeSmrgoptions like `--bindir=DIR' to specify different values for particular
158909209eeSmrgkinds of files.  Run `configure --help' for a list of the directories
159e2463426Smrgyou can set and what kinds of files go in them.  In general, the
160e2463426Smrgdefault for these options is expressed in terms of `${prefix}', so that
161e2463426Smrgspecifying just `--prefix' will affect all of the other directory
162e2463426Smrgspecifications that were not explicitly provided.
163e2463426Smrg
164e2463426Smrg   The most portable way to affect installation locations is to pass the
165e2463426Smrgcorrect locations to `configure'; however, many packages provide one or
166e2463426Smrgboth of the following shortcuts of passing variable assignments to the
167e2463426Smrg`make install' command line to change installation locations without
168e2463426Smrghaving to reconfigure or recompile.
169e2463426Smrg
170e2463426Smrg   The first method involves providing an override variable for each
171e2463426Smrgaffected directory.  For example, `make install
172e2463426Smrgprefix=/alternate/directory' will choose an alternate location for all
173e2463426Smrgdirectory configuration variables that were expressed in terms of
174e2463426Smrg`${prefix}'.  Any directories that were specified during `configure',
175e2463426Smrgbut not in terms of `${prefix}', must each be overridden at install
176e2463426Smrgtime for the entire installation to be relocated.  The approach of
177e2463426Smrgmakefile variable overrides for each directory variable is required by
178e2463426Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179e2463426SmrgHowever, some platforms have known limitations with the semantics of
180e2463426Smrgshared libraries that end up requiring recompilation when using this
181e2463426Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182e2463426Smrg
183e2463426Smrg   The second method involves providing the `DESTDIR' variable.  For
184e2463426Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185e2463426Smrg`/alternate/directory' before all installation names.  The approach of
186e2463426Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187e2463426Smrgdoes not work on platforms that have drive letters.  On the other hand,
188e2463426Smrgit does better at avoiding recompilation issues, and works well even
189e2463426Smrgwhen some directory options were not specified in terms of `${prefix}'
190e2463426Smrgat `configure' time.
191e2463426Smrg
192e2463426SmrgOptional Features
193e2463426Smrg=================
194909209eeSmrg
195909209eeSmrg   If the package supports it, you can cause programs to be installed
196909209eeSmrgwith an extra prefix or suffix on their names by giving `configure' the
197909209eeSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198909209eeSmrg
199909209eeSmrg   Some packages pay attention to `--enable-FEATURE' options to
200909209eeSmrg`configure', where FEATURE indicates an optional part of the package.
201909209eeSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202909209eeSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203909209eeSmrg`README' should mention any `--enable-' and `--with-' options that the
204909209eeSmrgpackage recognizes.
205909209eeSmrg
206909209eeSmrg   For packages that use the X Window System, `configure' can usually
207909209eeSmrgfind the X include and library files automatically, but if it doesn't,
208909209eeSmrgyou can use the `configure' options `--x-includes=DIR' and
209909209eeSmrg`--x-libraries=DIR' to specify their locations.
210909209eeSmrg
211e2463426Smrg   Some packages offer the ability to configure how verbose the
212e2463426Smrgexecution of `make' will be.  For these packages, running `./configure
213e2463426Smrg--enable-silent-rules' sets the default to minimal output, which can be
214e2463426Smrgoverridden with `make V=1'; while running `./configure
215e2463426Smrg--disable-silent-rules' sets the default to verbose, which can be
216e2463426Smrgoverridden with `make V=0'.
217e2463426Smrg
218909209eeSmrgParticular systems
219909209eeSmrg==================
220909209eeSmrg
221909209eeSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222909209eeSmrgCC is not installed, it is recommended to use the following options in
223909209eeSmrgorder to use an ANSI C compiler:
224909209eeSmrg
225e2463426Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226909209eeSmrg
227909209eeSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228909209eeSmrg
229e2463426Smrg   HP-UX `make' updates targets which have the same time stamps as
230e2463426Smrgtheir prerequisites, which makes it generally unusable when shipped
231e2463426Smrggenerated files such as `configure' are involved.  Use GNU `make'
232e2463426Smrginstead.
233e2463426Smrg
234909209eeSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235909209eeSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236909209eeSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237909209eeSmrgto try
238909209eeSmrg
239909209eeSmrg     ./configure CC="cc"
240909209eeSmrg
241909209eeSmrgand if that doesn't work, try
242909209eeSmrg
243909209eeSmrg     ./configure CC="cc -nodtk"
244909209eeSmrg
245e2463426Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246e2463426Smrgdirectory contains several dysfunctional programs; working variants of
247e2463426Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248e2463426Smrgin your `PATH', put it _after_ `/usr/bin'.
249e2463426Smrg
250e2463426Smrg   On Haiku, software installed for all users goes in `/boot/common',
251e2463426Smrgnot `/usr/local'.  It is recommended to use the following options:
252e2463426Smrg
253e2463426Smrg     ./configure --prefix=/boot/common
254e2463426Smrg
255909209eeSmrgSpecifying the System Type
256909209eeSmrg==========================
257909209eeSmrg
258909209eeSmrg   There may be some features `configure' cannot figure out
259909209eeSmrgautomatically, but needs to determine by the type of machine the package
260909209eeSmrgwill run on.  Usually, assuming the package is built to be run on the
261909209eeSmrg_same_ architectures, `configure' can figure that out, but if it prints
262909209eeSmrga message saying it cannot guess the machine type, give it the
263909209eeSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264909209eeSmrgtype, such as `sun4', or a canonical name which has the form:
265909209eeSmrg
266909209eeSmrg     CPU-COMPANY-SYSTEM
267909209eeSmrg
268909209eeSmrgwhere SYSTEM can have one of these forms:
269909209eeSmrg
270e2463426Smrg     OS
271e2463426Smrg     KERNEL-OS
272909209eeSmrg
273909209eeSmrg   See the file `config.sub' for the possible values of each field.  If
274909209eeSmrg`config.sub' isn't included in this package, then this package doesn't
275909209eeSmrgneed to know the machine type.
276909209eeSmrg
277909209eeSmrg   If you are _building_ compiler tools for cross-compiling, you should
278909209eeSmrguse the option `--target=TYPE' to select the type of system they will
279909209eeSmrgproduce code for.
280909209eeSmrg
281909209eeSmrg   If you want to _use_ a cross compiler, that generates code for a
282909209eeSmrgplatform different from the build platform, you should specify the
283909209eeSmrg"host" platform (i.e., that on which the generated programs will
284909209eeSmrgeventually be run) with `--host=TYPE'.
285909209eeSmrg
286909209eeSmrgSharing Defaults
287909209eeSmrg================
288909209eeSmrg
289909209eeSmrg   If you want to set default values for `configure' scripts to share,
290909209eeSmrgyou can create a site shell script called `config.site' that gives
291909209eeSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292909209eeSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293909209eeSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294909209eeSmrg`CONFIG_SITE' environment variable to the location of the site script.
295909209eeSmrgA warning: not all `configure' scripts look for a site script.
296909209eeSmrg
297909209eeSmrgDefining Variables
298909209eeSmrg==================
299909209eeSmrg
300909209eeSmrg   Variables not defined in a site shell script can be set in the
301909209eeSmrgenvironment passed to `configure'.  However, some packages may run
302909209eeSmrgconfigure again during the build, and the customized values of these
303909209eeSmrgvariables may be lost.  In order to avoid this problem, you should set
304909209eeSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305909209eeSmrg
306909209eeSmrg     ./configure CC=/usr/local2/bin/gcc
307909209eeSmrg
308909209eeSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309909209eeSmrgoverridden in the site shell script).
310909209eeSmrg
311909209eeSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312909209eeSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313909209eeSmrg
314909209eeSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315909209eeSmrg
316909209eeSmrg`configure' Invocation
317909209eeSmrg======================
318909209eeSmrg
319909209eeSmrg   `configure' recognizes the following options to control how it
320909209eeSmrgoperates.
321909209eeSmrg
322909209eeSmrg`--help'
323909209eeSmrg`-h'
324909209eeSmrg     Print a summary of all of the options to `configure', and exit.
325909209eeSmrg
326909209eeSmrg`--help=short'
327909209eeSmrg`--help=recursive'
328909209eeSmrg     Print a summary of the options unique to this package's
329909209eeSmrg     `configure', and exit.  The `short' variant lists options used
330909209eeSmrg     only in the top level, while the `recursive' variant lists options
331909209eeSmrg     also present in any nested packages.
332909209eeSmrg
333909209eeSmrg`--version'
334909209eeSmrg`-V'
335909209eeSmrg     Print the version of Autoconf used to generate the `configure'
336909209eeSmrg     script, and exit.
337909209eeSmrg
338909209eeSmrg`--cache-file=FILE'
339909209eeSmrg     Enable the cache: use and save the results of the tests in FILE,
340909209eeSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341909209eeSmrg     disable caching.
342909209eeSmrg
343909209eeSmrg`--config-cache'
344909209eeSmrg`-C'
345909209eeSmrg     Alias for `--cache-file=config.cache'.
346909209eeSmrg
347909209eeSmrg`--quiet'
348909209eeSmrg`--silent'
349909209eeSmrg`-q'
350909209eeSmrg     Do not print messages saying which checks are being made.  To
351909209eeSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352909209eeSmrg     messages will still be shown).
353909209eeSmrg
354909209eeSmrg`--srcdir=DIR'
355909209eeSmrg     Look for the package's source code in directory DIR.  Usually
356909209eeSmrg     `configure' can determine that directory automatically.
357909209eeSmrg
358909209eeSmrg`--prefix=DIR'
359e2463426Smrg     Use DIR as the installation prefix.  *note Installation Names::
360909209eeSmrg     for more details, including other options available for fine-tuning
361909209eeSmrg     the installation locations.
362909209eeSmrg
363909209eeSmrg`--no-create'
364909209eeSmrg`-n'
365909209eeSmrg     Run the configure checks, but stop before creating any output
366909209eeSmrg     files.
367909209eeSmrg
368909209eeSmrg`configure' also accepts some other, not widely useful, options.  Run
369909209eeSmrg`configure --help' for more details.
370909209eeSmrg
371