1a5399cb1SmrgInstallation Instructions
2a5399cb1Smrg*************************
3a5399cb1Smrg
48a954913SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
58a954913SmrgInc.
6a5399cb1Smrg
78a954913Smrg   Copying and distribution of this file, with or without modification,
88a954913Smrgare permitted in any medium without royalty provided the copyright
98a954913Smrgnotice and this notice are preserved.  This file is offered as-is,
108a954913Smrgwithout warranty of any kind.
11a5399cb1Smrg
12a5399cb1SmrgBasic Installation
13a5399cb1Smrg==================
14a5399cb1Smrg
15a5399cb1Smrg   Briefly, the shell commands `./configure; make; make install' should
16a5399cb1Smrgconfigure, build, and install this package.  The following
17a5399cb1Smrgmore-detailed instructions are generic; see the `README' file for
188a954913Smrginstructions specific to this package.  Some packages provide this
198a954913Smrg`INSTALL' file but do not implement all of the features documented
208a954913Smrgbelow.  The lack of an optional feature in a given package is not
218a954913Smrgnecessarily a bug.  More recommendations for GNU packages can be found
228a954913Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23a5399cb1Smrg
24a5399cb1Smrg   The `configure' shell script attempts to guess correct values for
25a5399cb1Smrgvarious system-dependent variables used during compilation.  It uses
26a5399cb1Smrgthose values to create a `Makefile' in each directory of the package.
27a5399cb1SmrgIt may also create one or more `.h' files containing system-dependent
28a5399cb1Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29a5399cb1Smrgyou can run in the future to recreate the current configuration, and a
30a5399cb1Smrgfile `config.log' containing compiler output (useful mainly for
31a5399cb1Smrgdebugging `configure').
32a5399cb1Smrg
33a5399cb1Smrg   It can also use an optional file (typically called `config.cache'
34a5399cb1Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35a5399cb1Smrgthe results of its tests to speed up reconfiguring.  Caching is
36a5399cb1Smrgdisabled by default to prevent problems with accidental use of stale
37a5399cb1Smrgcache files.
38a5399cb1Smrg
39a5399cb1Smrg   If you need to do unusual things to compile the package, please try
40a5399cb1Smrgto figure out how `configure' could check whether to do them, and mail
41a5399cb1Smrgdiffs or instructions to the address given in the `README' so they can
42a5399cb1Smrgbe considered for the next release.  If you are using the cache, and at
43a5399cb1Smrgsome point `config.cache' contains results you don't want to keep, you
44a5399cb1Smrgmay remove or edit it.
45a5399cb1Smrg
46a5399cb1Smrg   The file `configure.ac' (or `configure.in') is used to create
47a5399cb1Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48a5399cb1Smrgyou want to change it or regenerate `configure' using a newer version
49a5399cb1Smrgof `autoconf'.
50a5399cb1Smrg
518a954913Smrg   The simplest way to compile this package is:
52a5399cb1Smrg
53a5399cb1Smrg  1. `cd' to the directory containing the package's source code and type
54a5399cb1Smrg     `./configure' to configure the package for your system.
55a5399cb1Smrg
56a5399cb1Smrg     Running `configure' might take a while.  While running, it prints
57a5399cb1Smrg     some messages telling which features it is checking for.
58a5399cb1Smrg
59a5399cb1Smrg  2. Type `make' to compile the package.
60a5399cb1Smrg
61a5399cb1Smrg  3. Optionally, type `make check' to run any self-tests that come with
628a954913Smrg     the package, generally using the just-built uninstalled binaries.
63a5399cb1Smrg
64a5399cb1Smrg  4. Type `make install' to install the programs and any data files and
658a954913Smrg     documentation.  When installing into a prefix owned by root, it is
668a954913Smrg     recommended that the package be configured and built as a regular
678a954913Smrg     user, and only the `make install' phase executed with root
688a954913Smrg     privileges.
698a954913Smrg
708a954913Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
718a954913Smrg     this time using the binaries in their final installed location.
728a954913Smrg     This target does not install anything.  Running this target as a
738a954913Smrg     regular user, particularly if the prior `make install' required
748a954913Smrg     root privileges, verifies that the installation completed
758a954913Smrg     correctly.
768a954913Smrg
778a954913Smrg  6. You can remove the program binaries and object files from the
78a5399cb1Smrg     source code directory by typing `make clean'.  To also remove the
79a5399cb1Smrg     files that `configure' created (so you can compile the package for
80a5399cb1Smrg     a different kind of computer), type `make distclean'.  There is
81a5399cb1Smrg     also a `make maintainer-clean' target, but that is intended mainly
82a5399cb1Smrg     for the package's developers.  If you use it, you may have to get
83a5399cb1Smrg     all sorts of other programs in order to regenerate files that came
84a5399cb1Smrg     with the distribution.
85a5399cb1Smrg
868a954913Smrg  7. Often, you can also type `make uninstall' to remove the installed
878a954913Smrg     files again.  In practice, not all packages have tested that
888a954913Smrg     uninstallation works correctly, even though it is required by the
898a954913Smrg     GNU Coding Standards.
908a954913Smrg
918a954913Smrg  8. Some packages, particularly those that use Automake, provide `make
928a954913Smrg     distcheck', which can by used by developers to test that all other
938a954913Smrg     targets like `make install' and `make uninstall' work correctly.
948a954913Smrg     This target is generally not run by end users.
95a5399cb1Smrg
96a5399cb1SmrgCompilers and Options
97a5399cb1Smrg=====================
98a5399cb1Smrg
99a5399cb1Smrg   Some systems require unusual options for compilation or linking that
100a5399cb1Smrgthe `configure' script does not know about.  Run `./configure --help'
101a5399cb1Smrgfor details on some of the pertinent environment variables.
102a5399cb1Smrg
103a5399cb1Smrg   You can give `configure' initial values for configuration parameters
104a5399cb1Smrgby setting variables in the command line or in the environment.  Here
105a5399cb1Smrgis an example:
106a5399cb1Smrg
107a5399cb1Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108a5399cb1Smrg
109a5399cb1Smrg   *Note Defining Variables::, for more details.
110a5399cb1Smrg
111a5399cb1SmrgCompiling For Multiple Architectures
112a5399cb1Smrg====================================
113a5399cb1Smrg
114a5399cb1Smrg   You can compile the package for more than one kind of computer at the
115a5399cb1Smrgsame time, by placing the object files for each architecture in their
116a5399cb1Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117a5399cb1Smrgdirectory where you want the object files and executables to go and run
118a5399cb1Smrgthe `configure' script.  `configure' automatically checks for the
1198a954913Smrgsource code in the directory that `configure' is in and in `..'.  This
1208a954913Smrgis known as a "VPATH" build.
121a5399cb1Smrg
122a5399cb1Smrg   With a non-GNU `make', it is safer to compile the package for one
123a5399cb1Smrgarchitecture at a time in the source code directory.  After you have
124a5399cb1Smrginstalled the package for one architecture, use `make distclean' before
125a5399cb1Smrgreconfiguring for another architecture.
126a5399cb1Smrg
127a5399cb1Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128a5399cb1Smrgexecutables that work on multiple system types--known as "fat" or
129a5399cb1Smrg"universal" binaries--by specifying multiple `-arch' options to the
130a5399cb1Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131a5399cb1Smrgthis:
132a5399cb1Smrg
133a5399cb1Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134a5399cb1Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135a5399cb1Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136a5399cb1Smrg
137a5399cb1Smrg   This is not guaranteed to produce working output in all cases, you
138a5399cb1Smrgmay have to build one architecture at a time and combine the results
139a5399cb1Smrgusing the `lipo' tool if you have problems.
140a5399cb1Smrg
141a5399cb1SmrgInstallation Names
142a5399cb1Smrg==================
143a5399cb1Smrg
144a5399cb1Smrg   By default, `make install' installs the package's commands under
145a5399cb1Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146a5399cb1Smrgcan specify an installation prefix other than `/usr/local' by giving
1478a954913Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1488a954913Smrgabsolute file name.
149a5399cb1Smrg
150a5399cb1Smrg   You can specify separate installation prefixes for
151a5399cb1Smrgarchitecture-specific files and architecture-independent files.  If you
152a5399cb1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153a5399cb1SmrgPREFIX as the prefix for installing programs and libraries.
154a5399cb1SmrgDocumentation and other data files still use the regular prefix.
155a5399cb1Smrg
156a5399cb1Smrg   In addition, if you use an unusual directory layout you can give
157a5399cb1Smrgoptions like `--bindir=DIR' to specify different values for particular
158a5399cb1Smrgkinds of files.  Run `configure --help' for a list of the directories
1598a954913Smrgyou can set and what kinds of files go in them.  In general, the
1608a954913Smrgdefault for these options is expressed in terms of `${prefix}', so that
1618a954913Smrgspecifying just `--prefix' will affect all of the other directory
1628a954913Smrgspecifications that were not explicitly provided.
1638a954913Smrg
1648a954913Smrg   The most portable way to affect installation locations is to pass the
1658a954913Smrgcorrect locations to `configure'; however, many packages provide one or
1668a954913Smrgboth of the following shortcuts of passing variable assignments to the
1678a954913Smrg`make install' command line to change installation locations without
1688a954913Smrghaving to reconfigure or recompile.
1698a954913Smrg
1708a954913Smrg   The first method involves providing an override variable for each
1718a954913Smrgaffected directory.  For example, `make install
1728a954913Smrgprefix=/alternate/directory' will choose an alternate location for all
1738a954913Smrgdirectory configuration variables that were expressed in terms of
1748a954913Smrg`${prefix}'.  Any directories that were specified during `configure',
1758a954913Smrgbut not in terms of `${prefix}', must each be overridden at install
1768a954913Smrgtime for the entire installation to be relocated.  The approach of
1778a954913Smrgmakefile variable overrides for each directory variable is required by
1788a954913Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1798a954913SmrgHowever, some platforms have known limitations with the semantics of
1808a954913Smrgshared libraries that end up requiring recompilation when using this
1818a954913Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1828a954913Smrg
1838a954913Smrg   The second method involves providing the `DESTDIR' variable.  For
1848a954913Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1858a954913Smrg`/alternate/directory' before all installation names.  The approach of
1868a954913Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1878a954913Smrgdoes not work on platforms that have drive letters.  On the other hand,
1888a954913Smrgit does better at avoiding recompilation issues, and works well even
1898a954913Smrgwhen some directory options were not specified in terms of `${prefix}'
1908a954913Smrgat `configure' time.
1918a954913Smrg
1928a954913SmrgOptional Features
1938a954913Smrg=================
194a5399cb1Smrg
195a5399cb1Smrg   If the package supports it, you can cause programs to be installed
196a5399cb1Smrgwith an extra prefix or suffix on their names by giving `configure' the
197a5399cb1Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198a5399cb1Smrg
199a5399cb1Smrg   Some packages pay attention to `--enable-FEATURE' options to
200a5399cb1Smrg`configure', where FEATURE indicates an optional part of the package.
201a5399cb1SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202a5399cb1Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203a5399cb1Smrg`README' should mention any `--enable-' and `--with-' options that the
204a5399cb1Smrgpackage recognizes.
205a5399cb1Smrg
206a5399cb1Smrg   For packages that use the X Window System, `configure' can usually
207a5399cb1Smrgfind the X include and library files automatically, but if it doesn't,
208a5399cb1Smrgyou can use the `configure' options `--x-includes=DIR' and
209a5399cb1Smrg`--x-libraries=DIR' to specify their locations.
210a5399cb1Smrg
2118a954913Smrg   Some packages offer the ability to configure how verbose the
2128a954913Smrgexecution of `make' will be.  For these packages, running `./configure
2138a954913Smrg--enable-silent-rules' sets the default to minimal output, which can be
2148a954913Smrgoverridden with `make V=1'; while running `./configure
2158a954913Smrg--disable-silent-rules' sets the default to verbose, which can be
2168a954913Smrgoverridden with `make V=0'.
2178a954913Smrg
218a5399cb1SmrgParticular systems
219a5399cb1Smrg==================
220a5399cb1Smrg
221a5399cb1Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222a5399cb1SmrgCC is not installed, it is recommended to use the following options in
223a5399cb1Smrgorder to use an ANSI C compiler:
224a5399cb1Smrg
2258a954913Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226a5399cb1Smrg
227a5399cb1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228a5399cb1Smrg
2298a954913Smrg   HP-UX `make' updates targets which have the same time stamps as
2308a954913Smrgtheir prerequisites, which makes it generally unusable when shipped
2318a954913Smrggenerated files such as `configure' are involved.  Use GNU `make'
2328a954913Smrginstead.
2338a954913Smrg
234a5399cb1Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235a5399cb1Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236a5399cb1Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237a5399cb1Smrgto try
238a5399cb1Smrg
239a5399cb1Smrg     ./configure CC="cc"
240a5399cb1Smrg
241a5399cb1Smrgand if that doesn't work, try
242a5399cb1Smrg
243a5399cb1Smrg     ./configure CC="cc -nodtk"
244a5399cb1Smrg
2458a954913Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2468a954913Smrgdirectory contains several dysfunctional programs; working variants of
2478a954913Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2488a954913Smrgin your `PATH', put it _after_ `/usr/bin'.
2498a954913Smrg
2508a954913Smrg   On Haiku, software installed for all users goes in `/boot/common',
2518a954913Smrgnot `/usr/local'.  It is recommended to use the following options:
2528a954913Smrg
2538a954913Smrg     ./configure --prefix=/boot/common
2548a954913Smrg
255a5399cb1SmrgSpecifying the System Type
256a5399cb1Smrg==========================
257a5399cb1Smrg
258a5399cb1Smrg   There may be some features `configure' cannot figure out
259a5399cb1Smrgautomatically, but needs to determine by the type of machine the package
260a5399cb1Smrgwill run on.  Usually, assuming the package is built to be run on the
261a5399cb1Smrg_same_ architectures, `configure' can figure that out, but if it prints
262a5399cb1Smrga message saying it cannot guess the machine type, give it the
263a5399cb1Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264a5399cb1Smrgtype, such as `sun4', or a canonical name which has the form:
265a5399cb1Smrg
266a5399cb1Smrg     CPU-COMPANY-SYSTEM
267a5399cb1Smrg
268a5399cb1Smrgwhere SYSTEM can have one of these forms:
269a5399cb1Smrg
2708a954913Smrg     OS
2718a954913Smrg     KERNEL-OS
272a5399cb1Smrg
273a5399cb1Smrg   See the file `config.sub' for the possible values of each field.  If
274a5399cb1Smrg`config.sub' isn't included in this package, then this package doesn't
275a5399cb1Smrgneed to know the machine type.
276a5399cb1Smrg
277a5399cb1Smrg   If you are _building_ compiler tools for cross-compiling, you should
278a5399cb1Smrguse the option `--target=TYPE' to select the type of system they will
279a5399cb1Smrgproduce code for.
280a5399cb1Smrg
281a5399cb1Smrg   If you want to _use_ a cross compiler, that generates code for a
282a5399cb1Smrgplatform different from the build platform, you should specify the
283a5399cb1Smrg"host" platform (i.e., that on which the generated programs will
284a5399cb1Smrgeventually be run) with `--host=TYPE'.
285a5399cb1Smrg
286a5399cb1SmrgSharing Defaults
287a5399cb1Smrg================
288a5399cb1Smrg
289a5399cb1Smrg   If you want to set default values for `configure' scripts to share,
290a5399cb1Smrgyou can create a site shell script called `config.site' that gives
291a5399cb1Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292a5399cb1Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293a5399cb1Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294a5399cb1Smrg`CONFIG_SITE' environment variable to the location of the site script.
295a5399cb1SmrgA warning: not all `configure' scripts look for a site script.
296a5399cb1Smrg
297a5399cb1SmrgDefining Variables
298a5399cb1Smrg==================
299a5399cb1Smrg
300a5399cb1Smrg   Variables not defined in a site shell script can be set in the
301a5399cb1Smrgenvironment passed to `configure'.  However, some packages may run
302a5399cb1Smrgconfigure again during the build, and the customized values of these
303a5399cb1Smrgvariables may be lost.  In order to avoid this problem, you should set
304a5399cb1Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305a5399cb1Smrg
306a5399cb1Smrg     ./configure CC=/usr/local2/bin/gcc
307a5399cb1Smrg
308a5399cb1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309a5399cb1Smrgoverridden in the site shell script).
310a5399cb1Smrg
311a5399cb1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312a5399cb1Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313a5399cb1Smrg
314a5399cb1Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315a5399cb1Smrg
316a5399cb1Smrg`configure' Invocation
317a5399cb1Smrg======================
318a5399cb1Smrg
319a5399cb1Smrg   `configure' recognizes the following options to control how it
320a5399cb1Smrgoperates.
321a5399cb1Smrg
322a5399cb1Smrg`--help'
323a5399cb1Smrg`-h'
324a5399cb1Smrg     Print a summary of all of the options to `configure', and exit.
325a5399cb1Smrg
326a5399cb1Smrg`--help=short'
327a5399cb1Smrg`--help=recursive'
328a5399cb1Smrg     Print a summary of the options unique to this package's
329a5399cb1Smrg     `configure', and exit.  The `short' variant lists options used
330a5399cb1Smrg     only in the top level, while the `recursive' variant lists options
331a5399cb1Smrg     also present in any nested packages.
332a5399cb1Smrg
333a5399cb1Smrg`--version'
334a5399cb1Smrg`-V'
335a5399cb1Smrg     Print the version of Autoconf used to generate the `configure'
336a5399cb1Smrg     script, and exit.
337a5399cb1Smrg
338a5399cb1Smrg`--cache-file=FILE'
339a5399cb1Smrg     Enable the cache: use and save the results of the tests in FILE,
340a5399cb1Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341a5399cb1Smrg     disable caching.
342a5399cb1Smrg
343a5399cb1Smrg`--config-cache'
344a5399cb1Smrg`-C'
345a5399cb1Smrg     Alias for `--cache-file=config.cache'.
346a5399cb1Smrg
347a5399cb1Smrg`--quiet'
348a5399cb1Smrg`--silent'
349a5399cb1Smrg`-q'
350a5399cb1Smrg     Do not print messages saying which checks are being made.  To
351a5399cb1Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352a5399cb1Smrg     messages will still be shown).
353a5399cb1Smrg
354a5399cb1Smrg`--srcdir=DIR'
355a5399cb1Smrg     Look for the package's source code in directory DIR.  Usually
356a5399cb1Smrg     `configure' can determine that directory automatically.
357a5399cb1Smrg
358a5399cb1Smrg`--prefix=DIR'
3598a954913Smrg     Use DIR as the installation prefix.  *note Installation Names::
360a5399cb1Smrg     for more details, including other options available for fine-tuning
361a5399cb1Smrg     the installation locations.
362a5399cb1Smrg
363a5399cb1Smrg`--no-create'
364a5399cb1Smrg`-n'
365a5399cb1Smrg     Run the configure checks, but stop before creating any output
366a5399cb1Smrg     files.
367a5399cb1Smrg
368a5399cb1Smrg`configure' also accepts some other, not widely useful, options.  Run
369a5399cb1Smrg`configure --help' for more details.
370a5399cb1Smrg
371