1f29dbc25SmrgInstallation Instructions
2f29dbc25Smrg*************************
3f29dbc25Smrg
47f419768SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
57f419768SmrgInc.
6f29dbc25Smrg
77f419768Smrg   Copying and distribution of this file, with or without modification,
87f419768Smrgare permitted in any medium without royalty provided the copyright
97f419768Smrgnotice and this notice are preserved.  This file is offered as-is,
107f419768Smrgwithout warranty of any kind.
11f29dbc25Smrg
12f29dbc25SmrgBasic Installation
13f29dbc25Smrg==================
14f29dbc25Smrg
15f29dbc25Smrg   Briefly, the shell commands `./configure; make; make install' should
16f29dbc25Smrgconfigure, build, and install this package.  The following
17f29dbc25Smrgmore-detailed instructions are generic; see the `README' file for
187f419768Smrginstructions specific to this package.  Some packages provide this
197f419768Smrg`INSTALL' file but do not implement all of the features documented
207f419768Smrgbelow.  The lack of an optional feature in a given package is not
217f419768Smrgnecessarily a bug.  More recommendations for GNU packages can be found
227f419768Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23f29dbc25Smrg
24f29dbc25Smrg   The `configure' shell script attempts to guess correct values for
25f29dbc25Smrgvarious system-dependent variables used during compilation.  It uses
26f29dbc25Smrgthose values to create a `Makefile' in each directory of the package.
27f29dbc25SmrgIt may also create one or more `.h' files containing system-dependent
28f29dbc25Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29f29dbc25Smrgyou can run in the future to recreate the current configuration, and a
30f29dbc25Smrgfile `config.log' containing compiler output (useful mainly for
31f29dbc25Smrgdebugging `configure').
32f29dbc25Smrg
33f29dbc25Smrg   It can also use an optional file (typically called `config.cache'
34f29dbc25Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35f29dbc25Smrgthe results of its tests to speed up reconfiguring.  Caching is
36f29dbc25Smrgdisabled by default to prevent problems with accidental use of stale
37f29dbc25Smrgcache files.
38f29dbc25Smrg
39f29dbc25Smrg   If you need to do unusual things to compile the package, please try
40f29dbc25Smrgto figure out how `configure' could check whether to do them, and mail
41f29dbc25Smrgdiffs or instructions to the address given in the `README' so they can
42f29dbc25Smrgbe considered for the next release.  If you are using the cache, and at
43f29dbc25Smrgsome point `config.cache' contains results you don't want to keep, you
44f29dbc25Smrgmay remove or edit it.
45f29dbc25Smrg
46f29dbc25Smrg   The file `configure.ac' (or `configure.in') is used to create
47f29dbc25Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48f29dbc25Smrgyou want to change it or regenerate `configure' using a newer version
49f29dbc25Smrgof `autoconf'.
50f29dbc25Smrg
517f419768Smrg   The simplest way to compile this package is:
52f29dbc25Smrg
53f29dbc25Smrg  1. `cd' to the directory containing the package's source code and type
54f29dbc25Smrg     `./configure' to configure the package for your system.
55f29dbc25Smrg
56f29dbc25Smrg     Running `configure' might take a while.  While running, it prints
57f29dbc25Smrg     some messages telling which features it is checking for.
58f29dbc25Smrg
59f29dbc25Smrg  2. Type `make' to compile the package.
60f29dbc25Smrg
61f29dbc25Smrg  3. Optionally, type `make check' to run any self-tests that come with
627f419768Smrg     the package, generally using the just-built uninstalled binaries.
63f29dbc25Smrg
64f29dbc25Smrg  4. Type `make install' to install the programs and any data files and
657f419768Smrg     documentation.  When installing into a prefix owned by root, it is
667f419768Smrg     recommended that the package be configured and built as a regular
677f419768Smrg     user, and only the `make install' phase executed with root
687f419768Smrg     privileges.
697f419768Smrg
707f419768Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
717f419768Smrg     this time using the binaries in their final installed location.
727f419768Smrg     This target does not install anything.  Running this target as a
737f419768Smrg     regular user, particularly if the prior `make install' required
747f419768Smrg     root privileges, verifies that the installation completed
757f419768Smrg     correctly.
767f419768Smrg
777f419768Smrg  6. You can remove the program binaries and object files from the
78f29dbc25Smrg     source code directory by typing `make clean'.  To also remove the
79f29dbc25Smrg     files that `configure' created (so you can compile the package for
80f29dbc25Smrg     a different kind of computer), type `make distclean'.  There is
81f29dbc25Smrg     also a `make maintainer-clean' target, but that is intended mainly
82f29dbc25Smrg     for the package's developers.  If you use it, you may have to get
83f29dbc25Smrg     all sorts of other programs in order to regenerate files that came
84f29dbc25Smrg     with the distribution.
85f29dbc25Smrg
867f419768Smrg  7. Often, you can also type `make uninstall' to remove the installed
877f419768Smrg     files again.  In practice, not all packages have tested that
887f419768Smrg     uninstallation works correctly, even though it is required by the
897f419768Smrg     GNU Coding Standards.
907f419768Smrg
917f419768Smrg  8. Some packages, particularly those that use Automake, provide `make
927f419768Smrg     distcheck', which can by used by developers to test that all other
937f419768Smrg     targets like `make install' and `make uninstall' work correctly.
947f419768Smrg     This target is generally not run by end users.
95f29dbc25Smrg
96f29dbc25SmrgCompilers and Options
97f29dbc25Smrg=====================
98f29dbc25Smrg
99f29dbc25Smrg   Some systems require unusual options for compilation or linking that
100f29dbc25Smrgthe `configure' script does not know about.  Run `./configure --help'
101f29dbc25Smrgfor details on some of the pertinent environment variables.
102f29dbc25Smrg
103f29dbc25Smrg   You can give `configure' initial values for configuration parameters
104f29dbc25Smrgby setting variables in the command line or in the environment.  Here
105f29dbc25Smrgis an example:
106f29dbc25Smrg
107f29dbc25Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108f29dbc25Smrg
109f29dbc25Smrg   *Note Defining Variables::, for more details.
110f29dbc25Smrg
111f29dbc25SmrgCompiling For Multiple Architectures
112f29dbc25Smrg====================================
113f29dbc25Smrg
114f29dbc25Smrg   You can compile the package for more than one kind of computer at the
115f29dbc25Smrgsame time, by placing the object files for each architecture in their
116f29dbc25Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117f29dbc25Smrgdirectory where you want the object files and executables to go and run
118f29dbc25Smrgthe `configure' script.  `configure' automatically checks for the
1197f419768Smrgsource code in the directory that `configure' is in and in `..'.  This
1207f419768Smrgis known as a "VPATH" build.
121f29dbc25Smrg
122f29dbc25Smrg   With a non-GNU `make', it is safer to compile the package for one
123f29dbc25Smrgarchitecture at a time in the source code directory.  After you have
124f29dbc25Smrginstalled the package for one architecture, use `make distclean' before
125f29dbc25Smrgreconfiguring for another architecture.
126f29dbc25Smrg
127f29dbc25Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128f29dbc25Smrgexecutables that work on multiple system types--known as "fat" or
129f29dbc25Smrg"universal" binaries--by specifying multiple `-arch' options to the
130f29dbc25Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131f29dbc25Smrgthis:
132f29dbc25Smrg
133f29dbc25Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134f29dbc25Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135f29dbc25Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136f29dbc25Smrg
137f29dbc25Smrg   This is not guaranteed to produce working output in all cases, you
138f29dbc25Smrgmay have to build one architecture at a time and combine the results
139f29dbc25Smrgusing the `lipo' tool if you have problems.
140f29dbc25Smrg
141f29dbc25SmrgInstallation Names
142f29dbc25Smrg==================
143f29dbc25Smrg
144f29dbc25Smrg   By default, `make install' installs the package's commands under
145f29dbc25Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146f29dbc25Smrgcan specify an installation prefix other than `/usr/local' by giving
1477f419768Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1487f419768Smrgabsolute file name.
149f29dbc25Smrg
150f29dbc25Smrg   You can specify separate installation prefixes for
151f29dbc25Smrgarchitecture-specific files and architecture-independent files.  If you
152f29dbc25Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153f29dbc25SmrgPREFIX as the prefix for installing programs and libraries.
154f29dbc25SmrgDocumentation and other data files still use the regular prefix.
155f29dbc25Smrg
156f29dbc25Smrg   In addition, if you use an unusual directory layout you can give
157f29dbc25Smrgoptions like `--bindir=DIR' to specify different values for particular
158f29dbc25Smrgkinds of files.  Run `configure --help' for a list of the directories
1597f419768Smrgyou can set and what kinds of files go in them.  In general, the
1607f419768Smrgdefault for these options is expressed in terms of `${prefix}', so that
1617f419768Smrgspecifying just `--prefix' will affect all of the other directory
1627f419768Smrgspecifications that were not explicitly provided.
1637f419768Smrg
1647f419768Smrg   The most portable way to affect installation locations is to pass the
1657f419768Smrgcorrect locations to `configure'; however, many packages provide one or
1667f419768Smrgboth of the following shortcuts of passing variable assignments to the
1677f419768Smrg`make install' command line to change installation locations without
1687f419768Smrghaving to reconfigure or recompile.
1697f419768Smrg
1707f419768Smrg   The first method involves providing an override variable for each
1717f419768Smrgaffected directory.  For example, `make install
1727f419768Smrgprefix=/alternate/directory' will choose an alternate location for all
1737f419768Smrgdirectory configuration variables that were expressed in terms of
1747f419768Smrg`${prefix}'.  Any directories that were specified during `configure',
1757f419768Smrgbut not in terms of `${prefix}', must each be overridden at install
1767f419768Smrgtime for the entire installation to be relocated.  The approach of
1777f419768Smrgmakefile variable overrides for each directory variable is required by
1787f419768Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1797f419768SmrgHowever, some platforms have known limitations with the semantics of
1807f419768Smrgshared libraries that end up requiring recompilation when using this
1817f419768Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1827f419768Smrg
1837f419768Smrg   The second method involves providing the `DESTDIR' variable.  For
1847f419768Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1857f419768Smrg`/alternate/directory' before all installation names.  The approach of
1867f419768Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1877f419768Smrgdoes not work on platforms that have drive letters.  On the other hand,
1887f419768Smrgit does better at avoiding recompilation issues, and works well even
1897f419768Smrgwhen some directory options were not specified in terms of `${prefix}'
1907f419768Smrgat `configure' time.
1917f419768Smrg
1927f419768SmrgOptional Features
1937f419768Smrg=================
194f29dbc25Smrg
195f29dbc25Smrg   If the package supports it, you can cause programs to be installed
196f29dbc25Smrgwith an extra prefix or suffix on their names by giving `configure' the
197f29dbc25Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198f29dbc25Smrg
199f29dbc25Smrg   Some packages pay attention to `--enable-FEATURE' options to
200f29dbc25Smrg`configure', where FEATURE indicates an optional part of the package.
201f29dbc25SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202f29dbc25Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203f29dbc25Smrg`README' should mention any `--enable-' and `--with-' options that the
204f29dbc25Smrgpackage recognizes.
205f29dbc25Smrg
206f29dbc25Smrg   For packages that use the X Window System, `configure' can usually
207f29dbc25Smrgfind the X include and library files automatically, but if it doesn't,
208f29dbc25Smrgyou can use the `configure' options `--x-includes=DIR' and
209f29dbc25Smrg`--x-libraries=DIR' to specify their locations.
210f29dbc25Smrg
2117f419768Smrg   Some packages offer the ability to configure how verbose the
2127f419768Smrgexecution of `make' will be.  For these packages, running `./configure
2137f419768Smrg--enable-silent-rules' sets the default to minimal output, which can be
2147f419768Smrgoverridden with `make V=1'; while running `./configure
2157f419768Smrg--disable-silent-rules' sets the default to verbose, which can be
2167f419768Smrgoverridden with `make V=0'.
2177f419768Smrg
218f29dbc25SmrgParticular systems
219f29dbc25Smrg==================
220f29dbc25Smrg
221f29dbc25Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222f29dbc25SmrgCC is not installed, it is recommended to use the following options in
223f29dbc25Smrgorder to use an ANSI C compiler:
224f29dbc25Smrg
2257f419768Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226f29dbc25Smrg
227f29dbc25Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228f29dbc25Smrg
2297f419768Smrg   HP-UX `make' updates targets which have the same time stamps as
2307f419768Smrgtheir prerequisites, which makes it generally unusable when shipped
2317f419768Smrggenerated files such as `configure' are involved.  Use GNU `make'
2327f419768Smrginstead.
2337f419768Smrg
234f29dbc25Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235f29dbc25Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236f29dbc25Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237f29dbc25Smrgto try
238f29dbc25Smrg
239f29dbc25Smrg     ./configure CC="cc"
240f29dbc25Smrg
241f29dbc25Smrgand if that doesn't work, try
242f29dbc25Smrg
243f29dbc25Smrg     ./configure CC="cc -nodtk"
244f29dbc25Smrg
2457f419768Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2467f419768Smrgdirectory contains several dysfunctional programs; working variants of
2477f419768Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2487f419768Smrgin your `PATH', put it _after_ `/usr/bin'.
2497f419768Smrg
2507f419768Smrg   On Haiku, software installed for all users goes in `/boot/common',
2517f419768Smrgnot `/usr/local'.  It is recommended to use the following options:
2527f419768Smrg
2537f419768Smrg     ./configure --prefix=/boot/common
2547f419768Smrg
255f29dbc25SmrgSpecifying the System Type
256f29dbc25Smrg==========================
257f29dbc25Smrg
258f29dbc25Smrg   There may be some features `configure' cannot figure out
259f29dbc25Smrgautomatically, but needs to determine by the type of machine the package
260f29dbc25Smrgwill run on.  Usually, assuming the package is built to be run on the
261f29dbc25Smrg_same_ architectures, `configure' can figure that out, but if it prints
262f29dbc25Smrga message saying it cannot guess the machine type, give it the
263f29dbc25Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264f29dbc25Smrgtype, such as `sun4', or a canonical name which has the form:
265f29dbc25Smrg
266f29dbc25Smrg     CPU-COMPANY-SYSTEM
267f29dbc25Smrg
268f29dbc25Smrgwhere SYSTEM can have one of these forms:
269f29dbc25Smrg
2707f419768Smrg     OS
2717f419768Smrg     KERNEL-OS
272f29dbc25Smrg
273f29dbc25Smrg   See the file `config.sub' for the possible values of each field.  If
274f29dbc25Smrg`config.sub' isn't included in this package, then this package doesn't
275f29dbc25Smrgneed to know the machine type.
276f29dbc25Smrg
277f29dbc25Smrg   If you are _building_ compiler tools for cross-compiling, you should
278f29dbc25Smrguse the option `--target=TYPE' to select the type of system they will
279f29dbc25Smrgproduce code for.
280f29dbc25Smrg
281f29dbc25Smrg   If you want to _use_ a cross compiler, that generates code for a
282f29dbc25Smrgplatform different from the build platform, you should specify the
283f29dbc25Smrg"host" platform (i.e., that on which the generated programs will
284f29dbc25Smrgeventually be run) with `--host=TYPE'.
285f29dbc25Smrg
286f29dbc25SmrgSharing Defaults
287f29dbc25Smrg================
288f29dbc25Smrg
289f29dbc25Smrg   If you want to set default values for `configure' scripts to share,
290f29dbc25Smrgyou can create a site shell script called `config.site' that gives
291f29dbc25Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292f29dbc25Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293f29dbc25Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294f29dbc25Smrg`CONFIG_SITE' environment variable to the location of the site script.
295f29dbc25SmrgA warning: not all `configure' scripts look for a site script.
296f29dbc25Smrg
297f29dbc25SmrgDefining Variables
298f29dbc25Smrg==================
299f29dbc25Smrg
300f29dbc25Smrg   Variables not defined in a site shell script can be set in the
301f29dbc25Smrgenvironment passed to `configure'.  However, some packages may run
302f29dbc25Smrgconfigure again during the build, and the customized values of these
303f29dbc25Smrgvariables may be lost.  In order to avoid this problem, you should set
304f29dbc25Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305f29dbc25Smrg
306f29dbc25Smrg     ./configure CC=/usr/local2/bin/gcc
307f29dbc25Smrg
308f29dbc25Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309f29dbc25Smrgoverridden in the site shell script).
310f29dbc25Smrg
311f29dbc25SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312f29dbc25Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313f29dbc25Smrg
314f29dbc25Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315f29dbc25Smrg
316f29dbc25Smrg`configure' Invocation
317f29dbc25Smrg======================
318f29dbc25Smrg
319f29dbc25Smrg   `configure' recognizes the following options to control how it
320f29dbc25Smrgoperates.
321f29dbc25Smrg
322f29dbc25Smrg`--help'
323f29dbc25Smrg`-h'
324f29dbc25Smrg     Print a summary of all of the options to `configure', and exit.
325f29dbc25Smrg
326f29dbc25Smrg`--help=short'
327f29dbc25Smrg`--help=recursive'
328f29dbc25Smrg     Print a summary of the options unique to this package's
329f29dbc25Smrg     `configure', and exit.  The `short' variant lists options used
330f29dbc25Smrg     only in the top level, while the `recursive' variant lists options
331f29dbc25Smrg     also present in any nested packages.
332f29dbc25Smrg
333f29dbc25Smrg`--version'
334f29dbc25Smrg`-V'
335f29dbc25Smrg     Print the version of Autoconf used to generate the `configure'
336f29dbc25Smrg     script, and exit.
337f29dbc25Smrg
338f29dbc25Smrg`--cache-file=FILE'
339f29dbc25Smrg     Enable the cache: use and save the results of the tests in FILE,
340f29dbc25Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341f29dbc25Smrg     disable caching.
342f29dbc25Smrg
343f29dbc25Smrg`--config-cache'
344f29dbc25Smrg`-C'
345f29dbc25Smrg     Alias for `--cache-file=config.cache'.
346f29dbc25Smrg
347f29dbc25Smrg`--quiet'
348f29dbc25Smrg`--silent'
349f29dbc25Smrg`-q'
350f29dbc25Smrg     Do not print messages saying which checks are being made.  To
351f29dbc25Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352f29dbc25Smrg     messages will still be shown).
353f29dbc25Smrg
354f29dbc25Smrg`--srcdir=DIR'
355f29dbc25Smrg     Look for the package's source code in directory DIR.  Usually
356f29dbc25Smrg     `configure' can determine that directory automatically.
357f29dbc25Smrg
358f29dbc25Smrg`--prefix=DIR'
3597f419768Smrg     Use DIR as the installation prefix.  *note Installation Names::
360f29dbc25Smrg     for more details, including other options available for fine-tuning
361f29dbc25Smrg     the installation locations.
362f29dbc25Smrg
363f29dbc25Smrg`--no-create'
364f29dbc25Smrg`-n'
365f29dbc25Smrg     Run the configure checks, but stop before creating any output
366f29dbc25Smrg     files.
367f29dbc25Smrg
368f29dbc25Smrg`configure' also accepts some other, not widely useful, options.  Run
369f29dbc25Smrg`configure --help' for more details.
370f29dbc25Smrg
371