1d769e936SmrgInstallation Instructions
2d769e936Smrg*************************
3d769e936Smrg
47322289dSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
57322289dSmrgInc.
6d769e936Smrg
77322289dSmrg   Copying and distribution of this file, with or without modification,
87322289dSmrgare permitted in any medium without royalty provided the copyright
97322289dSmrgnotice and this notice are preserved.  This file is offered as-is,
107322289dSmrgwithout warranty of any kind.
11d769e936Smrg
12d769e936SmrgBasic Installation
13d769e936Smrg==================
14d769e936Smrg
15d769e936Smrg   Briefly, the shell commands `./configure; make; make install' should
16d769e936Smrgconfigure, build, and install this package.  The following
17d769e936Smrgmore-detailed instructions are generic; see the `README' file for
187322289dSmrginstructions specific to this package.  Some packages provide this
197322289dSmrg`INSTALL' file but do not implement all of the features documented
207322289dSmrgbelow.  The lack of an optional feature in a given package is not
217322289dSmrgnecessarily a bug.  More recommendations for GNU packages can be found
227322289dSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23d769e936Smrg
24d769e936Smrg   The `configure' shell script attempts to guess correct values for
25d769e936Smrgvarious system-dependent variables used during compilation.  It uses
26d769e936Smrgthose values to create a `Makefile' in each directory of the package.
27d769e936SmrgIt may also create one or more `.h' files containing system-dependent
28d769e936Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29d769e936Smrgyou can run in the future to recreate the current configuration, and a
30d769e936Smrgfile `config.log' containing compiler output (useful mainly for
31d769e936Smrgdebugging `configure').
32d769e936Smrg
33d769e936Smrg   It can also use an optional file (typically called `config.cache'
34d769e936Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35d769e936Smrgthe results of its tests to speed up reconfiguring.  Caching is
36d769e936Smrgdisabled by default to prevent problems with accidental use of stale
37d769e936Smrgcache files.
38d769e936Smrg
39d769e936Smrg   If you need to do unusual things to compile the package, please try
40d769e936Smrgto figure out how `configure' could check whether to do them, and mail
41d769e936Smrgdiffs or instructions to the address given in the `README' so they can
42d769e936Smrgbe considered for the next release.  If you are using the cache, and at
43d769e936Smrgsome point `config.cache' contains results you don't want to keep, you
44d769e936Smrgmay remove or edit it.
45d769e936Smrg
46d769e936Smrg   The file `configure.ac' (or `configure.in') is used to create
47d769e936Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48d769e936Smrgyou want to change it or regenerate `configure' using a newer version
49d769e936Smrgof `autoconf'.
50d769e936Smrg
517322289dSmrg   The simplest way to compile this package is:
52d769e936Smrg
53d769e936Smrg  1. `cd' to the directory containing the package's source code and type
54d769e936Smrg     `./configure' to configure the package for your system.
55d769e936Smrg
56d769e936Smrg     Running `configure' might take a while.  While running, it prints
57d769e936Smrg     some messages telling which features it is checking for.
58d769e936Smrg
59d769e936Smrg  2. Type `make' to compile the package.
60d769e936Smrg
61d769e936Smrg  3. Optionally, type `make check' to run any self-tests that come with
627322289dSmrg     the package, generally using the just-built uninstalled binaries.
63d769e936Smrg
64d769e936Smrg  4. Type `make install' to install the programs and any data files and
657322289dSmrg     documentation.  When installing into a prefix owned by root, it is
667322289dSmrg     recommended that the package be configured and built as a regular
677322289dSmrg     user, and only the `make install' phase executed with root
687322289dSmrg     privileges.
697322289dSmrg
707322289dSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
717322289dSmrg     this time using the binaries in their final installed location.
727322289dSmrg     This target does not install anything.  Running this target as a
737322289dSmrg     regular user, particularly if the prior `make install' required
747322289dSmrg     root privileges, verifies that the installation completed
757322289dSmrg     correctly.
767322289dSmrg
777322289dSmrg  6. You can remove the program binaries and object files from the
78d769e936Smrg     source code directory by typing `make clean'.  To also remove the
79d769e936Smrg     files that `configure' created (so you can compile the package for
80d769e936Smrg     a different kind of computer), type `make distclean'.  There is
81d769e936Smrg     also a `make maintainer-clean' target, but that is intended mainly
82d769e936Smrg     for the package's developers.  If you use it, you may have to get
83d769e936Smrg     all sorts of other programs in order to regenerate files that came
84d769e936Smrg     with the distribution.
85d769e936Smrg
867322289dSmrg  7. Often, you can also type `make uninstall' to remove the installed
877322289dSmrg     files again.  In practice, not all packages have tested that
887322289dSmrg     uninstallation works correctly, even though it is required by the
897322289dSmrg     GNU Coding Standards.
907322289dSmrg
917322289dSmrg  8. Some packages, particularly those that use Automake, provide `make
927322289dSmrg     distcheck', which can by used by developers to test that all other
937322289dSmrg     targets like `make install' and `make uninstall' work correctly.
947322289dSmrg     This target is generally not run by end users.
95d769e936Smrg
96d769e936SmrgCompilers and Options
97d769e936Smrg=====================
98d769e936Smrg
99d769e936Smrg   Some systems require unusual options for compilation or linking that
100d769e936Smrgthe `configure' script does not know about.  Run `./configure --help'
101d769e936Smrgfor details on some of the pertinent environment variables.
102d769e936Smrg
103d769e936Smrg   You can give `configure' initial values for configuration parameters
104d769e936Smrgby setting variables in the command line or in the environment.  Here
105d769e936Smrgis an example:
106d769e936Smrg
107d769e936Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108d769e936Smrg
109d769e936Smrg   *Note Defining Variables::, for more details.
110d769e936Smrg
111d769e936SmrgCompiling For Multiple Architectures
112d769e936Smrg====================================
113d769e936Smrg
114d769e936Smrg   You can compile the package for more than one kind of computer at the
115d769e936Smrgsame time, by placing the object files for each architecture in their
116d769e936Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117d769e936Smrgdirectory where you want the object files and executables to go and run
118d769e936Smrgthe `configure' script.  `configure' automatically checks for the
1197322289dSmrgsource code in the directory that `configure' is in and in `..'.  This
1207322289dSmrgis known as a "VPATH" build.
121d769e936Smrg
122d769e936Smrg   With a non-GNU `make', it is safer to compile the package for one
123d769e936Smrgarchitecture at a time in the source code directory.  After you have
124d769e936Smrginstalled the package for one architecture, use `make distclean' before
125d769e936Smrgreconfiguring for another architecture.
126d769e936Smrg
127d769e936Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128d769e936Smrgexecutables that work on multiple system types--known as "fat" or
129d769e936Smrg"universal" binaries--by specifying multiple `-arch' options to the
130d769e936Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131d769e936Smrgthis:
132d769e936Smrg
133d769e936Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134d769e936Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135d769e936Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136d769e936Smrg
137d769e936Smrg   This is not guaranteed to produce working output in all cases, you
138d769e936Smrgmay have to build one architecture at a time and combine the results
139d769e936Smrgusing the `lipo' tool if you have problems.
140d769e936Smrg
141d769e936SmrgInstallation Names
142d769e936Smrg==================
143d769e936Smrg
144d769e936Smrg   By default, `make install' installs the package's commands under
145d769e936Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146d769e936Smrgcan specify an installation prefix other than `/usr/local' by giving
1477322289dSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1487322289dSmrgabsolute file name.
149d769e936Smrg
150d769e936Smrg   You can specify separate installation prefixes for
151d769e936Smrgarchitecture-specific files and architecture-independent files.  If you
152d769e936Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153d769e936SmrgPREFIX as the prefix for installing programs and libraries.
154d769e936SmrgDocumentation and other data files still use the regular prefix.
155d769e936Smrg
156d769e936Smrg   In addition, if you use an unusual directory layout you can give
157d769e936Smrgoptions like `--bindir=DIR' to specify different values for particular
158d769e936Smrgkinds of files.  Run `configure --help' for a list of the directories
1597322289dSmrgyou can set and what kinds of files go in them.  In general, the
1607322289dSmrgdefault for these options is expressed in terms of `${prefix}', so that
1617322289dSmrgspecifying just `--prefix' will affect all of the other directory
1627322289dSmrgspecifications that were not explicitly provided.
1637322289dSmrg
1647322289dSmrg   The most portable way to affect installation locations is to pass the
1657322289dSmrgcorrect locations to `configure'; however, many packages provide one or
1667322289dSmrgboth of the following shortcuts of passing variable assignments to the
1677322289dSmrg`make install' command line to change installation locations without
1687322289dSmrghaving to reconfigure or recompile.
1697322289dSmrg
1707322289dSmrg   The first method involves providing an override variable for each
1717322289dSmrgaffected directory.  For example, `make install
1727322289dSmrgprefix=/alternate/directory' will choose an alternate location for all
1737322289dSmrgdirectory configuration variables that were expressed in terms of
1747322289dSmrg`${prefix}'.  Any directories that were specified during `configure',
1757322289dSmrgbut not in terms of `${prefix}', must each be overridden at install
1767322289dSmrgtime for the entire installation to be relocated.  The approach of
1777322289dSmrgmakefile variable overrides for each directory variable is required by
1787322289dSmrgthe GNU Coding Standards, and ideally causes no recompilation.
1797322289dSmrgHowever, some platforms have known limitations with the semantics of
1807322289dSmrgshared libraries that end up requiring recompilation when using this
1817322289dSmrgmethod, particularly noticeable in packages that use GNU Libtool.
1827322289dSmrg
1837322289dSmrg   The second method involves providing the `DESTDIR' variable.  For
1847322289dSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
1857322289dSmrg`/alternate/directory' before all installation names.  The approach of
1867322289dSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1877322289dSmrgdoes not work on platforms that have drive letters.  On the other hand,
1887322289dSmrgit does better at avoiding recompilation issues, and works well even
1897322289dSmrgwhen some directory options were not specified in terms of `${prefix}'
1907322289dSmrgat `configure' time.
1917322289dSmrg
1927322289dSmrgOptional Features
1937322289dSmrg=================
194d769e936Smrg
195d769e936Smrg   If the package supports it, you can cause programs to be installed
196d769e936Smrgwith an extra prefix or suffix on their names by giving `configure' the
197d769e936Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198d769e936Smrg
199d769e936Smrg   Some packages pay attention to `--enable-FEATURE' options to
200d769e936Smrg`configure', where FEATURE indicates an optional part of the package.
201d769e936SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202d769e936Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203d769e936Smrg`README' should mention any `--enable-' and `--with-' options that the
204d769e936Smrgpackage recognizes.
205d769e936Smrg
206d769e936Smrg   For packages that use the X Window System, `configure' can usually
207d769e936Smrgfind the X include and library files automatically, but if it doesn't,
208d769e936Smrgyou can use the `configure' options `--x-includes=DIR' and
209d769e936Smrg`--x-libraries=DIR' to specify their locations.
210d769e936Smrg
2117322289dSmrg   Some packages offer the ability to configure how verbose the
2127322289dSmrgexecution of `make' will be.  For these packages, running `./configure
2137322289dSmrg--enable-silent-rules' sets the default to minimal output, which can be
2147322289dSmrgoverridden with `make V=1'; while running `./configure
2157322289dSmrg--disable-silent-rules' sets the default to verbose, which can be
2167322289dSmrgoverridden with `make V=0'.
2177322289dSmrg
218d769e936SmrgParticular systems
219d769e936Smrg==================
220d769e936Smrg
221d769e936Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222d769e936SmrgCC is not installed, it is recommended to use the following options in
223d769e936Smrgorder to use an ANSI C compiler:
224d769e936Smrg
2257322289dSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226d769e936Smrg
227d769e936Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228d769e936Smrg
2297322289dSmrg   HP-UX `make' updates targets which have the same time stamps as
2307322289dSmrgtheir prerequisites, which makes it generally unusable when shipped
2317322289dSmrggenerated files such as `configure' are involved.  Use GNU `make'
2327322289dSmrginstead.
2337322289dSmrg
234d769e936Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235d769e936Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236d769e936Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237d769e936Smrgto try
238d769e936Smrg
239d769e936Smrg     ./configure CC="cc"
240d769e936Smrg
241d769e936Smrgand if that doesn't work, try
242d769e936Smrg
243d769e936Smrg     ./configure CC="cc -nodtk"
244d769e936Smrg
2457322289dSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2467322289dSmrgdirectory contains several dysfunctional programs; working variants of
2477322289dSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2487322289dSmrgin your `PATH', put it _after_ `/usr/bin'.
2497322289dSmrg
2507322289dSmrg   On Haiku, software installed for all users goes in `/boot/common',
2517322289dSmrgnot `/usr/local'.  It is recommended to use the following options:
2527322289dSmrg
2537322289dSmrg     ./configure --prefix=/boot/common
2547322289dSmrg
255d769e936SmrgSpecifying the System Type
256d769e936Smrg==========================
257d769e936Smrg
258d769e936Smrg   There may be some features `configure' cannot figure out
259d769e936Smrgautomatically, but needs to determine by the type of machine the package
260d769e936Smrgwill run on.  Usually, assuming the package is built to be run on the
261d769e936Smrg_same_ architectures, `configure' can figure that out, but if it prints
262d769e936Smrga message saying it cannot guess the machine type, give it the
263d769e936Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264d769e936Smrgtype, such as `sun4', or a canonical name which has the form:
265d769e936Smrg
266d769e936Smrg     CPU-COMPANY-SYSTEM
267d769e936Smrg
268d769e936Smrgwhere SYSTEM can have one of these forms:
269d769e936Smrg
2707322289dSmrg     OS
2717322289dSmrg     KERNEL-OS
272d769e936Smrg
273d769e936Smrg   See the file `config.sub' for the possible values of each field.  If
274d769e936Smrg`config.sub' isn't included in this package, then this package doesn't
275d769e936Smrgneed to know the machine type.
276d769e936Smrg
277d769e936Smrg   If you are _building_ compiler tools for cross-compiling, you should
278d769e936Smrguse the option `--target=TYPE' to select the type of system they will
279d769e936Smrgproduce code for.
280d769e936Smrg
281d769e936Smrg   If you want to _use_ a cross compiler, that generates code for a
282d769e936Smrgplatform different from the build platform, you should specify the
283d769e936Smrg"host" platform (i.e., that on which the generated programs will
284d769e936Smrgeventually be run) with `--host=TYPE'.
285d769e936Smrg
286d769e936SmrgSharing Defaults
287d769e936Smrg================
288d769e936Smrg
289d769e936Smrg   If you want to set default values for `configure' scripts to share,
290d769e936Smrgyou can create a site shell script called `config.site' that gives
291d769e936Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292d769e936Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293d769e936Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294d769e936Smrg`CONFIG_SITE' environment variable to the location of the site script.
295d769e936SmrgA warning: not all `configure' scripts look for a site script.
296d769e936Smrg
297d769e936SmrgDefining Variables
298d769e936Smrg==================
299d769e936Smrg
300d769e936Smrg   Variables not defined in a site shell script can be set in the
301d769e936Smrgenvironment passed to `configure'.  However, some packages may run
302d769e936Smrgconfigure again during the build, and the customized values of these
303d769e936Smrgvariables may be lost.  In order to avoid this problem, you should set
304d769e936Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305d769e936Smrg
306d769e936Smrg     ./configure CC=/usr/local2/bin/gcc
307d769e936Smrg
308d769e936Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309d769e936Smrgoverridden in the site shell script).
310d769e936Smrg
311d769e936SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312d769e936Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313d769e936Smrg
314d769e936Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315d769e936Smrg
316d769e936Smrg`configure' Invocation
317d769e936Smrg======================
318d769e936Smrg
319d769e936Smrg   `configure' recognizes the following options to control how it
320d769e936Smrgoperates.
321d769e936Smrg
322d769e936Smrg`--help'
323d769e936Smrg`-h'
324d769e936Smrg     Print a summary of all of the options to `configure', and exit.
325d769e936Smrg
326d769e936Smrg`--help=short'
327d769e936Smrg`--help=recursive'
328d769e936Smrg     Print a summary of the options unique to this package's
329d769e936Smrg     `configure', and exit.  The `short' variant lists options used
330d769e936Smrg     only in the top level, while the `recursive' variant lists options
331d769e936Smrg     also present in any nested packages.
332d769e936Smrg
333d769e936Smrg`--version'
334d769e936Smrg`-V'
335d769e936Smrg     Print the version of Autoconf used to generate the `configure'
336d769e936Smrg     script, and exit.
337d769e936Smrg
338d769e936Smrg`--cache-file=FILE'
339d769e936Smrg     Enable the cache: use and save the results of the tests in FILE,
340d769e936Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341d769e936Smrg     disable caching.
342d769e936Smrg
343d769e936Smrg`--config-cache'
344d769e936Smrg`-C'
345d769e936Smrg     Alias for `--cache-file=config.cache'.
346d769e936Smrg
347d769e936Smrg`--quiet'
348d769e936Smrg`--silent'
349d769e936Smrg`-q'
350d769e936Smrg     Do not print messages saying which checks are being made.  To
351d769e936Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352d769e936Smrg     messages will still be shown).
353d769e936Smrg
354d769e936Smrg`--srcdir=DIR'
355d769e936Smrg     Look for the package's source code in directory DIR.  Usually
356d769e936Smrg     `configure' can determine that directory automatically.
357d769e936Smrg
358d769e936Smrg`--prefix=DIR'
3597322289dSmrg     Use DIR as the installation prefix.  *note Installation Names::
360d769e936Smrg     for more details, including other options available for fine-tuning
361d769e936Smrg     the installation locations.
362d769e936Smrg
363d769e936Smrg`--no-create'
364d769e936Smrg`-n'
365d769e936Smrg     Run the configure checks, but stop before creating any output
366d769e936Smrg     files.
367d769e936Smrg
368d769e936Smrg`configure' also accepts some other, not widely useful, options.  Run
369d769e936Smrg`configure --help' for more details.
370d769e936Smrg
371