1b5d2086dSmrgInstallation Instructions
2b5d2086dSmrg*************************
3b5d2086dSmrg
418eba588SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
518eba588SmrgInc.
6b5d2086dSmrg
718eba588Smrg   Copying and distribution of this file, with or without modification,
818eba588Smrgare permitted in any medium without royalty provided the copyright
918eba588Smrgnotice and this notice are preserved.  This file is offered as-is,
1018eba588Smrgwithout warranty of any kind.
11b5d2086dSmrg
12b5d2086dSmrgBasic Installation
13b5d2086dSmrg==================
14b5d2086dSmrg
15b5d2086dSmrg   Briefly, the shell commands `./configure; make; make install' should
16b5d2086dSmrgconfigure, build, and install this package.  The following
17b5d2086dSmrgmore-detailed instructions are generic; see the `README' file for
1818eba588Smrginstructions specific to this package.  Some packages provide this
1918eba588Smrg`INSTALL' file but do not implement all of the features documented
2018eba588Smrgbelow.  The lack of an optional feature in a given package is not
2118eba588Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2218eba588Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23b5d2086dSmrg
24b5d2086dSmrg   The `configure' shell script attempts to guess correct values for
25b5d2086dSmrgvarious system-dependent variables used during compilation.  It uses
26b5d2086dSmrgthose values to create a `Makefile' in each directory of the package.
27b5d2086dSmrgIt may also create one or more `.h' files containing system-dependent
28b5d2086dSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29b5d2086dSmrgyou can run in the future to recreate the current configuration, and a
30b5d2086dSmrgfile `config.log' containing compiler output (useful mainly for
31b5d2086dSmrgdebugging `configure').
32b5d2086dSmrg
33b5d2086dSmrg   It can also use an optional file (typically called `config.cache'
34b5d2086dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35b5d2086dSmrgthe results of its tests to speed up reconfiguring.  Caching is
36b5d2086dSmrgdisabled by default to prevent problems with accidental use of stale
37b5d2086dSmrgcache files.
38b5d2086dSmrg
39b5d2086dSmrg   If you need to do unusual things to compile the package, please try
40b5d2086dSmrgto figure out how `configure' could check whether to do them, and mail
41b5d2086dSmrgdiffs or instructions to the address given in the `README' so they can
42b5d2086dSmrgbe considered for the next release.  If you are using the cache, and at
43b5d2086dSmrgsome point `config.cache' contains results you don't want to keep, you
44b5d2086dSmrgmay remove or edit it.
45b5d2086dSmrg
46b5d2086dSmrg   The file `configure.ac' (or `configure.in') is used to create
47b5d2086dSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48b5d2086dSmrgyou want to change it or regenerate `configure' using a newer version
49b5d2086dSmrgof `autoconf'.
50b5d2086dSmrg
5118eba588Smrg   The simplest way to compile this package is:
52b5d2086dSmrg
53b5d2086dSmrg  1. `cd' to the directory containing the package's source code and type
54b5d2086dSmrg     `./configure' to configure the package for your system.
55b5d2086dSmrg
56b5d2086dSmrg     Running `configure' might take a while.  While running, it prints
57b5d2086dSmrg     some messages telling which features it is checking for.
58b5d2086dSmrg
59b5d2086dSmrg  2. Type `make' to compile the package.
60b5d2086dSmrg
61b5d2086dSmrg  3. Optionally, type `make check' to run any self-tests that come with
6218eba588Smrg     the package, generally using the just-built uninstalled binaries.
63b5d2086dSmrg
64b5d2086dSmrg  4. Type `make install' to install the programs and any data files and
6518eba588Smrg     documentation.  When installing into a prefix owned by root, it is
6618eba588Smrg     recommended that the package be configured and built as a regular
6718eba588Smrg     user, and only the `make install' phase executed with root
6818eba588Smrg     privileges.
6918eba588Smrg
7018eba588Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7118eba588Smrg     this time using the binaries in their final installed location.
7218eba588Smrg     This target does not install anything.  Running this target as a
7318eba588Smrg     regular user, particularly if the prior `make install' required
7418eba588Smrg     root privileges, verifies that the installation completed
7518eba588Smrg     correctly.
7618eba588Smrg
7718eba588Smrg  6. You can remove the program binaries and object files from the
78b5d2086dSmrg     source code directory by typing `make clean'.  To also remove the
79b5d2086dSmrg     files that `configure' created (so you can compile the package for
80b5d2086dSmrg     a different kind of computer), type `make distclean'.  There is
81b5d2086dSmrg     also a `make maintainer-clean' target, but that is intended mainly
82b5d2086dSmrg     for the package's developers.  If you use it, you may have to get
83b5d2086dSmrg     all sorts of other programs in order to regenerate files that came
84b5d2086dSmrg     with the distribution.
85b5d2086dSmrg
8618eba588Smrg  7. Often, you can also type `make uninstall' to remove the installed
8718eba588Smrg     files again.  In practice, not all packages have tested that
8818eba588Smrg     uninstallation works correctly, even though it is required by the
8918eba588Smrg     GNU Coding Standards.
9018eba588Smrg
9118eba588Smrg  8. Some packages, particularly those that use Automake, provide `make
9218eba588Smrg     distcheck', which can by used by developers to test that all other
9318eba588Smrg     targets like `make install' and `make uninstall' work correctly.
9418eba588Smrg     This target is generally not run by end users.
95b5d2086dSmrg
96b5d2086dSmrgCompilers and Options
97b5d2086dSmrg=====================
98b5d2086dSmrg
99b5d2086dSmrg   Some systems require unusual options for compilation or linking that
100b5d2086dSmrgthe `configure' script does not know about.  Run `./configure --help'
101b5d2086dSmrgfor details on some of the pertinent environment variables.
102b5d2086dSmrg
103b5d2086dSmrg   You can give `configure' initial values for configuration parameters
104b5d2086dSmrgby setting variables in the command line or in the environment.  Here
105b5d2086dSmrgis an example:
106b5d2086dSmrg
107b5d2086dSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108b5d2086dSmrg
109b5d2086dSmrg   *Note Defining Variables::, for more details.
110b5d2086dSmrg
111b5d2086dSmrgCompiling For Multiple Architectures
112b5d2086dSmrg====================================
113b5d2086dSmrg
114b5d2086dSmrg   You can compile the package for more than one kind of computer at the
115b5d2086dSmrgsame time, by placing the object files for each architecture in their
116b5d2086dSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117b5d2086dSmrgdirectory where you want the object files and executables to go and run
118b5d2086dSmrgthe `configure' script.  `configure' automatically checks for the
11918eba588Smrgsource code in the directory that `configure' is in and in `..'.  This
12018eba588Smrgis known as a "VPATH" build.
121b5d2086dSmrg
122b5d2086dSmrg   With a non-GNU `make', it is safer to compile the package for one
123b5d2086dSmrgarchitecture at a time in the source code directory.  After you have
124b5d2086dSmrginstalled the package for one architecture, use `make distclean' before
125b5d2086dSmrgreconfiguring for another architecture.
126b5d2086dSmrg
127b5d2086dSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128b5d2086dSmrgexecutables that work on multiple system types--known as "fat" or
129b5d2086dSmrg"universal" binaries--by specifying multiple `-arch' options to the
130b5d2086dSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131b5d2086dSmrgthis:
132b5d2086dSmrg
133b5d2086dSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134b5d2086dSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135b5d2086dSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136b5d2086dSmrg
137b5d2086dSmrg   This is not guaranteed to produce working output in all cases, you
138b5d2086dSmrgmay have to build one architecture at a time and combine the results
139b5d2086dSmrgusing the `lipo' tool if you have problems.
140b5d2086dSmrg
141b5d2086dSmrgInstallation Names
142b5d2086dSmrg==================
143b5d2086dSmrg
144b5d2086dSmrg   By default, `make install' installs the package's commands under
145b5d2086dSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146b5d2086dSmrgcan specify an installation prefix other than `/usr/local' by giving
14718eba588Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14818eba588Smrgabsolute file name.
149b5d2086dSmrg
150b5d2086dSmrg   You can specify separate installation prefixes for
151b5d2086dSmrgarchitecture-specific files and architecture-independent files.  If you
152b5d2086dSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153b5d2086dSmrgPREFIX as the prefix for installing programs and libraries.
154b5d2086dSmrgDocumentation and other data files still use the regular prefix.
155b5d2086dSmrg
156b5d2086dSmrg   In addition, if you use an unusual directory layout you can give
157b5d2086dSmrgoptions like `--bindir=DIR' to specify different values for particular
158b5d2086dSmrgkinds of files.  Run `configure --help' for a list of the directories
15918eba588Smrgyou can set and what kinds of files go in them.  In general, the
16018eba588Smrgdefault for these options is expressed in terms of `${prefix}', so that
16118eba588Smrgspecifying just `--prefix' will affect all of the other directory
16218eba588Smrgspecifications that were not explicitly provided.
16318eba588Smrg
16418eba588Smrg   The most portable way to affect installation locations is to pass the
16518eba588Smrgcorrect locations to `configure'; however, many packages provide one or
16618eba588Smrgboth of the following shortcuts of passing variable assignments to the
16718eba588Smrg`make install' command line to change installation locations without
16818eba588Smrghaving to reconfigure or recompile.
16918eba588Smrg
17018eba588Smrg   The first method involves providing an override variable for each
17118eba588Smrgaffected directory.  For example, `make install
17218eba588Smrgprefix=/alternate/directory' will choose an alternate location for all
17318eba588Smrgdirectory configuration variables that were expressed in terms of
17418eba588Smrg`${prefix}'.  Any directories that were specified during `configure',
17518eba588Smrgbut not in terms of `${prefix}', must each be overridden at install
17618eba588Smrgtime for the entire installation to be relocated.  The approach of
17718eba588Smrgmakefile variable overrides for each directory variable is required by
17818eba588Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17918eba588SmrgHowever, some platforms have known limitations with the semantics of
18018eba588Smrgshared libraries that end up requiring recompilation when using this
18118eba588Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18218eba588Smrg
18318eba588Smrg   The second method involves providing the `DESTDIR' variable.  For
18418eba588Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18518eba588Smrg`/alternate/directory' before all installation names.  The approach of
18618eba588Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18718eba588Smrgdoes not work on platforms that have drive letters.  On the other hand,
18818eba588Smrgit does better at avoiding recompilation issues, and works well even
18918eba588Smrgwhen some directory options were not specified in terms of `${prefix}'
19018eba588Smrgat `configure' time.
19118eba588Smrg
19218eba588SmrgOptional Features
19318eba588Smrg=================
194b5d2086dSmrg
195b5d2086dSmrg   If the package supports it, you can cause programs to be installed
196b5d2086dSmrgwith an extra prefix or suffix on their names by giving `configure' the
197b5d2086dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198b5d2086dSmrg
199b5d2086dSmrg   Some packages pay attention to `--enable-FEATURE' options to
200b5d2086dSmrg`configure', where FEATURE indicates an optional part of the package.
201b5d2086dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202b5d2086dSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203b5d2086dSmrg`README' should mention any `--enable-' and `--with-' options that the
204b5d2086dSmrgpackage recognizes.
205b5d2086dSmrg
206b5d2086dSmrg   For packages that use the X Window System, `configure' can usually
207b5d2086dSmrgfind the X include and library files automatically, but if it doesn't,
208b5d2086dSmrgyou can use the `configure' options `--x-includes=DIR' and
209b5d2086dSmrg`--x-libraries=DIR' to specify their locations.
210b5d2086dSmrg
21118eba588Smrg   Some packages offer the ability to configure how verbose the
21218eba588Smrgexecution of `make' will be.  For these packages, running `./configure
21318eba588Smrg--enable-silent-rules' sets the default to minimal output, which can be
21418eba588Smrgoverridden with `make V=1'; while running `./configure
21518eba588Smrg--disable-silent-rules' sets the default to verbose, which can be
21618eba588Smrgoverridden with `make V=0'.
21718eba588Smrg
218b5d2086dSmrgParticular systems
219b5d2086dSmrg==================
220b5d2086dSmrg
221b5d2086dSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222b5d2086dSmrgCC is not installed, it is recommended to use the following options in
223b5d2086dSmrgorder to use an ANSI C compiler:
224b5d2086dSmrg
22518eba588Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226b5d2086dSmrg
227b5d2086dSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228b5d2086dSmrg
22918eba588Smrg   HP-UX `make' updates targets which have the same time stamps as
23018eba588Smrgtheir prerequisites, which makes it generally unusable when shipped
23118eba588Smrggenerated files such as `configure' are involved.  Use GNU `make'
23218eba588Smrginstead.
23318eba588Smrg
234b5d2086dSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235b5d2086dSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236b5d2086dSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237b5d2086dSmrgto try
238b5d2086dSmrg
239b5d2086dSmrg     ./configure CC="cc"
240b5d2086dSmrg
241b5d2086dSmrgand if that doesn't work, try
242b5d2086dSmrg
243b5d2086dSmrg     ./configure CC="cc -nodtk"
244b5d2086dSmrg
24518eba588Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24618eba588Smrgdirectory contains several dysfunctional programs; working variants of
24718eba588Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24818eba588Smrgin your `PATH', put it _after_ `/usr/bin'.
24918eba588Smrg
25018eba588Smrg   On Haiku, software installed for all users goes in `/boot/common',
25118eba588Smrgnot `/usr/local'.  It is recommended to use the following options:
25218eba588Smrg
25318eba588Smrg     ./configure --prefix=/boot/common
25418eba588Smrg
255b5d2086dSmrgSpecifying the System Type
256b5d2086dSmrg==========================
257b5d2086dSmrg
258b5d2086dSmrg   There may be some features `configure' cannot figure out
259b5d2086dSmrgautomatically, but needs to determine by the type of machine the package
260b5d2086dSmrgwill run on.  Usually, assuming the package is built to be run on the
261b5d2086dSmrg_same_ architectures, `configure' can figure that out, but if it prints
262b5d2086dSmrga message saying it cannot guess the machine type, give it the
263b5d2086dSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264b5d2086dSmrgtype, such as `sun4', or a canonical name which has the form:
265b5d2086dSmrg
266b5d2086dSmrg     CPU-COMPANY-SYSTEM
267b5d2086dSmrg
268b5d2086dSmrgwhere SYSTEM can have one of these forms:
269b5d2086dSmrg
27018eba588Smrg     OS
27118eba588Smrg     KERNEL-OS
272b5d2086dSmrg
273b5d2086dSmrg   See the file `config.sub' for the possible values of each field.  If
274b5d2086dSmrg`config.sub' isn't included in this package, then this package doesn't
275b5d2086dSmrgneed to know the machine type.
276b5d2086dSmrg
277b5d2086dSmrg   If you are _building_ compiler tools for cross-compiling, you should
278b5d2086dSmrguse the option `--target=TYPE' to select the type of system they will
279b5d2086dSmrgproduce code for.
280b5d2086dSmrg
281b5d2086dSmrg   If you want to _use_ a cross compiler, that generates code for a
282b5d2086dSmrgplatform different from the build platform, you should specify the
283b5d2086dSmrg"host" platform (i.e., that on which the generated programs will
284b5d2086dSmrgeventually be run) with `--host=TYPE'.
285b5d2086dSmrg
286b5d2086dSmrgSharing Defaults
287b5d2086dSmrg================
288b5d2086dSmrg
289b5d2086dSmrg   If you want to set default values for `configure' scripts to share,
290b5d2086dSmrgyou can create a site shell script called `config.site' that gives
291b5d2086dSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292b5d2086dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293b5d2086dSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294b5d2086dSmrg`CONFIG_SITE' environment variable to the location of the site script.
295b5d2086dSmrgA warning: not all `configure' scripts look for a site script.
296b5d2086dSmrg
297b5d2086dSmrgDefining Variables
298b5d2086dSmrg==================
299b5d2086dSmrg
300b5d2086dSmrg   Variables not defined in a site shell script can be set in the
301b5d2086dSmrgenvironment passed to `configure'.  However, some packages may run
302b5d2086dSmrgconfigure again during the build, and the customized values of these
303b5d2086dSmrgvariables may be lost.  In order to avoid this problem, you should set
304b5d2086dSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305b5d2086dSmrg
306b5d2086dSmrg     ./configure CC=/usr/local2/bin/gcc
307b5d2086dSmrg
308b5d2086dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309b5d2086dSmrgoverridden in the site shell script).
310b5d2086dSmrg
311b5d2086dSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312b5d2086dSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313b5d2086dSmrg
314b5d2086dSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315b5d2086dSmrg
316b5d2086dSmrg`configure' Invocation
317b5d2086dSmrg======================
318b5d2086dSmrg
319b5d2086dSmrg   `configure' recognizes the following options to control how it
320b5d2086dSmrgoperates.
321b5d2086dSmrg
322b5d2086dSmrg`--help'
323b5d2086dSmrg`-h'
324b5d2086dSmrg     Print a summary of all of the options to `configure', and exit.
325b5d2086dSmrg
326b5d2086dSmrg`--help=short'
327b5d2086dSmrg`--help=recursive'
328b5d2086dSmrg     Print a summary of the options unique to this package's
329b5d2086dSmrg     `configure', and exit.  The `short' variant lists options used
330b5d2086dSmrg     only in the top level, while the `recursive' variant lists options
331b5d2086dSmrg     also present in any nested packages.
332b5d2086dSmrg
333b5d2086dSmrg`--version'
334b5d2086dSmrg`-V'
335b5d2086dSmrg     Print the version of Autoconf used to generate the `configure'
336b5d2086dSmrg     script, and exit.
337b5d2086dSmrg
338b5d2086dSmrg`--cache-file=FILE'
339b5d2086dSmrg     Enable the cache: use and save the results of the tests in FILE,
340b5d2086dSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341b5d2086dSmrg     disable caching.
342b5d2086dSmrg
343b5d2086dSmrg`--config-cache'
344b5d2086dSmrg`-C'
345b5d2086dSmrg     Alias for `--cache-file=config.cache'.
346b5d2086dSmrg
347b5d2086dSmrg`--quiet'
348b5d2086dSmrg`--silent'
349b5d2086dSmrg`-q'
350b5d2086dSmrg     Do not print messages saying which checks are being made.  To
351b5d2086dSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352b5d2086dSmrg     messages will still be shown).
353b5d2086dSmrg
354b5d2086dSmrg`--srcdir=DIR'
355b5d2086dSmrg     Look for the package's source code in directory DIR.  Usually
356b5d2086dSmrg     `configure' can determine that directory automatically.
357b5d2086dSmrg
358b5d2086dSmrg`--prefix=DIR'
35918eba588Smrg     Use DIR as the installation prefix.  *note Installation Names::
360b5d2086dSmrg     for more details, including other options available for fine-tuning
361b5d2086dSmrg     the installation locations.
362b5d2086dSmrg
363b5d2086dSmrg`--no-create'
364b5d2086dSmrg`-n'
365b5d2086dSmrg     Run the configure checks, but stop before creating any output
366b5d2086dSmrg     files.
367b5d2086dSmrg
368b5d2086dSmrg`configure' also accepts some other, not widely useful, options.  Run
369b5d2086dSmrg`configure --help' for more details.
370b5d2086dSmrg
371