1a7b590b3SmrgInstallation Instructions
2a7b590b3Smrg*************************
3a7b590b3Smrg
415ffece8SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
515ffece8SmrgInc.
6a7b590b3Smrg
715ffece8Smrg   Copying and distribution of this file, with or without modification,
815ffece8Smrgare permitted in any medium without royalty provided the copyright
915ffece8Smrgnotice and this notice are preserved.  This file is offered as-is,
1015ffece8Smrgwithout warranty of any kind.
11a7b590b3Smrg
12a7b590b3SmrgBasic Installation
13a7b590b3Smrg==================
14a7b590b3Smrg
15a7b590b3Smrg   Briefly, the shell commands `./configure; make; make install' should
16a7b590b3Smrgconfigure, build, and install this package.  The following
17a7b590b3Smrgmore-detailed instructions are generic; see the `README' file for
1815ffece8Smrginstructions specific to this package.  Some packages provide this
1915ffece8Smrg`INSTALL' file but do not implement all of the features documented
2015ffece8Smrgbelow.  The lack of an optional feature in a given package is not
2115ffece8Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2215ffece8Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23a7b590b3Smrg
24a7b590b3Smrg   The `configure' shell script attempts to guess correct values for
25a7b590b3Smrgvarious system-dependent variables used during compilation.  It uses
26a7b590b3Smrgthose values to create a `Makefile' in each directory of the package.
27a7b590b3SmrgIt may also create one or more `.h' files containing system-dependent
28a7b590b3Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29a7b590b3Smrgyou can run in the future to recreate the current configuration, and a
30a7b590b3Smrgfile `config.log' containing compiler output (useful mainly for
31a7b590b3Smrgdebugging `configure').
32a7b590b3Smrg
33a7b590b3Smrg   It can also use an optional file (typically called `config.cache'
34a7b590b3Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35a7b590b3Smrgthe results of its tests to speed up reconfiguring.  Caching is
36a7b590b3Smrgdisabled by default to prevent problems with accidental use of stale
37a7b590b3Smrgcache files.
38a7b590b3Smrg
39a7b590b3Smrg   If you need to do unusual things to compile the package, please try
40a7b590b3Smrgto figure out how `configure' could check whether to do them, and mail
41a7b590b3Smrgdiffs or instructions to the address given in the `README' so they can
42a7b590b3Smrgbe considered for the next release.  If you are using the cache, and at
43a7b590b3Smrgsome point `config.cache' contains results you don't want to keep, you
44a7b590b3Smrgmay remove or edit it.
45a7b590b3Smrg
46a7b590b3Smrg   The file `configure.ac' (or `configure.in') is used to create
47a7b590b3Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48a7b590b3Smrgyou want to change it or regenerate `configure' using a newer version
49a7b590b3Smrgof `autoconf'.
50a7b590b3Smrg
5115ffece8Smrg   The simplest way to compile this package is:
52a7b590b3Smrg
53a7b590b3Smrg  1. `cd' to the directory containing the package's source code and type
54a7b590b3Smrg     `./configure' to configure the package for your system.
55a7b590b3Smrg
56a7b590b3Smrg     Running `configure' might take a while.  While running, it prints
57a7b590b3Smrg     some messages telling which features it is checking for.
58a7b590b3Smrg
59a7b590b3Smrg  2. Type `make' to compile the package.
60a7b590b3Smrg
61a7b590b3Smrg  3. Optionally, type `make check' to run any self-tests that come with
6215ffece8Smrg     the package, generally using the just-built uninstalled binaries.
63a7b590b3Smrg
64a7b590b3Smrg  4. Type `make install' to install the programs and any data files and
6515ffece8Smrg     documentation.  When installing into a prefix owned by root, it is
6615ffece8Smrg     recommended that the package be configured and built as a regular
6715ffece8Smrg     user, and only the `make install' phase executed with root
6815ffece8Smrg     privileges.
6915ffece8Smrg
7015ffece8Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7115ffece8Smrg     this time using the binaries in their final installed location.
7215ffece8Smrg     This target does not install anything.  Running this target as a
7315ffece8Smrg     regular user, particularly if the prior `make install' required
7415ffece8Smrg     root privileges, verifies that the installation completed
7515ffece8Smrg     correctly.
7615ffece8Smrg
7715ffece8Smrg  6. You can remove the program binaries and object files from the
78a7b590b3Smrg     source code directory by typing `make clean'.  To also remove the
79a7b590b3Smrg     files that `configure' created (so you can compile the package for
80a7b590b3Smrg     a different kind of computer), type `make distclean'.  There is
81a7b590b3Smrg     also a `make maintainer-clean' target, but that is intended mainly
82a7b590b3Smrg     for the package's developers.  If you use it, you may have to get
83a7b590b3Smrg     all sorts of other programs in order to regenerate files that came
84a7b590b3Smrg     with the distribution.
85a7b590b3Smrg
8615ffece8Smrg  7. Often, you can also type `make uninstall' to remove the installed
8715ffece8Smrg     files again.  In practice, not all packages have tested that
8815ffece8Smrg     uninstallation works correctly, even though it is required by the
8915ffece8Smrg     GNU Coding Standards.
9015ffece8Smrg
9115ffece8Smrg  8. Some packages, particularly those that use Automake, provide `make
9215ffece8Smrg     distcheck', which can by used by developers to test that all other
9315ffece8Smrg     targets like `make install' and `make uninstall' work correctly.
9415ffece8Smrg     This target is generally not run by end users.
95a7b590b3Smrg
96a7b590b3SmrgCompilers and Options
97a7b590b3Smrg=====================
98a7b590b3Smrg
99a7b590b3Smrg   Some systems require unusual options for compilation or linking that
100a7b590b3Smrgthe `configure' script does not know about.  Run `./configure --help'
101a7b590b3Smrgfor details on some of the pertinent environment variables.
102a7b590b3Smrg
103a7b590b3Smrg   You can give `configure' initial values for configuration parameters
104a7b590b3Smrgby setting variables in the command line or in the environment.  Here
105a7b590b3Smrgis an example:
106a7b590b3Smrg
107a7b590b3Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108a7b590b3Smrg
109a7b590b3Smrg   *Note Defining Variables::, for more details.
110a7b590b3Smrg
111a7b590b3SmrgCompiling For Multiple Architectures
112a7b590b3Smrg====================================
113a7b590b3Smrg
114a7b590b3Smrg   You can compile the package for more than one kind of computer at the
115a7b590b3Smrgsame time, by placing the object files for each architecture in their
116a7b590b3Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117a7b590b3Smrgdirectory where you want the object files and executables to go and run
118a7b590b3Smrgthe `configure' script.  `configure' automatically checks for the
11915ffece8Smrgsource code in the directory that `configure' is in and in `..'.  This
12015ffece8Smrgis known as a "VPATH" build.
121a7b590b3Smrg
122a7b590b3Smrg   With a non-GNU `make', it is safer to compile the package for one
123a7b590b3Smrgarchitecture at a time in the source code directory.  After you have
124a7b590b3Smrginstalled the package for one architecture, use `make distclean' before
125a7b590b3Smrgreconfiguring for another architecture.
126a7b590b3Smrg
127a7b590b3Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128a7b590b3Smrgexecutables that work on multiple system types--known as "fat" or
129a7b590b3Smrg"universal" binaries--by specifying multiple `-arch' options to the
130a7b590b3Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131a7b590b3Smrgthis:
132a7b590b3Smrg
133a7b590b3Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134a7b590b3Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135a7b590b3Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136a7b590b3Smrg
137a7b590b3Smrg   This is not guaranteed to produce working output in all cases, you
138a7b590b3Smrgmay have to build one architecture at a time and combine the results
139a7b590b3Smrgusing the `lipo' tool if you have problems.
140a7b590b3Smrg
141a7b590b3SmrgInstallation Names
142a7b590b3Smrg==================
143a7b590b3Smrg
144a7b590b3Smrg   By default, `make install' installs the package's commands under
145a7b590b3Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146a7b590b3Smrgcan specify an installation prefix other than `/usr/local' by giving
14715ffece8Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14815ffece8Smrgabsolute file name.
149a7b590b3Smrg
150a7b590b3Smrg   You can specify separate installation prefixes for
151a7b590b3Smrgarchitecture-specific files and architecture-independent files.  If you
152a7b590b3Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153a7b590b3SmrgPREFIX as the prefix for installing programs and libraries.
154a7b590b3SmrgDocumentation and other data files still use the regular prefix.
155a7b590b3Smrg
156a7b590b3Smrg   In addition, if you use an unusual directory layout you can give
157a7b590b3Smrgoptions like `--bindir=DIR' to specify different values for particular
158a7b590b3Smrgkinds of files.  Run `configure --help' for a list of the directories
15915ffece8Smrgyou can set and what kinds of files go in them.  In general, the
16015ffece8Smrgdefault for these options is expressed in terms of `${prefix}', so that
16115ffece8Smrgspecifying just `--prefix' will affect all of the other directory
16215ffece8Smrgspecifications that were not explicitly provided.
16315ffece8Smrg
16415ffece8Smrg   The most portable way to affect installation locations is to pass the
16515ffece8Smrgcorrect locations to `configure'; however, many packages provide one or
16615ffece8Smrgboth of the following shortcuts of passing variable assignments to the
16715ffece8Smrg`make install' command line to change installation locations without
16815ffece8Smrghaving to reconfigure or recompile.
16915ffece8Smrg
17015ffece8Smrg   The first method involves providing an override variable for each
17115ffece8Smrgaffected directory.  For example, `make install
17215ffece8Smrgprefix=/alternate/directory' will choose an alternate location for all
17315ffece8Smrgdirectory configuration variables that were expressed in terms of
17415ffece8Smrg`${prefix}'.  Any directories that were specified during `configure',
17515ffece8Smrgbut not in terms of `${prefix}', must each be overridden at install
17615ffece8Smrgtime for the entire installation to be relocated.  The approach of
17715ffece8Smrgmakefile variable overrides for each directory variable is required by
17815ffece8Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17915ffece8SmrgHowever, some platforms have known limitations with the semantics of
18015ffece8Smrgshared libraries that end up requiring recompilation when using this
18115ffece8Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18215ffece8Smrg
18315ffece8Smrg   The second method involves providing the `DESTDIR' variable.  For
18415ffece8Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18515ffece8Smrg`/alternate/directory' before all installation names.  The approach of
18615ffece8Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18715ffece8Smrgdoes not work on platforms that have drive letters.  On the other hand,
18815ffece8Smrgit does better at avoiding recompilation issues, and works well even
18915ffece8Smrgwhen some directory options were not specified in terms of `${prefix}'
19015ffece8Smrgat `configure' time.
19115ffece8Smrg
19215ffece8SmrgOptional Features
19315ffece8Smrg=================
194a7b590b3Smrg
195a7b590b3Smrg   If the package supports it, you can cause programs to be installed
196a7b590b3Smrgwith an extra prefix or suffix on their names by giving `configure' the
197a7b590b3Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198a7b590b3Smrg
199a7b590b3Smrg   Some packages pay attention to `--enable-FEATURE' options to
200a7b590b3Smrg`configure', where FEATURE indicates an optional part of the package.
201a7b590b3SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202a7b590b3Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203a7b590b3Smrg`README' should mention any `--enable-' and `--with-' options that the
204a7b590b3Smrgpackage recognizes.
205a7b590b3Smrg
206a7b590b3Smrg   For packages that use the X Window System, `configure' can usually
207a7b590b3Smrgfind the X include and library files automatically, but if it doesn't,
208a7b590b3Smrgyou can use the `configure' options `--x-includes=DIR' and
209a7b590b3Smrg`--x-libraries=DIR' to specify their locations.
210a7b590b3Smrg
21115ffece8Smrg   Some packages offer the ability to configure how verbose the
21215ffece8Smrgexecution of `make' will be.  For these packages, running `./configure
21315ffece8Smrg--enable-silent-rules' sets the default to minimal output, which can be
21415ffece8Smrgoverridden with `make V=1'; while running `./configure
21515ffece8Smrg--disable-silent-rules' sets the default to verbose, which can be
21615ffece8Smrgoverridden with `make V=0'.
21715ffece8Smrg
218a7b590b3SmrgParticular systems
219a7b590b3Smrg==================
220a7b590b3Smrg
221a7b590b3Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222a7b590b3SmrgCC is not installed, it is recommended to use the following options in
223a7b590b3Smrgorder to use an ANSI C compiler:
224a7b590b3Smrg
22515ffece8Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226a7b590b3Smrg
227a7b590b3Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228a7b590b3Smrg
22915ffece8Smrg   HP-UX `make' updates targets which have the same time stamps as
23015ffece8Smrgtheir prerequisites, which makes it generally unusable when shipped
23115ffece8Smrggenerated files such as `configure' are involved.  Use GNU `make'
23215ffece8Smrginstead.
23315ffece8Smrg
234a7b590b3Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235a7b590b3Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236a7b590b3Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237a7b590b3Smrgto try
238a7b590b3Smrg
239a7b590b3Smrg     ./configure CC="cc"
240a7b590b3Smrg
241a7b590b3Smrgand if that doesn't work, try
242a7b590b3Smrg
243a7b590b3Smrg     ./configure CC="cc -nodtk"
244a7b590b3Smrg
24515ffece8Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24615ffece8Smrgdirectory contains several dysfunctional programs; working variants of
24715ffece8Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24815ffece8Smrgin your `PATH', put it _after_ `/usr/bin'.
24915ffece8Smrg
25015ffece8Smrg   On Haiku, software installed for all users goes in `/boot/common',
25115ffece8Smrgnot `/usr/local'.  It is recommended to use the following options:
25215ffece8Smrg
25315ffece8Smrg     ./configure --prefix=/boot/common
25415ffece8Smrg
255a7b590b3SmrgSpecifying the System Type
256a7b590b3Smrg==========================
257a7b590b3Smrg
258a7b590b3Smrg   There may be some features `configure' cannot figure out
259a7b590b3Smrgautomatically, but needs to determine by the type of machine the package
260a7b590b3Smrgwill run on.  Usually, assuming the package is built to be run on the
261a7b590b3Smrg_same_ architectures, `configure' can figure that out, but if it prints
262a7b590b3Smrga message saying it cannot guess the machine type, give it the
263a7b590b3Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264a7b590b3Smrgtype, such as `sun4', or a canonical name which has the form:
265a7b590b3Smrg
266a7b590b3Smrg     CPU-COMPANY-SYSTEM
267a7b590b3Smrg
268a7b590b3Smrgwhere SYSTEM can have one of these forms:
269a7b590b3Smrg
27015ffece8Smrg     OS
27115ffece8Smrg     KERNEL-OS
272a7b590b3Smrg
273a7b590b3Smrg   See the file `config.sub' for the possible values of each field.  If
274a7b590b3Smrg`config.sub' isn't included in this package, then this package doesn't
275a7b590b3Smrgneed to know the machine type.
276a7b590b3Smrg
277a7b590b3Smrg   If you are _building_ compiler tools for cross-compiling, you should
278a7b590b3Smrguse the option `--target=TYPE' to select the type of system they will
279a7b590b3Smrgproduce code for.
280a7b590b3Smrg
281a7b590b3Smrg   If you want to _use_ a cross compiler, that generates code for a
282a7b590b3Smrgplatform different from the build platform, you should specify the
283a7b590b3Smrg"host" platform (i.e., that on which the generated programs will
284a7b590b3Smrgeventually be run) with `--host=TYPE'.
285a7b590b3Smrg
286a7b590b3SmrgSharing Defaults
287a7b590b3Smrg================
288a7b590b3Smrg
289a7b590b3Smrg   If you want to set default values for `configure' scripts to share,
290a7b590b3Smrgyou can create a site shell script called `config.site' that gives
291a7b590b3Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292a7b590b3Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293a7b590b3Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294a7b590b3Smrg`CONFIG_SITE' environment variable to the location of the site script.
295a7b590b3SmrgA warning: not all `configure' scripts look for a site script.
296a7b590b3Smrg
297a7b590b3SmrgDefining Variables
298a7b590b3Smrg==================
299a7b590b3Smrg
300a7b590b3Smrg   Variables not defined in a site shell script can be set in the
301a7b590b3Smrgenvironment passed to `configure'.  However, some packages may run
302a7b590b3Smrgconfigure again during the build, and the customized values of these
303a7b590b3Smrgvariables may be lost.  In order to avoid this problem, you should set
304a7b590b3Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305a7b590b3Smrg
306a7b590b3Smrg     ./configure CC=/usr/local2/bin/gcc
307a7b590b3Smrg
308a7b590b3Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309a7b590b3Smrgoverridden in the site shell script).
310a7b590b3Smrg
311a7b590b3SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312a7b590b3Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313a7b590b3Smrg
314a7b590b3Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315a7b590b3Smrg
316a7b590b3Smrg`configure' Invocation
317a7b590b3Smrg======================
318a7b590b3Smrg
319a7b590b3Smrg   `configure' recognizes the following options to control how it
320a7b590b3Smrgoperates.
321a7b590b3Smrg
322a7b590b3Smrg`--help'
323a7b590b3Smrg`-h'
324a7b590b3Smrg     Print a summary of all of the options to `configure', and exit.
325a7b590b3Smrg
326a7b590b3Smrg`--help=short'
327a7b590b3Smrg`--help=recursive'
328a7b590b3Smrg     Print a summary of the options unique to this package's
329a7b590b3Smrg     `configure', and exit.  The `short' variant lists options used
330a7b590b3Smrg     only in the top level, while the `recursive' variant lists options
331a7b590b3Smrg     also present in any nested packages.
332a7b590b3Smrg
333a7b590b3Smrg`--version'
334a7b590b3Smrg`-V'
335a7b590b3Smrg     Print the version of Autoconf used to generate the `configure'
336a7b590b3Smrg     script, and exit.
337a7b590b3Smrg
338a7b590b3Smrg`--cache-file=FILE'
339a7b590b3Smrg     Enable the cache: use and save the results of the tests in FILE,
340a7b590b3Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341a7b590b3Smrg     disable caching.
342a7b590b3Smrg
343a7b590b3Smrg`--config-cache'
344a7b590b3Smrg`-C'
345a7b590b3Smrg     Alias for `--cache-file=config.cache'.
346a7b590b3Smrg
347a7b590b3Smrg`--quiet'
348a7b590b3Smrg`--silent'
349a7b590b3Smrg`-q'
350a7b590b3Smrg     Do not print messages saying which checks are being made.  To
351a7b590b3Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352a7b590b3Smrg     messages will still be shown).
353a7b590b3Smrg
354a7b590b3Smrg`--srcdir=DIR'
355a7b590b3Smrg     Look for the package's source code in directory DIR.  Usually
356a7b590b3Smrg     `configure' can determine that directory automatically.
357a7b590b3Smrg
358a7b590b3Smrg`--prefix=DIR'
35915ffece8Smrg     Use DIR as the installation prefix.  *note Installation Names::
360a7b590b3Smrg     for more details, including other options available for fine-tuning
361a7b590b3Smrg     the installation locations.
362a7b590b3Smrg
363a7b590b3Smrg`--no-create'
364a7b590b3Smrg`-n'
365a7b590b3Smrg     Run the configure checks, but stop before creating any output
366a7b590b3Smrg     files.
367a7b590b3Smrg
368a7b590b3Smrg`configure' also accepts some other, not widely useful, options.  Run
369a7b590b3Smrg`configure --help' for more details.
370a7b590b3Smrg
371