INSTALL revision 01395c31
1de7ed6e8SmrgInstallation Instructions
2de7ed6e8Smrg*************************
3de7ed6e8Smrg
401395c31SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
501395c31SmrgInc.
6de7ed6e8Smrg
701395c31Smrg   Copying and distribution of this file, with or without modification,
801395c31Smrgare permitted in any medium without royalty provided the copyright
901395c31Smrgnotice and this notice are preserved.  This file is offered as-is,
1001395c31Smrgwithout warranty of any kind.
11de7ed6e8Smrg
12de7ed6e8SmrgBasic Installation
13de7ed6e8Smrg==================
14de7ed6e8Smrg
15de7ed6e8Smrg   Briefly, the shell commands `./configure; make; make install' should
16de7ed6e8Smrgconfigure, build, and install this package.  The following
17de7ed6e8Smrgmore-detailed instructions are generic; see the `README' file for
1801395c31Smrginstructions specific to this package.  Some packages provide this
1901395c31Smrg`INSTALL' file but do not implement all of the features documented
2001395c31Smrgbelow.  The lack of an optional feature in a given package is not
2101395c31Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2201395c31Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23de7ed6e8Smrg
24de7ed6e8Smrg   The `configure' shell script attempts to guess correct values for
25de7ed6e8Smrgvarious system-dependent variables used during compilation.  It uses
26de7ed6e8Smrgthose values to create a `Makefile' in each directory of the package.
27de7ed6e8SmrgIt may also create one or more `.h' files containing system-dependent
28de7ed6e8Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29de7ed6e8Smrgyou can run in the future to recreate the current configuration, and a
30de7ed6e8Smrgfile `config.log' containing compiler output (useful mainly for
31de7ed6e8Smrgdebugging `configure').
32de7ed6e8Smrg
33de7ed6e8Smrg   It can also use an optional file (typically called `config.cache'
34de7ed6e8Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35de7ed6e8Smrgthe results of its tests to speed up reconfiguring.  Caching is
36de7ed6e8Smrgdisabled by default to prevent problems with accidental use of stale
37de7ed6e8Smrgcache files.
38de7ed6e8Smrg
39de7ed6e8Smrg   If you need to do unusual things to compile the package, please try
40de7ed6e8Smrgto figure out how `configure' could check whether to do them, and mail
41de7ed6e8Smrgdiffs or instructions to the address given in the `README' so they can
42de7ed6e8Smrgbe considered for the next release.  If you are using the cache, and at
43de7ed6e8Smrgsome point `config.cache' contains results you don't want to keep, you
44de7ed6e8Smrgmay remove or edit it.
45de7ed6e8Smrg
46de7ed6e8Smrg   The file `configure.ac' (or `configure.in') is used to create
47de7ed6e8Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48de7ed6e8Smrgyou want to change it or regenerate `configure' using a newer version
49de7ed6e8Smrgof `autoconf'.
50de7ed6e8Smrg
5101395c31Smrg   The simplest way to compile this package is:
52de7ed6e8Smrg
53de7ed6e8Smrg  1. `cd' to the directory containing the package's source code and type
54de7ed6e8Smrg     `./configure' to configure the package for your system.
55de7ed6e8Smrg
56de7ed6e8Smrg     Running `configure' might take a while.  While running, it prints
57de7ed6e8Smrg     some messages telling which features it is checking for.
58de7ed6e8Smrg
59de7ed6e8Smrg  2. Type `make' to compile the package.
60de7ed6e8Smrg
61de7ed6e8Smrg  3. Optionally, type `make check' to run any self-tests that come with
6201395c31Smrg     the package, generally using the just-built uninstalled binaries.
63de7ed6e8Smrg
64de7ed6e8Smrg  4. Type `make install' to install the programs and any data files and
6501395c31Smrg     documentation.  When installing into a prefix owned by root, it is
6601395c31Smrg     recommended that the package be configured and built as a regular
6701395c31Smrg     user, and only the `make install' phase executed with root
6801395c31Smrg     privileges.
6901395c31Smrg
7001395c31Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7101395c31Smrg     this time using the binaries in their final installed location.
7201395c31Smrg     This target does not install anything.  Running this target as a
7301395c31Smrg     regular user, particularly if the prior `make install' required
7401395c31Smrg     root privileges, verifies that the installation completed
7501395c31Smrg     correctly.
7601395c31Smrg
7701395c31Smrg  6. You can remove the program binaries and object files from the
78de7ed6e8Smrg     source code directory by typing `make clean'.  To also remove the
79de7ed6e8Smrg     files that `configure' created (so you can compile the package for
80de7ed6e8Smrg     a different kind of computer), type `make distclean'.  There is
81de7ed6e8Smrg     also a `make maintainer-clean' target, but that is intended mainly
82de7ed6e8Smrg     for the package's developers.  If you use it, you may have to get
83de7ed6e8Smrg     all sorts of other programs in order to regenerate files that came
84de7ed6e8Smrg     with the distribution.
85de7ed6e8Smrg
8601395c31Smrg  7. Often, you can also type `make uninstall' to remove the installed
8701395c31Smrg     files again.  In practice, not all packages have tested that
8801395c31Smrg     uninstallation works correctly, even though it is required by the
8901395c31Smrg     GNU Coding Standards.
9001395c31Smrg
9101395c31Smrg  8. Some packages, particularly those that use Automake, provide `make
9201395c31Smrg     distcheck', which can by used by developers to test that all other
9301395c31Smrg     targets like `make install' and `make uninstall' work correctly.
9401395c31Smrg     This target is generally not run by end users.
95de7ed6e8Smrg
96de7ed6e8SmrgCompilers and Options
97de7ed6e8Smrg=====================
98de7ed6e8Smrg
99de7ed6e8Smrg   Some systems require unusual options for compilation or linking that
100de7ed6e8Smrgthe `configure' script does not know about.  Run `./configure --help'
101de7ed6e8Smrgfor details on some of the pertinent environment variables.
102de7ed6e8Smrg
103de7ed6e8Smrg   You can give `configure' initial values for configuration parameters
104de7ed6e8Smrgby setting variables in the command line or in the environment.  Here
105de7ed6e8Smrgis an example:
106de7ed6e8Smrg
107de7ed6e8Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108de7ed6e8Smrg
109de7ed6e8Smrg   *Note Defining Variables::, for more details.
110de7ed6e8Smrg
111de7ed6e8SmrgCompiling For Multiple Architectures
112de7ed6e8Smrg====================================
113de7ed6e8Smrg
114de7ed6e8Smrg   You can compile the package for more than one kind of computer at the
115de7ed6e8Smrgsame time, by placing the object files for each architecture in their
116de7ed6e8Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117de7ed6e8Smrgdirectory where you want the object files and executables to go and run
118de7ed6e8Smrgthe `configure' script.  `configure' automatically checks for the
11901395c31Smrgsource code in the directory that `configure' is in and in `..'.  This
12001395c31Smrgis known as a "VPATH" build.
121de7ed6e8Smrg
122de7ed6e8Smrg   With a non-GNU `make', it is safer to compile the package for one
123de7ed6e8Smrgarchitecture at a time in the source code directory.  After you have
124de7ed6e8Smrginstalled the package for one architecture, use `make distclean' before
125de7ed6e8Smrgreconfiguring for another architecture.
126de7ed6e8Smrg
127de7ed6e8Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128de7ed6e8Smrgexecutables that work on multiple system types--known as "fat" or
129de7ed6e8Smrg"universal" binaries--by specifying multiple `-arch' options to the
130de7ed6e8Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131de7ed6e8Smrgthis:
132de7ed6e8Smrg
133de7ed6e8Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134de7ed6e8Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135de7ed6e8Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136de7ed6e8Smrg
137de7ed6e8Smrg   This is not guaranteed to produce working output in all cases, you
138de7ed6e8Smrgmay have to build one architecture at a time and combine the results
139de7ed6e8Smrgusing the `lipo' tool if you have problems.
140de7ed6e8Smrg
141de7ed6e8SmrgInstallation Names
142de7ed6e8Smrg==================
143de7ed6e8Smrg
144de7ed6e8Smrg   By default, `make install' installs the package's commands under
145de7ed6e8Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146de7ed6e8Smrgcan specify an installation prefix other than `/usr/local' by giving
14701395c31Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14801395c31Smrgabsolute file name.
149de7ed6e8Smrg
150de7ed6e8Smrg   You can specify separate installation prefixes for
151de7ed6e8Smrgarchitecture-specific files and architecture-independent files.  If you
152de7ed6e8Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153de7ed6e8SmrgPREFIX as the prefix for installing programs and libraries.
154de7ed6e8SmrgDocumentation and other data files still use the regular prefix.
155de7ed6e8Smrg
156de7ed6e8Smrg   In addition, if you use an unusual directory layout you can give
157de7ed6e8Smrgoptions like `--bindir=DIR' to specify different values for particular
158de7ed6e8Smrgkinds of files.  Run `configure --help' for a list of the directories
15901395c31Smrgyou can set and what kinds of files go in them.  In general, the
16001395c31Smrgdefault for these options is expressed in terms of `${prefix}', so that
16101395c31Smrgspecifying just `--prefix' will affect all of the other directory
16201395c31Smrgspecifications that were not explicitly provided.
16301395c31Smrg
16401395c31Smrg   The most portable way to affect installation locations is to pass the
16501395c31Smrgcorrect locations to `configure'; however, many packages provide one or
16601395c31Smrgboth of the following shortcuts of passing variable assignments to the
16701395c31Smrg`make install' command line to change installation locations without
16801395c31Smrghaving to reconfigure or recompile.
16901395c31Smrg
17001395c31Smrg   The first method involves providing an override variable for each
17101395c31Smrgaffected directory.  For example, `make install
17201395c31Smrgprefix=/alternate/directory' will choose an alternate location for all
17301395c31Smrgdirectory configuration variables that were expressed in terms of
17401395c31Smrg`${prefix}'.  Any directories that were specified during `configure',
17501395c31Smrgbut not in terms of `${prefix}', must each be overridden at install
17601395c31Smrgtime for the entire installation to be relocated.  The approach of
17701395c31Smrgmakefile variable overrides for each directory variable is required by
17801395c31Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17901395c31SmrgHowever, some platforms have known limitations with the semantics of
18001395c31Smrgshared libraries that end up requiring recompilation when using this
18101395c31Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18201395c31Smrg
18301395c31Smrg   The second method involves providing the `DESTDIR' variable.  For
18401395c31Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18501395c31Smrg`/alternate/directory' before all installation names.  The approach of
18601395c31Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18701395c31Smrgdoes not work on platforms that have drive letters.  On the other hand,
18801395c31Smrgit does better at avoiding recompilation issues, and works well even
18901395c31Smrgwhen some directory options were not specified in terms of `${prefix}'
19001395c31Smrgat `configure' time.
19101395c31Smrg
19201395c31SmrgOptional Features
19301395c31Smrg=================
194de7ed6e8Smrg
195de7ed6e8Smrg   If the package supports it, you can cause programs to be installed
196de7ed6e8Smrgwith an extra prefix or suffix on their names by giving `configure' the
197de7ed6e8Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198de7ed6e8Smrg
199de7ed6e8Smrg   Some packages pay attention to `--enable-FEATURE' options to
200de7ed6e8Smrg`configure', where FEATURE indicates an optional part of the package.
201de7ed6e8SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202de7ed6e8Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203de7ed6e8Smrg`README' should mention any `--enable-' and `--with-' options that the
204de7ed6e8Smrgpackage recognizes.
205de7ed6e8Smrg
206de7ed6e8Smrg   For packages that use the X Window System, `configure' can usually
207de7ed6e8Smrgfind the X include and library files automatically, but if it doesn't,
208de7ed6e8Smrgyou can use the `configure' options `--x-includes=DIR' and
209de7ed6e8Smrg`--x-libraries=DIR' to specify their locations.
210de7ed6e8Smrg
21101395c31Smrg   Some packages offer the ability to configure how verbose the
21201395c31Smrgexecution of `make' will be.  For these packages, running `./configure
21301395c31Smrg--enable-silent-rules' sets the default to minimal output, which can be
21401395c31Smrgoverridden with `make V=1'; while running `./configure
21501395c31Smrg--disable-silent-rules' sets the default to verbose, which can be
21601395c31Smrgoverridden with `make V=0'.
21701395c31Smrg
218de7ed6e8SmrgParticular systems
219de7ed6e8Smrg==================
220de7ed6e8Smrg
221de7ed6e8Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222de7ed6e8SmrgCC is not installed, it is recommended to use the following options in
223de7ed6e8Smrgorder to use an ANSI C compiler:
224de7ed6e8Smrg
22501395c31Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226de7ed6e8Smrg
227de7ed6e8Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228de7ed6e8Smrg
22901395c31Smrg   HP-UX `make' updates targets which have the same time stamps as
23001395c31Smrgtheir prerequisites, which makes it generally unusable when shipped
23101395c31Smrggenerated files such as `configure' are involved.  Use GNU `make'
23201395c31Smrginstead.
23301395c31Smrg
234de7ed6e8Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235de7ed6e8Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236de7ed6e8Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237de7ed6e8Smrgto try
238de7ed6e8Smrg
239de7ed6e8Smrg     ./configure CC="cc"
240de7ed6e8Smrg
241de7ed6e8Smrgand if that doesn't work, try
242de7ed6e8Smrg
243de7ed6e8Smrg     ./configure CC="cc -nodtk"
244de7ed6e8Smrg
24501395c31Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24601395c31Smrgdirectory contains several dysfunctional programs; working variants of
24701395c31Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24801395c31Smrgin your `PATH', put it _after_ `/usr/bin'.
24901395c31Smrg
25001395c31Smrg   On Haiku, software installed for all users goes in `/boot/common',
25101395c31Smrgnot `/usr/local'.  It is recommended to use the following options:
25201395c31Smrg
25301395c31Smrg     ./configure --prefix=/boot/common
25401395c31Smrg
255de7ed6e8SmrgSpecifying the System Type
256de7ed6e8Smrg==========================
257de7ed6e8Smrg
258de7ed6e8Smrg   There may be some features `configure' cannot figure out
259de7ed6e8Smrgautomatically, but needs to determine by the type of machine the package
260de7ed6e8Smrgwill run on.  Usually, assuming the package is built to be run on the
261de7ed6e8Smrg_same_ architectures, `configure' can figure that out, but if it prints
262de7ed6e8Smrga message saying it cannot guess the machine type, give it the
263de7ed6e8Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264de7ed6e8Smrgtype, such as `sun4', or a canonical name which has the form:
265de7ed6e8Smrg
266de7ed6e8Smrg     CPU-COMPANY-SYSTEM
267de7ed6e8Smrg
268de7ed6e8Smrgwhere SYSTEM can have one of these forms:
269de7ed6e8Smrg
27001395c31Smrg     OS
27101395c31Smrg     KERNEL-OS
272de7ed6e8Smrg
273de7ed6e8Smrg   See the file `config.sub' for the possible values of each field.  If
274de7ed6e8Smrg`config.sub' isn't included in this package, then this package doesn't
275de7ed6e8Smrgneed to know the machine type.
276de7ed6e8Smrg
277de7ed6e8Smrg   If you are _building_ compiler tools for cross-compiling, you should
278de7ed6e8Smrguse the option `--target=TYPE' to select the type of system they will
279de7ed6e8Smrgproduce code for.
280de7ed6e8Smrg
281de7ed6e8Smrg   If you want to _use_ a cross compiler, that generates code for a
282de7ed6e8Smrgplatform different from the build platform, you should specify the
283de7ed6e8Smrg"host" platform (i.e., that on which the generated programs will
284de7ed6e8Smrgeventually be run) with `--host=TYPE'.
285de7ed6e8Smrg
286de7ed6e8SmrgSharing Defaults
287de7ed6e8Smrg================
288de7ed6e8Smrg
289de7ed6e8Smrg   If you want to set default values for `configure' scripts to share,
290de7ed6e8Smrgyou can create a site shell script called `config.site' that gives
291de7ed6e8Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292de7ed6e8Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293de7ed6e8Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294de7ed6e8Smrg`CONFIG_SITE' environment variable to the location of the site script.
295de7ed6e8SmrgA warning: not all `configure' scripts look for a site script.
296de7ed6e8Smrg
297de7ed6e8SmrgDefining Variables
298de7ed6e8Smrg==================
299de7ed6e8Smrg
300de7ed6e8Smrg   Variables not defined in a site shell script can be set in the
301de7ed6e8Smrgenvironment passed to `configure'.  However, some packages may run
302de7ed6e8Smrgconfigure again during the build, and the customized values of these
303de7ed6e8Smrgvariables may be lost.  In order to avoid this problem, you should set
304de7ed6e8Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305de7ed6e8Smrg
306de7ed6e8Smrg     ./configure CC=/usr/local2/bin/gcc
307de7ed6e8Smrg
308de7ed6e8Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309de7ed6e8Smrgoverridden in the site shell script).
310de7ed6e8Smrg
311de7ed6e8SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312de7ed6e8Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313de7ed6e8Smrg
314de7ed6e8Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315de7ed6e8Smrg
316de7ed6e8Smrg`configure' Invocation
317de7ed6e8Smrg======================
318de7ed6e8Smrg
319de7ed6e8Smrg   `configure' recognizes the following options to control how it
320de7ed6e8Smrgoperates.
321de7ed6e8Smrg
322de7ed6e8Smrg`--help'
323de7ed6e8Smrg`-h'
324de7ed6e8Smrg     Print a summary of all of the options to `configure', and exit.
325de7ed6e8Smrg
326de7ed6e8Smrg`--help=short'
327de7ed6e8Smrg`--help=recursive'
328de7ed6e8Smrg     Print a summary of the options unique to this package's
329de7ed6e8Smrg     `configure', and exit.  The `short' variant lists options used
330de7ed6e8Smrg     only in the top level, while the `recursive' variant lists options
331de7ed6e8Smrg     also present in any nested packages.
332de7ed6e8Smrg
333de7ed6e8Smrg`--version'
334de7ed6e8Smrg`-V'
335de7ed6e8Smrg     Print the version of Autoconf used to generate the `configure'
336de7ed6e8Smrg     script, and exit.
337de7ed6e8Smrg
338de7ed6e8Smrg`--cache-file=FILE'
339de7ed6e8Smrg     Enable the cache: use and save the results of the tests in FILE,
340de7ed6e8Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341de7ed6e8Smrg     disable caching.
342de7ed6e8Smrg
343de7ed6e8Smrg`--config-cache'
344de7ed6e8Smrg`-C'
345de7ed6e8Smrg     Alias for `--cache-file=config.cache'.
346de7ed6e8Smrg
347de7ed6e8Smrg`--quiet'
348de7ed6e8Smrg`--silent'
349de7ed6e8Smrg`-q'
350de7ed6e8Smrg     Do not print messages saying which checks are being made.  To
351de7ed6e8Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352de7ed6e8Smrg     messages will still be shown).
353de7ed6e8Smrg
354de7ed6e8Smrg`--srcdir=DIR'
355de7ed6e8Smrg     Look for the package's source code in directory DIR.  Usually
356de7ed6e8Smrg     `configure' can determine that directory automatically.
357de7ed6e8Smrg
358de7ed6e8Smrg`--prefix=DIR'
35901395c31Smrg     Use DIR as the installation prefix.  *note Installation Names::
360de7ed6e8Smrg     for more details, including other options available for fine-tuning
361de7ed6e8Smrg     the installation locations.
362de7ed6e8Smrg
363de7ed6e8Smrg`--no-create'
364de7ed6e8Smrg`-n'
365de7ed6e8Smrg     Run the configure checks, but stop before creating any output
366de7ed6e8Smrg     files.
367de7ed6e8Smrg
368de7ed6e8Smrg`configure' also accepts some other, not widely useful, options.  Run
369de7ed6e8Smrg`configure --help' for more details.
370de7ed6e8Smrg
371