1c75e344aSmrgInstallation Instructions
2c75e344aSmrg*************************
3c75e344aSmrg
42f167a42SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
52f167a42SmrgInc.
6c75e344aSmrg
72f167a42Smrg   Copying and distribution of this file, with or without modification,
82f167a42Smrgare permitted in any medium without royalty provided the copyright
92f167a42Smrgnotice and this notice are preserved.  This file is offered as-is,
102f167a42Smrgwithout warranty of any kind.
11c75e344aSmrg
12c75e344aSmrgBasic Installation
13c75e344aSmrg==================
14c75e344aSmrg
15c75e344aSmrg   Briefly, the shell commands `./configure; make; make install' should
16c75e344aSmrgconfigure, build, and install this package.  The following
17c75e344aSmrgmore-detailed instructions are generic; see the `README' file for
182f167a42Smrginstructions specific to this package.  Some packages provide this
192f167a42Smrg`INSTALL' file but do not implement all of the features documented
202f167a42Smrgbelow.  The lack of an optional feature in a given package is not
212f167a42Smrgnecessarily a bug.  More recommendations for GNU packages can be found
222f167a42Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23c75e344aSmrg
24c75e344aSmrg   The `configure' shell script attempts to guess correct values for
25c75e344aSmrgvarious system-dependent variables used during compilation.  It uses
26c75e344aSmrgthose values to create a `Makefile' in each directory of the package.
27c75e344aSmrgIt may also create one or more `.h' files containing system-dependent
28c75e344aSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29c75e344aSmrgyou can run in the future to recreate the current configuration, and a
30c75e344aSmrgfile `config.log' containing compiler output (useful mainly for
31c75e344aSmrgdebugging `configure').
32c75e344aSmrg
33c75e344aSmrg   It can also use an optional file (typically called `config.cache'
34c75e344aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35c75e344aSmrgthe results of its tests to speed up reconfiguring.  Caching is
36c75e344aSmrgdisabled by default to prevent problems with accidental use of stale
37c75e344aSmrgcache files.
38c75e344aSmrg
39c75e344aSmrg   If you need to do unusual things to compile the package, please try
40c75e344aSmrgto figure out how `configure' could check whether to do them, and mail
41c75e344aSmrgdiffs or instructions to the address given in the `README' so they can
42c75e344aSmrgbe considered for the next release.  If you are using the cache, and at
43c75e344aSmrgsome point `config.cache' contains results you don't want to keep, you
44c75e344aSmrgmay remove or edit it.
45c75e344aSmrg
46c75e344aSmrg   The file `configure.ac' (or `configure.in') is used to create
47c75e344aSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48c75e344aSmrgyou want to change it or regenerate `configure' using a newer version
49c75e344aSmrgof `autoconf'.
50c75e344aSmrg
512f167a42Smrg   The simplest way to compile this package is:
52c75e344aSmrg
53c75e344aSmrg  1. `cd' to the directory containing the package's source code and type
54c75e344aSmrg     `./configure' to configure the package for your system.
55c75e344aSmrg
56c75e344aSmrg     Running `configure' might take a while.  While running, it prints
57c75e344aSmrg     some messages telling which features it is checking for.
58c75e344aSmrg
59c75e344aSmrg  2. Type `make' to compile the package.
60c75e344aSmrg
61c75e344aSmrg  3. Optionally, type `make check' to run any self-tests that come with
622f167a42Smrg     the package, generally using the just-built uninstalled binaries.
63c75e344aSmrg
64c75e344aSmrg  4. Type `make install' to install the programs and any data files and
652f167a42Smrg     documentation.  When installing into a prefix owned by root, it is
662f167a42Smrg     recommended that the package be configured and built as a regular
672f167a42Smrg     user, and only the `make install' phase executed with root
682f167a42Smrg     privileges.
692f167a42Smrg
702f167a42Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
712f167a42Smrg     this time using the binaries in their final installed location.
722f167a42Smrg     This target does not install anything.  Running this target as a
732f167a42Smrg     regular user, particularly if the prior `make install' required
742f167a42Smrg     root privileges, verifies that the installation completed
752f167a42Smrg     correctly.
762f167a42Smrg
772f167a42Smrg  6. You can remove the program binaries and object files from the
78c75e344aSmrg     source code directory by typing `make clean'.  To also remove the
79c75e344aSmrg     files that `configure' created (so you can compile the package for
80c75e344aSmrg     a different kind of computer), type `make distclean'.  There is
81c75e344aSmrg     also a `make maintainer-clean' target, but that is intended mainly
82c75e344aSmrg     for the package's developers.  If you use it, you may have to get
83c75e344aSmrg     all sorts of other programs in order to regenerate files that came
84c75e344aSmrg     with the distribution.
85c75e344aSmrg
862f167a42Smrg  7. Often, you can also type `make uninstall' to remove the installed
872f167a42Smrg     files again.  In practice, not all packages have tested that
882f167a42Smrg     uninstallation works correctly, even though it is required by the
892f167a42Smrg     GNU Coding Standards.
902f167a42Smrg
912f167a42Smrg  8. Some packages, particularly those that use Automake, provide `make
922f167a42Smrg     distcheck', which can by used by developers to test that all other
932f167a42Smrg     targets like `make install' and `make uninstall' work correctly.
942f167a42Smrg     This target is generally not run by end users.
95c75e344aSmrg
96c75e344aSmrgCompilers and Options
97c75e344aSmrg=====================
98c75e344aSmrg
99c75e344aSmrg   Some systems require unusual options for compilation or linking that
100c75e344aSmrgthe `configure' script does not know about.  Run `./configure --help'
101c75e344aSmrgfor details on some of the pertinent environment variables.
102c75e344aSmrg
103c75e344aSmrg   You can give `configure' initial values for configuration parameters
104c75e344aSmrgby setting variables in the command line or in the environment.  Here
105c75e344aSmrgis an example:
106c75e344aSmrg
107c75e344aSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108c75e344aSmrg
109c75e344aSmrg   *Note Defining Variables::, for more details.
110c75e344aSmrg
111c75e344aSmrgCompiling For Multiple Architectures
112c75e344aSmrg====================================
113c75e344aSmrg
114c75e344aSmrg   You can compile the package for more than one kind of computer at the
115c75e344aSmrgsame time, by placing the object files for each architecture in their
116c75e344aSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117c75e344aSmrgdirectory where you want the object files and executables to go and run
118c75e344aSmrgthe `configure' script.  `configure' automatically checks for the
1192f167a42Smrgsource code in the directory that `configure' is in and in `..'.  This
1202f167a42Smrgis known as a "VPATH" build.
121c75e344aSmrg
122c75e344aSmrg   With a non-GNU `make', it is safer to compile the package for one
123c75e344aSmrgarchitecture at a time in the source code directory.  After you have
124c75e344aSmrginstalled the package for one architecture, use `make distclean' before
125c75e344aSmrgreconfiguring for another architecture.
126c75e344aSmrg
127c75e344aSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128c75e344aSmrgexecutables that work on multiple system types--known as "fat" or
129c75e344aSmrg"universal" binaries--by specifying multiple `-arch' options to the
130c75e344aSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131c75e344aSmrgthis:
132c75e344aSmrg
133c75e344aSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134c75e344aSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135c75e344aSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136c75e344aSmrg
137c75e344aSmrg   This is not guaranteed to produce working output in all cases, you
138c75e344aSmrgmay have to build one architecture at a time and combine the results
139c75e344aSmrgusing the `lipo' tool if you have problems.
140c75e344aSmrg
141c75e344aSmrgInstallation Names
142c75e344aSmrg==================
143c75e344aSmrg
144c75e344aSmrg   By default, `make install' installs the package's commands under
145c75e344aSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146c75e344aSmrgcan specify an installation prefix other than `/usr/local' by giving
1472f167a42Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1482f167a42Smrgabsolute file name.
149c75e344aSmrg
150c75e344aSmrg   You can specify separate installation prefixes for
151c75e344aSmrgarchitecture-specific files and architecture-independent files.  If you
152c75e344aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153c75e344aSmrgPREFIX as the prefix for installing programs and libraries.
154c75e344aSmrgDocumentation and other data files still use the regular prefix.
155c75e344aSmrg
156c75e344aSmrg   In addition, if you use an unusual directory layout you can give
157c75e344aSmrgoptions like `--bindir=DIR' to specify different values for particular
158c75e344aSmrgkinds of files.  Run `configure --help' for a list of the directories
1592f167a42Smrgyou can set and what kinds of files go in them.  In general, the
1602f167a42Smrgdefault for these options is expressed in terms of `${prefix}', so that
1612f167a42Smrgspecifying just `--prefix' will affect all of the other directory
1622f167a42Smrgspecifications that were not explicitly provided.
1632f167a42Smrg
1642f167a42Smrg   The most portable way to affect installation locations is to pass the
1652f167a42Smrgcorrect locations to `configure'; however, many packages provide one or
1662f167a42Smrgboth of the following shortcuts of passing variable assignments to the
1672f167a42Smrg`make install' command line to change installation locations without
1682f167a42Smrghaving to reconfigure or recompile.
1692f167a42Smrg
1702f167a42Smrg   The first method involves providing an override variable for each
1712f167a42Smrgaffected directory.  For example, `make install
1722f167a42Smrgprefix=/alternate/directory' will choose an alternate location for all
1732f167a42Smrgdirectory configuration variables that were expressed in terms of
1742f167a42Smrg`${prefix}'.  Any directories that were specified during `configure',
1752f167a42Smrgbut not in terms of `${prefix}', must each be overridden at install
1762f167a42Smrgtime for the entire installation to be relocated.  The approach of
1772f167a42Smrgmakefile variable overrides for each directory variable is required by
1782f167a42Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1792f167a42SmrgHowever, some platforms have known limitations with the semantics of
1802f167a42Smrgshared libraries that end up requiring recompilation when using this
1812f167a42Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1822f167a42Smrg
1832f167a42Smrg   The second method involves providing the `DESTDIR' variable.  For
1842f167a42Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1852f167a42Smrg`/alternate/directory' before all installation names.  The approach of
1862f167a42Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1872f167a42Smrgdoes not work on platforms that have drive letters.  On the other hand,
1882f167a42Smrgit does better at avoiding recompilation issues, and works well even
1892f167a42Smrgwhen some directory options were not specified in terms of `${prefix}'
1902f167a42Smrgat `configure' time.
1912f167a42Smrg
1922f167a42SmrgOptional Features
1932f167a42Smrg=================
194c75e344aSmrg
195c75e344aSmrg   If the package supports it, you can cause programs to be installed
196c75e344aSmrgwith an extra prefix or suffix on their names by giving `configure' the
197c75e344aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198c75e344aSmrg
199c75e344aSmrg   Some packages pay attention to `--enable-FEATURE' options to
200c75e344aSmrg`configure', where FEATURE indicates an optional part of the package.
201c75e344aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202c75e344aSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203c75e344aSmrg`README' should mention any `--enable-' and `--with-' options that the
204c75e344aSmrgpackage recognizes.
205c75e344aSmrg
206c75e344aSmrg   For packages that use the X Window System, `configure' can usually
207c75e344aSmrgfind the X include and library files automatically, but if it doesn't,
208c75e344aSmrgyou can use the `configure' options `--x-includes=DIR' and
209c75e344aSmrg`--x-libraries=DIR' to specify their locations.
210c75e344aSmrg
2112f167a42Smrg   Some packages offer the ability to configure how verbose the
2122f167a42Smrgexecution of `make' will be.  For these packages, running `./configure
2132f167a42Smrg--enable-silent-rules' sets the default to minimal output, which can be
2142f167a42Smrgoverridden with `make V=1'; while running `./configure
2152f167a42Smrg--disable-silent-rules' sets the default to verbose, which can be
2162f167a42Smrgoverridden with `make V=0'.
2172f167a42Smrg
218c75e344aSmrgParticular systems
219c75e344aSmrg==================
220c75e344aSmrg
221c75e344aSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222c75e344aSmrgCC is not installed, it is recommended to use the following options in
223c75e344aSmrgorder to use an ANSI C compiler:
224c75e344aSmrg
2252f167a42Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226c75e344aSmrg
227c75e344aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228c75e344aSmrg
2292f167a42Smrg   HP-UX `make' updates targets which have the same time stamps as
2302f167a42Smrgtheir prerequisites, which makes it generally unusable when shipped
2312f167a42Smrggenerated files such as `configure' are involved.  Use GNU `make'
2322f167a42Smrginstead.
2332f167a42Smrg
234c75e344aSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235c75e344aSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236c75e344aSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237c75e344aSmrgto try
238c75e344aSmrg
239c75e344aSmrg     ./configure CC="cc"
240c75e344aSmrg
241c75e344aSmrgand if that doesn't work, try
242c75e344aSmrg
243c75e344aSmrg     ./configure CC="cc -nodtk"
244c75e344aSmrg
2452f167a42Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2462f167a42Smrgdirectory contains several dysfunctional programs; working variants of
2472f167a42Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2482f167a42Smrgin your `PATH', put it _after_ `/usr/bin'.
2492f167a42Smrg
2502f167a42Smrg   On Haiku, software installed for all users goes in `/boot/common',
2512f167a42Smrgnot `/usr/local'.  It is recommended to use the following options:
2522f167a42Smrg
2532f167a42Smrg     ./configure --prefix=/boot/common
2542f167a42Smrg
255c75e344aSmrgSpecifying the System Type
256c75e344aSmrg==========================
257c75e344aSmrg
258c75e344aSmrg   There may be some features `configure' cannot figure out
259c75e344aSmrgautomatically, but needs to determine by the type of machine the package
260c75e344aSmrgwill run on.  Usually, assuming the package is built to be run on the
261c75e344aSmrg_same_ architectures, `configure' can figure that out, but if it prints
262c75e344aSmrga message saying it cannot guess the machine type, give it the
263c75e344aSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264c75e344aSmrgtype, such as `sun4', or a canonical name which has the form:
265c75e344aSmrg
266c75e344aSmrg     CPU-COMPANY-SYSTEM
267c75e344aSmrg
268c75e344aSmrgwhere SYSTEM can have one of these forms:
269c75e344aSmrg
2702f167a42Smrg     OS
2712f167a42Smrg     KERNEL-OS
272c75e344aSmrg
273c75e344aSmrg   See the file `config.sub' for the possible values of each field.  If
274c75e344aSmrg`config.sub' isn't included in this package, then this package doesn't
275c75e344aSmrgneed to know the machine type.
276c75e344aSmrg
277c75e344aSmrg   If you are _building_ compiler tools for cross-compiling, you should
278c75e344aSmrguse the option `--target=TYPE' to select the type of system they will
279c75e344aSmrgproduce code for.
280c75e344aSmrg
281c75e344aSmrg   If you want to _use_ a cross compiler, that generates code for a
282c75e344aSmrgplatform different from the build platform, you should specify the
283c75e344aSmrg"host" platform (i.e., that on which the generated programs will
284c75e344aSmrgeventually be run) with `--host=TYPE'.
285c75e344aSmrg
286c75e344aSmrgSharing Defaults
287c75e344aSmrg================
288c75e344aSmrg
289c75e344aSmrg   If you want to set default values for `configure' scripts to share,
290c75e344aSmrgyou can create a site shell script called `config.site' that gives
291c75e344aSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292c75e344aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293c75e344aSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294c75e344aSmrg`CONFIG_SITE' environment variable to the location of the site script.
295c75e344aSmrgA warning: not all `configure' scripts look for a site script.
296c75e344aSmrg
297c75e344aSmrgDefining Variables
298c75e344aSmrg==================
299c75e344aSmrg
300c75e344aSmrg   Variables not defined in a site shell script can be set in the
301c75e344aSmrgenvironment passed to `configure'.  However, some packages may run
302c75e344aSmrgconfigure again during the build, and the customized values of these
303c75e344aSmrgvariables may be lost.  In order to avoid this problem, you should set
304c75e344aSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305c75e344aSmrg
306c75e344aSmrg     ./configure CC=/usr/local2/bin/gcc
307c75e344aSmrg
308c75e344aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309c75e344aSmrgoverridden in the site shell script).
310c75e344aSmrg
311c75e344aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312c75e344aSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313c75e344aSmrg
314c75e344aSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315c75e344aSmrg
316c75e344aSmrg`configure' Invocation
317c75e344aSmrg======================
318c75e344aSmrg
319c75e344aSmrg   `configure' recognizes the following options to control how it
320c75e344aSmrgoperates.
321c75e344aSmrg
322c75e344aSmrg`--help'
323c75e344aSmrg`-h'
324c75e344aSmrg     Print a summary of all of the options to `configure', and exit.
325c75e344aSmrg
326c75e344aSmrg`--help=short'
327c75e344aSmrg`--help=recursive'
328c75e344aSmrg     Print a summary of the options unique to this package's
329c75e344aSmrg     `configure', and exit.  The `short' variant lists options used
330c75e344aSmrg     only in the top level, while the `recursive' variant lists options
331c75e344aSmrg     also present in any nested packages.
332c75e344aSmrg
333c75e344aSmrg`--version'
334c75e344aSmrg`-V'
335c75e344aSmrg     Print the version of Autoconf used to generate the `configure'
336c75e344aSmrg     script, and exit.
337c75e344aSmrg
338c75e344aSmrg`--cache-file=FILE'
339c75e344aSmrg     Enable the cache: use and save the results of the tests in FILE,
340c75e344aSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341c75e344aSmrg     disable caching.
342c75e344aSmrg
343c75e344aSmrg`--config-cache'
344c75e344aSmrg`-C'
345c75e344aSmrg     Alias for `--cache-file=config.cache'.
346c75e344aSmrg
347c75e344aSmrg`--quiet'
348c75e344aSmrg`--silent'
349c75e344aSmrg`-q'
350c75e344aSmrg     Do not print messages saying which checks are being made.  To
351c75e344aSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352c75e344aSmrg     messages will still be shown).
353c75e344aSmrg
354c75e344aSmrg`--srcdir=DIR'
355c75e344aSmrg     Look for the package's source code in directory DIR.  Usually
356c75e344aSmrg     `configure' can determine that directory automatically.
357c75e344aSmrg
358c75e344aSmrg`--prefix=DIR'
3592f167a42Smrg     Use DIR as the installation prefix.  *note Installation Names::
360c75e344aSmrg     for more details, including other options available for fine-tuning
361c75e344aSmrg     the installation locations.
362c75e344aSmrg
363c75e344aSmrg`--no-create'
364c75e344aSmrg`-n'
365c75e344aSmrg     Run the configure checks, but stop before creating any output
366c75e344aSmrg     files.
367c75e344aSmrg
368c75e344aSmrg`configure' also accepts some other, not widely useful, options.  Run
369c75e344aSmrg`configure --help' for more details.
370c75e344aSmrg
371