1880c7e28SmrgInstallation Instructions
2880c7e28Smrg*************************
3880c7e28Smrg
44f00d7e1SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
54f00d7e1SmrgInc.
6880c7e28Smrg
74f00d7e1Smrg   Copying and distribution of this file, with or without modification,
84f00d7e1Smrgare permitted in any medium without royalty provided the copyright
94f00d7e1Smrgnotice and this notice are preserved.  This file is offered as-is,
104f00d7e1Smrgwithout warranty of any kind.
11880c7e28Smrg
12880c7e28SmrgBasic Installation
13880c7e28Smrg==================
14880c7e28Smrg
15880c7e28Smrg   Briefly, the shell commands `./configure; make; make install' should
16880c7e28Smrgconfigure, build, and install this package.  The following
17880c7e28Smrgmore-detailed instructions are generic; see the `README' file for
184f00d7e1Smrginstructions specific to this package.  Some packages provide this
194f00d7e1Smrg`INSTALL' file but do not implement all of the features documented
204f00d7e1Smrgbelow.  The lack of an optional feature in a given package is not
214f00d7e1Smrgnecessarily a bug.  More recommendations for GNU packages can be found
224f00d7e1Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23880c7e28Smrg
24880c7e28Smrg   The `configure' shell script attempts to guess correct values for
25880c7e28Smrgvarious system-dependent variables used during compilation.  It uses
26880c7e28Smrgthose values to create a `Makefile' in each directory of the package.
27880c7e28SmrgIt may also create one or more `.h' files containing system-dependent
28880c7e28Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29880c7e28Smrgyou can run in the future to recreate the current configuration, and a
30880c7e28Smrgfile `config.log' containing compiler output (useful mainly for
31880c7e28Smrgdebugging `configure').
32880c7e28Smrg
33880c7e28Smrg   It can also use an optional file (typically called `config.cache'
34880c7e28Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35880c7e28Smrgthe results of its tests to speed up reconfiguring.  Caching is
36880c7e28Smrgdisabled by default to prevent problems with accidental use of stale
37880c7e28Smrgcache files.
38880c7e28Smrg
39880c7e28Smrg   If you need to do unusual things to compile the package, please try
40880c7e28Smrgto figure out how `configure' could check whether to do them, and mail
41880c7e28Smrgdiffs or instructions to the address given in the `README' so they can
42880c7e28Smrgbe considered for the next release.  If you are using the cache, and at
43880c7e28Smrgsome point `config.cache' contains results you don't want to keep, you
44880c7e28Smrgmay remove or edit it.
45880c7e28Smrg
46880c7e28Smrg   The file `configure.ac' (or `configure.in') is used to create
47880c7e28Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48880c7e28Smrgyou want to change it or regenerate `configure' using a newer version
49880c7e28Smrgof `autoconf'.
50880c7e28Smrg
514f00d7e1Smrg   The simplest way to compile this package is:
52880c7e28Smrg
53880c7e28Smrg  1. `cd' to the directory containing the package's source code and type
54880c7e28Smrg     `./configure' to configure the package for your system.
55880c7e28Smrg
56880c7e28Smrg     Running `configure' might take a while.  While running, it prints
57880c7e28Smrg     some messages telling which features it is checking for.
58880c7e28Smrg
59880c7e28Smrg  2. Type `make' to compile the package.
60880c7e28Smrg
61880c7e28Smrg  3. Optionally, type `make check' to run any self-tests that come with
624f00d7e1Smrg     the package, generally using the just-built uninstalled binaries.
63880c7e28Smrg
64880c7e28Smrg  4. Type `make install' to install the programs and any data files and
654f00d7e1Smrg     documentation.  When installing into a prefix owned by root, it is
664f00d7e1Smrg     recommended that the package be configured and built as a regular
674f00d7e1Smrg     user, and only the `make install' phase executed with root
684f00d7e1Smrg     privileges.
694f00d7e1Smrg
704f00d7e1Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
714f00d7e1Smrg     this time using the binaries in their final installed location.
724f00d7e1Smrg     This target does not install anything.  Running this target as a
734f00d7e1Smrg     regular user, particularly if the prior `make install' required
744f00d7e1Smrg     root privileges, verifies that the installation completed
754f00d7e1Smrg     correctly.
764f00d7e1Smrg
774f00d7e1Smrg  6. You can remove the program binaries and object files from the
78880c7e28Smrg     source code directory by typing `make clean'.  To also remove the
79880c7e28Smrg     files that `configure' created (so you can compile the package for
80880c7e28Smrg     a different kind of computer), type `make distclean'.  There is
81880c7e28Smrg     also a `make maintainer-clean' target, but that is intended mainly
82880c7e28Smrg     for the package's developers.  If you use it, you may have to get
83880c7e28Smrg     all sorts of other programs in order to regenerate files that came
84880c7e28Smrg     with the distribution.
85880c7e28Smrg
864f00d7e1Smrg  7. Often, you can also type `make uninstall' to remove the installed
874f00d7e1Smrg     files again.  In practice, not all packages have tested that
884f00d7e1Smrg     uninstallation works correctly, even though it is required by the
894f00d7e1Smrg     GNU Coding Standards.
904f00d7e1Smrg
914f00d7e1Smrg  8. Some packages, particularly those that use Automake, provide `make
924f00d7e1Smrg     distcheck', which can by used by developers to test that all other
934f00d7e1Smrg     targets like `make install' and `make uninstall' work correctly.
944f00d7e1Smrg     This target is generally not run by end users.
95880c7e28Smrg
96880c7e28SmrgCompilers and Options
97880c7e28Smrg=====================
98880c7e28Smrg
99880c7e28Smrg   Some systems require unusual options for compilation or linking that
100880c7e28Smrgthe `configure' script does not know about.  Run `./configure --help'
101880c7e28Smrgfor details on some of the pertinent environment variables.
102880c7e28Smrg
103880c7e28Smrg   You can give `configure' initial values for configuration parameters
104880c7e28Smrgby setting variables in the command line or in the environment.  Here
105880c7e28Smrgis an example:
106880c7e28Smrg
107880c7e28Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108880c7e28Smrg
109880c7e28Smrg   *Note Defining Variables::, for more details.
110880c7e28Smrg
111880c7e28SmrgCompiling For Multiple Architectures
112880c7e28Smrg====================================
113880c7e28Smrg
114880c7e28Smrg   You can compile the package for more than one kind of computer at the
115880c7e28Smrgsame time, by placing the object files for each architecture in their
116880c7e28Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117880c7e28Smrgdirectory where you want the object files and executables to go and run
118880c7e28Smrgthe `configure' script.  `configure' automatically checks for the
1194f00d7e1Smrgsource code in the directory that `configure' is in and in `..'.  This
1204f00d7e1Smrgis known as a "VPATH" build.
121880c7e28Smrg
122880c7e28Smrg   With a non-GNU `make', it is safer to compile the package for one
123880c7e28Smrgarchitecture at a time in the source code directory.  After you have
124880c7e28Smrginstalled the package for one architecture, use `make distclean' before
125880c7e28Smrgreconfiguring for another architecture.
126880c7e28Smrg
127880c7e28Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128880c7e28Smrgexecutables that work on multiple system types--known as "fat" or
129880c7e28Smrg"universal" binaries--by specifying multiple `-arch' options to the
130880c7e28Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131880c7e28Smrgthis:
132880c7e28Smrg
133880c7e28Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134880c7e28Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135880c7e28Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136880c7e28Smrg
137880c7e28Smrg   This is not guaranteed to produce working output in all cases, you
138880c7e28Smrgmay have to build one architecture at a time and combine the results
139880c7e28Smrgusing the `lipo' tool if you have problems.
140880c7e28Smrg
141880c7e28SmrgInstallation Names
142880c7e28Smrg==================
143880c7e28Smrg
144880c7e28Smrg   By default, `make install' installs the package's commands under
145880c7e28Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146880c7e28Smrgcan specify an installation prefix other than `/usr/local' by giving
1474f00d7e1Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1484f00d7e1Smrgabsolute file name.
149880c7e28Smrg
150880c7e28Smrg   You can specify separate installation prefixes for
151880c7e28Smrgarchitecture-specific files and architecture-independent files.  If you
152880c7e28Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153880c7e28SmrgPREFIX as the prefix for installing programs and libraries.
154880c7e28SmrgDocumentation and other data files still use the regular prefix.
155880c7e28Smrg
156880c7e28Smrg   In addition, if you use an unusual directory layout you can give
157880c7e28Smrgoptions like `--bindir=DIR' to specify different values for particular
158880c7e28Smrgkinds of files.  Run `configure --help' for a list of the directories
1594f00d7e1Smrgyou can set and what kinds of files go in them.  In general, the
1604f00d7e1Smrgdefault for these options is expressed in terms of `${prefix}', so that
1614f00d7e1Smrgspecifying just `--prefix' will affect all of the other directory
1624f00d7e1Smrgspecifications that were not explicitly provided.
1634f00d7e1Smrg
1644f00d7e1Smrg   The most portable way to affect installation locations is to pass the
1654f00d7e1Smrgcorrect locations to `configure'; however, many packages provide one or
1664f00d7e1Smrgboth of the following shortcuts of passing variable assignments to the
1674f00d7e1Smrg`make install' command line to change installation locations without
1684f00d7e1Smrghaving to reconfigure or recompile.
1694f00d7e1Smrg
1704f00d7e1Smrg   The first method involves providing an override variable for each
1714f00d7e1Smrgaffected directory.  For example, `make install
1724f00d7e1Smrgprefix=/alternate/directory' will choose an alternate location for all
1734f00d7e1Smrgdirectory configuration variables that were expressed in terms of
1744f00d7e1Smrg`${prefix}'.  Any directories that were specified during `configure',
1754f00d7e1Smrgbut not in terms of `${prefix}', must each be overridden at install
1764f00d7e1Smrgtime for the entire installation to be relocated.  The approach of
1774f00d7e1Smrgmakefile variable overrides for each directory variable is required by
1784f00d7e1Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1794f00d7e1SmrgHowever, some platforms have known limitations with the semantics of
1804f00d7e1Smrgshared libraries that end up requiring recompilation when using this
1814f00d7e1Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1824f00d7e1Smrg
1834f00d7e1Smrg   The second method involves providing the `DESTDIR' variable.  For
1844f00d7e1Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1854f00d7e1Smrg`/alternate/directory' before all installation names.  The approach of
1864f00d7e1Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1874f00d7e1Smrgdoes not work on platforms that have drive letters.  On the other hand,
1884f00d7e1Smrgit does better at avoiding recompilation issues, and works well even
1894f00d7e1Smrgwhen some directory options were not specified in terms of `${prefix}'
1904f00d7e1Smrgat `configure' time.
1914f00d7e1Smrg
1924f00d7e1SmrgOptional Features
1934f00d7e1Smrg=================
194880c7e28Smrg
195880c7e28Smrg   If the package supports it, you can cause programs to be installed
196880c7e28Smrgwith an extra prefix or suffix on their names by giving `configure' the
197880c7e28Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198880c7e28Smrg
199880c7e28Smrg   Some packages pay attention to `--enable-FEATURE' options to
200880c7e28Smrg`configure', where FEATURE indicates an optional part of the package.
201880c7e28SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202880c7e28Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203880c7e28Smrg`README' should mention any `--enable-' and `--with-' options that the
204880c7e28Smrgpackage recognizes.
205880c7e28Smrg
206880c7e28Smrg   For packages that use the X Window System, `configure' can usually
207880c7e28Smrgfind the X include and library files automatically, but if it doesn't,
208880c7e28Smrgyou can use the `configure' options `--x-includes=DIR' and
209880c7e28Smrg`--x-libraries=DIR' to specify their locations.
210880c7e28Smrg
2114f00d7e1Smrg   Some packages offer the ability to configure how verbose the
2124f00d7e1Smrgexecution of `make' will be.  For these packages, running `./configure
2134f00d7e1Smrg--enable-silent-rules' sets the default to minimal output, which can be
2144f00d7e1Smrgoverridden with `make V=1'; while running `./configure
2154f00d7e1Smrg--disable-silent-rules' sets the default to verbose, which can be
2164f00d7e1Smrgoverridden with `make V=0'.
2174f00d7e1Smrg
218880c7e28SmrgParticular systems
219880c7e28Smrg==================
220880c7e28Smrg
221880c7e28Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222880c7e28SmrgCC is not installed, it is recommended to use the following options in
223880c7e28Smrgorder to use an ANSI C compiler:
224880c7e28Smrg
2254f00d7e1Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226880c7e28Smrg
227880c7e28Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228880c7e28Smrg
2294f00d7e1Smrg   HP-UX `make' updates targets which have the same time stamps as
2304f00d7e1Smrgtheir prerequisites, which makes it generally unusable when shipped
2314f00d7e1Smrggenerated files such as `configure' are involved.  Use GNU `make'
2324f00d7e1Smrginstead.
2334f00d7e1Smrg
234880c7e28Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235880c7e28Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236880c7e28Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237880c7e28Smrgto try
238880c7e28Smrg
239880c7e28Smrg     ./configure CC="cc"
240880c7e28Smrg
241880c7e28Smrgand if that doesn't work, try
242880c7e28Smrg
243880c7e28Smrg     ./configure CC="cc -nodtk"
244880c7e28Smrg
2454f00d7e1Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2464f00d7e1Smrgdirectory contains several dysfunctional programs; working variants of
2474f00d7e1Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2484f00d7e1Smrgin your `PATH', put it _after_ `/usr/bin'.
2494f00d7e1Smrg
2504f00d7e1Smrg   On Haiku, software installed for all users goes in `/boot/common',
2514f00d7e1Smrgnot `/usr/local'.  It is recommended to use the following options:
2524f00d7e1Smrg
2534f00d7e1Smrg     ./configure --prefix=/boot/common
2544f00d7e1Smrg
255880c7e28SmrgSpecifying the System Type
256880c7e28Smrg==========================
257880c7e28Smrg
258880c7e28Smrg   There may be some features `configure' cannot figure out
259880c7e28Smrgautomatically, but needs to determine by the type of machine the package
260880c7e28Smrgwill run on.  Usually, assuming the package is built to be run on the
261880c7e28Smrg_same_ architectures, `configure' can figure that out, but if it prints
262880c7e28Smrga message saying it cannot guess the machine type, give it the
263880c7e28Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264880c7e28Smrgtype, such as `sun4', or a canonical name which has the form:
265880c7e28Smrg
266880c7e28Smrg     CPU-COMPANY-SYSTEM
267880c7e28Smrg
268880c7e28Smrgwhere SYSTEM can have one of these forms:
269880c7e28Smrg
2704f00d7e1Smrg     OS
2714f00d7e1Smrg     KERNEL-OS
272880c7e28Smrg
273880c7e28Smrg   See the file `config.sub' for the possible values of each field.  If
274880c7e28Smrg`config.sub' isn't included in this package, then this package doesn't
275880c7e28Smrgneed to know the machine type.
276880c7e28Smrg
277880c7e28Smrg   If you are _building_ compiler tools for cross-compiling, you should
278880c7e28Smrguse the option `--target=TYPE' to select the type of system they will
279880c7e28Smrgproduce code for.
280880c7e28Smrg
281880c7e28Smrg   If you want to _use_ a cross compiler, that generates code for a
282880c7e28Smrgplatform different from the build platform, you should specify the
283880c7e28Smrg"host" platform (i.e., that on which the generated programs will
284880c7e28Smrgeventually be run) with `--host=TYPE'.
285880c7e28Smrg
286880c7e28SmrgSharing Defaults
287880c7e28Smrg================
288880c7e28Smrg
289880c7e28Smrg   If you want to set default values for `configure' scripts to share,
290880c7e28Smrgyou can create a site shell script called `config.site' that gives
291880c7e28Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292880c7e28Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293880c7e28Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294880c7e28Smrg`CONFIG_SITE' environment variable to the location of the site script.
295880c7e28SmrgA warning: not all `configure' scripts look for a site script.
296880c7e28Smrg
297880c7e28SmrgDefining Variables
298880c7e28Smrg==================
299880c7e28Smrg
300880c7e28Smrg   Variables not defined in a site shell script can be set in the
301880c7e28Smrgenvironment passed to `configure'.  However, some packages may run
302880c7e28Smrgconfigure again during the build, and the customized values of these
303880c7e28Smrgvariables may be lost.  In order to avoid this problem, you should set
304880c7e28Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305880c7e28Smrg
306880c7e28Smrg     ./configure CC=/usr/local2/bin/gcc
307880c7e28Smrg
308880c7e28Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309880c7e28Smrgoverridden in the site shell script).
310880c7e28Smrg
311880c7e28SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312880c7e28Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313880c7e28Smrg
314880c7e28Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315880c7e28Smrg
316880c7e28Smrg`configure' Invocation
317880c7e28Smrg======================
318880c7e28Smrg
319880c7e28Smrg   `configure' recognizes the following options to control how it
320880c7e28Smrgoperates.
321880c7e28Smrg
322880c7e28Smrg`--help'
323880c7e28Smrg`-h'
324880c7e28Smrg     Print a summary of all of the options to `configure', and exit.
325880c7e28Smrg
326880c7e28Smrg`--help=short'
327880c7e28Smrg`--help=recursive'
328880c7e28Smrg     Print a summary of the options unique to this package's
329880c7e28Smrg     `configure', and exit.  The `short' variant lists options used
330880c7e28Smrg     only in the top level, while the `recursive' variant lists options
331880c7e28Smrg     also present in any nested packages.
332880c7e28Smrg
333880c7e28Smrg`--version'
334880c7e28Smrg`-V'
335880c7e28Smrg     Print the version of Autoconf used to generate the `configure'
336880c7e28Smrg     script, and exit.
337880c7e28Smrg
338880c7e28Smrg`--cache-file=FILE'
339880c7e28Smrg     Enable the cache: use and save the results of the tests in FILE,
340880c7e28Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341880c7e28Smrg     disable caching.
342880c7e28Smrg
343880c7e28Smrg`--config-cache'
344880c7e28Smrg`-C'
345880c7e28Smrg     Alias for `--cache-file=config.cache'.
346880c7e28Smrg
347880c7e28Smrg`--quiet'
348880c7e28Smrg`--silent'
349880c7e28Smrg`-q'
350880c7e28Smrg     Do not print messages saying which checks are being made.  To
351880c7e28Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352880c7e28Smrg     messages will still be shown).
353880c7e28Smrg
354880c7e28Smrg`--srcdir=DIR'
355880c7e28Smrg     Look for the package's source code in directory DIR.  Usually
356880c7e28Smrg     `configure' can determine that directory automatically.
357880c7e28Smrg
358880c7e28Smrg`--prefix=DIR'
3594f00d7e1Smrg     Use DIR as the installation prefix.  *note Installation Names::
360880c7e28Smrg     for more details, including other options available for fine-tuning
361880c7e28Smrg     the installation locations.
362880c7e28Smrg
363880c7e28Smrg`--no-create'
364880c7e28Smrg`-n'
365880c7e28Smrg     Run the configure checks, but stop before creating any output
366880c7e28Smrg     files.
367880c7e28Smrg
368880c7e28Smrg`configure' also accepts some other, not widely useful, options.  Run
369880c7e28Smrg`configure --help' for more details.
370880c7e28Smrg
371