1e4f6584cSmrgInstallation Instructions
2e4f6584cSmrg*************************
3e4f6584cSmrg
4df9ffc95SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5df9ffc95SmrgInc.
6e4f6584cSmrg
7df9ffc95Smrg   Copying and distribution of this file, with or without modification,
8df9ffc95Smrgare permitted in any medium without royalty provided the copyright
9df9ffc95Smrgnotice and this notice are preserved.  This file is offered as-is,
10df9ffc95Smrgwithout warranty of any kind.
11e4f6584cSmrg
12e4f6584cSmrgBasic Installation
13e4f6584cSmrg==================
14e4f6584cSmrg
15e4f6584cSmrg   Briefly, the shell commands `./configure; make; make install' should
16e4f6584cSmrgconfigure, build, and install this package.  The following
17e4f6584cSmrgmore-detailed instructions are generic; see the `README' file for
18df9ffc95Smrginstructions specific to this package.  Some packages provide this
19df9ffc95Smrg`INSTALL' file but do not implement all of the features documented
20df9ffc95Smrgbelow.  The lack of an optional feature in a given package is not
21df9ffc95Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22df9ffc95Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23e4f6584cSmrg
24e4f6584cSmrg   The `configure' shell script attempts to guess correct values for
25e4f6584cSmrgvarious system-dependent variables used during compilation.  It uses
26e4f6584cSmrgthose values to create a `Makefile' in each directory of the package.
27e4f6584cSmrgIt may also create one or more `.h' files containing system-dependent
28e4f6584cSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29e4f6584cSmrgyou can run in the future to recreate the current configuration, and a
30e4f6584cSmrgfile `config.log' containing compiler output (useful mainly for
31e4f6584cSmrgdebugging `configure').
32e4f6584cSmrg
33e4f6584cSmrg   It can also use an optional file (typically called `config.cache'
34e4f6584cSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35e4f6584cSmrgthe results of its tests to speed up reconfiguring.  Caching is
36e4f6584cSmrgdisabled by default to prevent problems with accidental use of stale
37e4f6584cSmrgcache files.
38e4f6584cSmrg
39e4f6584cSmrg   If you need to do unusual things to compile the package, please try
40e4f6584cSmrgto figure out how `configure' could check whether to do them, and mail
41e4f6584cSmrgdiffs or instructions to the address given in the `README' so they can
42e4f6584cSmrgbe considered for the next release.  If you are using the cache, and at
43e4f6584cSmrgsome point `config.cache' contains results you don't want to keep, you
44e4f6584cSmrgmay remove or edit it.
45e4f6584cSmrg
46e4f6584cSmrg   The file `configure.ac' (or `configure.in') is used to create
47e4f6584cSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48e4f6584cSmrgyou want to change it or regenerate `configure' using a newer version
49e4f6584cSmrgof `autoconf'.
50e4f6584cSmrg
51df9ffc95Smrg   The simplest way to compile this package is:
52e4f6584cSmrg
53e4f6584cSmrg  1. `cd' to the directory containing the package's source code and type
54e4f6584cSmrg     `./configure' to configure the package for your system.
55e4f6584cSmrg
56e4f6584cSmrg     Running `configure' might take a while.  While running, it prints
57e4f6584cSmrg     some messages telling which features it is checking for.
58e4f6584cSmrg
59e4f6584cSmrg  2. Type `make' to compile the package.
60e4f6584cSmrg
61e4f6584cSmrg  3. Optionally, type `make check' to run any self-tests that come with
62df9ffc95Smrg     the package, generally using the just-built uninstalled binaries.
63e4f6584cSmrg
64e4f6584cSmrg  4. Type `make install' to install the programs and any data files and
65df9ffc95Smrg     documentation.  When installing into a prefix owned by root, it is
66df9ffc95Smrg     recommended that the package be configured and built as a regular
67df9ffc95Smrg     user, and only the `make install' phase executed with root
68df9ffc95Smrg     privileges.
69df9ffc95Smrg
70df9ffc95Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71df9ffc95Smrg     this time using the binaries in their final installed location.
72df9ffc95Smrg     This target does not install anything.  Running this target as a
73df9ffc95Smrg     regular user, particularly if the prior `make install' required
74df9ffc95Smrg     root privileges, verifies that the installation completed
75df9ffc95Smrg     correctly.
76df9ffc95Smrg
77df9ffc95Smrg  6. You can remove the program binaries and object files from the
78e4f6584cSmrg     source code directory by typing `make clean'.  To also remove the
79e4f6584cSmrg     files that `configure' created (so you can compile the package for
80e4f6584cSmrg     a different kind of computer), type `make distclean'.  There is
81e4f6584cSmrg     also a `make maintainer-clean' target, but that is intended mainly
82e4f6584cSmrg     for the package's developers.  If you use it, you may have to get
83e4f6584cSmrg     all sorts of other programs in order to regenerate files that came
84e4f6584cSmrg     with the distribution.
85e4f6584cSmrg
86df9ffc95Smrg  7. Often, you can also type `make uninstall' to remove the installed
87df9ffc95Smrg     files again.  In practice, not all packages have tested that
88df9ffc95Smrg     uninstallation works correctly, even though it is required by the
89df9ffc95Smrg     GNU Coding Standards.
90df9ffc95Smrg
91df9ffc95Smrg  8. Some packages, particularly those that use Automake, provide `make
92df9ffc95Smrg     distcheck', which can by used by developers to test that all other
93df9ffc95Smrg     targets like `make install' and `make uninstall' work correctly.
94df9ffc95Smrg     This target is generally not run by end users.
95e4f6584cSmrg
96e4f6584cSmrgCompilers and Options
97e4f6584cSmrg=====================
98e4f6584cSmrg
99e4f6584cSmrg   Some systems require unusual options for compilation or linking that
100e4f6584cSmrgthe `configure' script does not know about.  Run `./configure --help'
101e4f6584cSmrgfor details on some of the pertinent environment variables.
102e4f6584cSmrg
103e4f6584cSmrg   You can give `configure' initial values for configuration parameters
104e4f6584cSmrgby setting variables in the command line or in the environment.  Here
105e4f6584cSmrgis an example:
106e4f6584cSmrg
107e4f6584cSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108e4f6584cSmrg
109e4f6584cSmrg   *Note Defining Variables::, for more details.
110e4f6584cSmrg
111e4f6584cSmrgCompiling For Multiple Architectures
112e4f6584cSmrg====================================
113e4f6584cSmrg
114e4f6584cSmrg   You can compile the package for more than one kind of computer at the
115e4f6584cSmrgsame time, by placing the object files for each architecture in their
116e4f6584cSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117e4f6584cSmrgdirectory where you want the object files and executables to go and run
118e4f6584cSmrgthe `configure' script.  `configure' automatically checks for the
119df9ffc95Smrgsource code in the directory that `configure' is in and in `..'.  This
120df9ffc95Smrgis known as a "VPATH" build.
121e4f6584cSmrg
122e4f6584cSmrg   With a non-GNU `make', it is safer to compile the package for one
123e4f6584cSmrgarchitecture at a time in the source code directory.  After you have
124e4f6584cSmrginstalled the package for one architecture, use `make distclean' before
125e4f6584cSmrgreconfiguring for another architecture.
126e4f6584cSmrg
127e4f6584cSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128e4f6584cSmrgexecutables that work on multiple system types--known as "fat" or
129e4f6584cSmrg"universal" binaries--by specifying multiple `-arch' options to the
130e4f6584cSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131e4f6584cSmrgthis:
132e4f6584cSmrg
133e4f6584cSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134e4f6584cSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135e4f6584cSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136e4f6584cSmrg
137e4f6584cSmrg   This is not guaranteed to produce working output in all cases, you
138e4f6584cSmrgmay have to build one architecture at a time and combine the results
139e4f6584cSmrgusing the `lipo' tool if you have problems.
140e4f6584cSmrg
141e4f6584cSmrgInstallation Names
142e4f6584cSmrg==================
143e4f6584cSmrg
144e4f6584cSmrg   By default, `make install' installs the package's commands under
145e4f6584cSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146e4f6584cSmrgcan specify an installation prefix other than `/usr/local' by giving
147df9ffc95Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148df9ffc95Smrgabsolute file name.
149e4f6584cSmrg
150e4f6584cSmrg   You can specify separate installation prefixes for
151e4f6584cSmrgarchitecture-specific files and architecture-independent files.  If you
152e4f6584cSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153e4f6584cSmrgPREFIX as the prefix for installing programs and libraries.
154e4f6584cSmrgDocumentation and other data files still use the regular prefix.
155e4f6584cSmrg
156e4f6584cSmrg   In addition, if you use an unusual directory layout you can give
157e4f6584cSmrgoptions like `--bindir=DIR' to specify different values for particular
158e4f6584cSmrgkinds of files.  Run `configure --help' for a list of the directories
159df9ffc95Smrgyou can set and what kinds of files go in them.  In general, the
160df9ffc95Smrgdefault for these options is expressed in terms of `${prefix}', so that
161df9ffc95Smrgspecifying just `--prefix' will affect all of the other directory
162df9ffc95Smrgspecifications that were not explicitly provided.
163df9ffc95Smrg
164df9ffc95Smrg   The most portable way to affect installation locations is to pass the
165df9ffc95Smrgcorrect locations to `configure'; however, many packages provide one or
166df9ffc95Smrgboth of the following shortcuts of passing variable assignments to the
167df9ffc95Smrg`make install' command line to change installation locations without
168df9ffc95Smrghaving to reconfigure or recompile.
169df9ffc95Smrg
170df9ffc95Smrg   The first method involves providing an override variable for each
171df9ffc95Smrgaffected directory.  For example, `make install
172df9ffc95Smrgprefix=/alternate/directory' will choose an alternate location for all
173df9ffc95Smrgdirectory configuration variables that were expressed in terms of
174df9ffc95Smrg`${prefix}'.  Any directories that were specified during `configure',
175df9ffc95Smrgbut not in terms of `${prefix}', must each be overridden at install
176df9ffc95Smrgtime for the entire installation to be relocated.  The approach of
177df9ffc95Smrgmakefile variable overrides for each directory variable is required by
178df9ffc95Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179df9ffc95SmrgHowever, some platforms have known limitations with the semantics of
180df9ffc95Smrgshared libraries that end up requiring recompilation when using this
181df9ffc95Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182df9ffc95Smrg
183df9ffc95Smrg   The second method involves providing the `DESTDIR' variable.  For
184df9ffc95Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185df9ffc95Smrg`/alternate/directory' before all installation names.  The approach of
186df9ffc95Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187df9ffc95Smrgdoes not work on platforms that have drive letters.  On the other hand,
188df9ffc95Smrgit does better at avoiding recompilation issues, and works well even
189df9ffc95Smrgwhen some directory options were not specified in terms of `${prefix}'
190df9ffc95Smrgat `configure' time.
191df9ffc95Smrg
192df9ffc95SmrgOptional Features
193df9ffc95Smrg=================
194e4f6584cSmrg
195e4f6584cSmrg   If the package supports it, you can cause programs to be installed
196e4f6584cSmrgwith an extra prefix or suffix on their names by giving `configure' the
197e4f6584cSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198e4f6584cSmrg
199e4f6584cSmrg   Some packages pay attention to `--enable-FEATURE' options to
200e4f6584cSmrg`configure', where FEATURE indicates an optional part of the package.
201e4f6584cSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202e4f6584cSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203e4f6584cSmrg`README' should mention any `--enable-' and `--with-' options that the
204e4f6584cSmrgpackage recognizes.
205e4f6584cSmrg
206e4f6584cSmrg   For packages that use the X Window System, `configure' can usually
207e4f6584cSmrgfind the X include and library files automatically, but if it doesn't,
208e4f6584cSmrgyou can use the `configure' options `--x-includes=DIR' and
209e4f6584cSmrg`--x-libraries=DIR' to specify their locations.
210e4f6584cSmrg
211df9ffc95Smrg   Some packages offer the ability to configure how verbose the
212df9ffc95Smrgexecution of `make' will be.  For these packages, running `./configure
213df9ffc95Smrg--enable-silent-rules' sets the default to minimal output, which can be
214df9ffc95Smrgoverridden with `make V=1'; while running `./configure
215df9ffc95Smrg--disable-silent-rules' sets the default to verbose, which can be
216df9ffc95Smrgoverridden with `make V=0'.
217df9ffc95Smrg
218e4f6584cSmrgParticular systems
219e4f6584cSmrg==================
220e4f6584cSmrg
221e4f6584cSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222e4f6584cSmrgCC is not installed, it is recommended to use the following options in
223e4f6584cSmrgorder to use an ANSI C compiler:
224e4f6584cSmrg
225df9ffc95Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226e4f6584cSmrg
227e4f6584cSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228e4f6584cSmrg
229df9ffc95Smrg   HP-UX `make' updates targets which have the same time stamps as
230df9ffc95Smrgtheir prerequisites, which makes it generally unusable when shipped
231df9ffc95Smrggenerated files such as `configure' are involved.  Use GNU `make'
232df9ffc95Smrginstead.
233df9ffc95Smrg
234e4f6584cSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235e4f6584cSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236e4f6584cSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237e4f6584cSmrgto try
238e4f6584cSmrg
239e4f6584cSmrg     ./configure CC="cc"
240e4f6584cSmrg
241e4f6584cSmrgand if that doesn't work, try
242e4f6584cSmrg
243e4f6584cSmrg     ./configure CC="cc -nodtk"
244e4f6584cSmrg
245df9ffc95Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246df9ffc95Smrgdirectory contains several dysfunctional programs; working variants of
247df9ffc95Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248df9ffc95Smrgin your `PATH', put it _after_ `/usr/bin'.
249df9ffc95Smrg
250df9ffc95Smrg   On Haiku, software installed for all users goes in `/boot/common',
251df9ffc95Smrgnot `/usr/local'.  It is recommended to use the following options:
252df9ffc95Smrg
253df9ffc95Smrg     ./configure --prefix=/boot/common
254df9ffc95Smrg
255e4f6584cSmrgSpecifying the System Type
256e4f6584cSmrg==========================
257e4f6584cSmrg
258e4f6584cSmrg   There may be some features `configure' cannot figure out
259e4f6584cSmrgautomatically, but needs to determine by the type of machine the package
260e4f6584cSmrgwill run on.  Usually, assuming the package is built to be run on the
261e4f6584cSmrg_same_ architectures, `configure' can figure that out, but if it prints
262e4f6584cSmrga message saying it cannot guess the machine type, give it the
263e4f6584cSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264e4f6584cSmrgtype, such as `sun4', or a canonical name which has the form:
265e4f6584cSmrg
266e4f6584cSmrg     CPU-COMPANY-SYSTEM
267e4f6584cSmrg
268e4f6584cSmrgwhere SYSTEM can have one of these forms:
269e4f6584cSmrg
270df9ffc95Smrg     OS
271df9ffc95Smrg     KERNEL-OS
272e4f6584cSmrg
273e4f6584cSmrg   See the file `config.sub' for the possible values of each field.  If
274e4f6584cSmrg`config.sub' isn't included in this package, then this package doesn't
275e4f6584cSmrgneed to know the machine type.
276e4f6584cSmrg
277e4f6584cSmrg   If you are _building_ compiler tools for cross-compiling, you should
278e4f6584cSmrguse the option `--target=TYPE' to select the type of system they will
279e4f6584cSmrgproduce code for.
280e4f6584cSmrg
281e4f6584cSmrg   If you want to _use_ a cross compiler, that generates code for a
282e4f6584cSmrgplatform different from the build platform, you should specify the
283e4f6584cSmrg"host" platform (i.e., that on which the generated programs will
284e4f6584cSmrgeventually be run) with `--host=TYPE'.
285e4f6584cSmrg
286e4f6584cSmrgSharing Defaults
287e4f6584cSmrg================
288e4f6584cSmrg
289e4f6584cSmrg   If you want to set default values for `configure' scripts to share,
290e4f6584cSmrgyou can create a site shell script called `config.site' that gives
291e4f6584cSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292e4f6584cSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293e4f6584cSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294e4f6584cSmrg`CONFIG_SITE' environment variable to the location of the site script.
295e4f6584cSmrgA warning: not all `configure' scripts look for a site script.
296e4f6584cSmrg
297e4f6584cSmrgDefining Variables
298e4f6584cSmrg==================
299e4f6584cSmrg
300e4f6584cSmrg   Variables not defined in a site shell script can be set in the
301e4f6584cSmrgenvironment passed to `configure'.  However, some packages may run
302e4f6584cSmrgconfigure again during the build, and the customized values of these
303e4f6584cSmrgvariables may be lost.  In order to avoid this problem, you should set
304e4f6584cSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305e4f6584cSmrg
306e4f6584cSmrg     ./configure CC=/usr/local2/bin/gcc
307e4f6584cSmrg
308e4f6584cSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309e4f6584cSmrgoverridden in the site shell script).
310e4f6584cSmrg
311e4f6584cSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312e4f6584cSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313e4f6584cSmrg
314e4f6584cSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315e4f6584cSmrg
316e4f6584cSmrg`configure' Invocation
317e4f6584cSmrg======================
318e4f6584cSmrg
319e4f6584cSmrg   `configure' recognizes the following options to control how it
320e4f6584cSmrgoperates.
321e4f6584cSmrg
322e4f6584cSmrg`--help'
323e4f6584cSmrg`-h'
324e4f6584cSmrg     Print a summary of all of the options to `configure', and exit.
325e4f6584cSmrg
326e4f6584cSmrg`--help=short'
327e4f6584cSmrg`--help=recursive'
328e4f6584cSmrg     Print a summary of the options unique to this package's
329e4f6584cSmrg     `configure', and exit.  The `short' variant lists options used
330e4f6584cSmrg     only in the top level, while the `recursive' variant lists options
331e4f6584cSmrg     also present in any nested packages.
332e4f6584cSmrg
333e4f6584cSmrg`--version'
334e4f6584cSmrg`-V'
335e4f6584cSmrg     Print the version of Autoconf used to generate the `configure'
336e4f6584cSmrg     script, and exit.
337e4f6584cSmrg
338e4f6584cSmrg`--cache-file=FILE'
339e4f6584cSmrg     Enable the cache: use and save the results of the tests in FILE,
340e4f6584cSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341e4f6584cSmrg     disable caching.
342e4f6584cSmrg
343e4f6584cSmrg`--config-cache'
344e4f6584cSmrg`-C'
345e4f6584cSmrg     Alias for `--cache-file=config.cache'.
346e4f6584cSmrg
347e4f6584cSmrg`--quiet'
348e4f6584cSmrg`--silent'
349e4f6584cSmrg`-q'
350e4f6584cSmrg     Do not print messages saying which checks are being made.  To
351e4f6584cSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352e4f6584cSmrg     messages will still be shown).
353e4f6584cSmrg
354e4f6584cSmrg`--srcdir=DIR'
355e4f6584cSmrg     Look for the package's source code in directory DIR.  Usually
356e4f6584cSmrg     `configure' can determine that directory automatically.
357e4f6584cSmrg
358e4f6584cSmrg`--prefix=DIR'
359df9ffc95Smrg     Use DIR as the installation prefix.  *note Installation Names::
360e4f6584cSmrg     for more details, including other options available for fine-tuning
361e4f6584cSmrg     the installation locations.
362e4f6584cSmrg
363e4f6584cSmrg`--no-create'
364e4f6584cSmrg`-n'
365e4f6584cSmrg     Run the configure checks, but stop before creating any output
366e4f6584cSmrg     files.
367e4f6584cSmrg
368e4f6584cSmrg`configure' also accepts some other, not widely useful, options.  Run
369e4f6584cSmrg`configure --help' for more details.
370e4f6584cSmrg
371