1e531b1a7SmrgInstallation Instructions
2e531b1a7Smrg*************************
3e531b1a7Smrg
43e999d35SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
53e999d35SmrgInc.
6e531b1a7Smrg
73e999d35Smrg   Copying and distribution of this file, with or without modification,
83e999d35Smrgare permitted in any medium without royalty provided the copyright
93e999d35Smrgnotice and this notice are preserved.  This file is offered as-is,
103e999d35Smrgwithout warranty of any kind.
11e531b1a7Smrg
12e531b1a7SmrgBasic Installation
13e531b1a7Smrg==================
14e531b1a7Smrg
15e531b1a7Smrg   Briefly, the shell commands `./configure; make; make install' should
16e531b1a7Smrgconfigure, build, and install this package.  The following
17e531b1a7Smrgmore-detailed instructions are generic; see the `README' file for
183e999d35Smrginstructions specific to this package.  Some packages provide this
193e999d35Smrg`INSTALL' file but do not implement all of the features documented
203e999d35Smrgbelow.  The lack of an optional feature in a given package is not
213e999d35Smrgnecessarily a bug.  More recommendations for GNU packages can be found
223e999d35Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23e531b1a7Smrg
24e531b1a7Smrg   The `configure' shell script attempts to guess correct values for
25e531b1a7Smrgvarious system-dependent variables used during compilation.  It uses
26e531b1a7Smrgthose values to create a `Makefile' in each directory of the package.
27e531b1a7SmrgIt may also create one or more `.h' files containing system-dependent
28e531b1a7Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29e531b1a7Smrgyou can run in the future to recreate the current configuration, and a
30e531b1a7Smrgfile `config.log' containing compiler output (useful mainly for
31e531b1a7Smrgdebugging `configure').
32e531b1a7Smrg
33e531b1a7Smrg   It can also use an optional file (typically called `config.cache'
34e531b1a7Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35e531b1a7Smrgthe results of its tests to speed up reconfiguring.  Caching is
36e531b1a7Smrgdisabled by default to prevent problems with accidental use of stale
37e531b1a7Smrgcache files.
38e531b1a7Smrg
39e531b1a7Smrg   If you need to do unusual things to compile the package, please try
40e531b1a7Smrgto figure out how `configure' could check whether to do them, and mail
41e531b1a7Smrgdiffs or instructions to the address given in the `README' so they can
42e531b1a7Smrgbe considered for the next release.  If you are using the cache, and at
43e531b1a7Smrgsome point `config.cache' contains results you don't want to keep, you
44e531b1a7Smrgmay remove or edit it.
45e531b1a7Smrg
46e531b1a7Smrg   The file `configure.ac' (or `configure.in') is used to create
47e531b1a7Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48e531b1a7Smrgyou want to change it or regenerate `configure' using a newer version
49e531b1a7Smrgof `autoconf'.
50e531b1a7Smrg
513e999d35Smrg   The simplest way to compile this package is:
52e531b1a7Smrg
53e531b1a7Smrg  1. `cd' to the directory containing the package's source code and type
54e531b1a7Smrg     `./configure' to configure the package for your system.
55e531b1a7Smrg
56e531b1a7Smrg     Running `configure' might take a while.  While running, it prints
57e531b1a7Smrg     some messages telling which features it is checking for.
58e531b1a7Smrg
59e531b1a7Smrg  2. Type `make' to compile the package.
60e531b1a7Smrg
61e531b1a7Smrg  3. Optionally, type `make check' to run any self-tests that come with
623e999d35Smrg     the package, generally using the just-built uninstalled binaries.
63e531b1a7Smrg
64e531b1a7Smrg  4. Type `make install' to install the programs and any data files and
653e999d35Smrg     documentation.  When installing into a prefix owned by root, it is
663e999d35Smrg     recommended that the package be configured and built as a regular
673e999d35Smrg     user, and only the `make install' phase executed with root
683e999d35Smrg     privileges.
693e999d35Smrg
703e999d35Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
713e999d35Smrg     this time using the binaries in their final installed location.
723e999d35Smrg     This target does not install anything.  Running this target as a
733e999d35Smrg     regular user, particularly if the prior `make install' required
743e999d35Smrg     root privileges, verifies that the installation completed
753e999d35Smrg     correctly.
763e999d35Smrg
773e999d35Smrg  6. You can remove the program binaries and object files from the
78e531b1a7Smrg     source code directory by typing `make clean'.  To also remove the
79e531b1a7Smrg     files that `configure' created (so you can compile the package for
80e531b1a7Smrg     a different kind of computer), type `make distclean'.  There is
81e531b1a7Smrg     also a `make maintainer-clean' target, but that is intended mainly
82e531b1a7Smrg     for the package's developers.  If you use it, you may have to get
83e531b1a7Smrg     all sorts of other programs in order to regenerate files that came
84e531b1a7Smrg     with the distribution.
85e531b1a7Smrg
863e999d35Smrg  7. Often, you can also type `make uninstall' to remove the installed
873e999d35Smrg     files again.  In practice, not all packages have tested that
883e999d35Smrg     uninstallation works correctly, even though it is required by the
893e999d35Smrg     GNU Coding Standards.
903e999d35Smrg
913e999d35Smrg  8. Some packages, particularly those that use Automake, provide `make
923e999d35Smrg     distcheck', which can by used by developers to test that all other
933e999d35Smrg     targets like `make install' and `make uninstall' work correctly.
943e999d35Smrg     This target is generally not run by end users.
95e531b1a7Smrg
96e531b1a7SmrgCompilers and Options
97e531b1a7Smrg=====================
98e531b1a7Smrg
99e531b1a7Smrg   Some systems require unusual options for compilation or linking that
100e531b1a7Smrgthe `configure' script does not know about.  Run `./configure --help'
101e531b1a7Smrgfor details on some of the pertinent environment variables.
102e531b1a7Smrg
103e531b1a7Smrg   You can give `configure' initial values for configuration parameters
104e531b1a7Smrgby setting variables in the command line or in the environment.  Here
105e531b1a7Smrgis an example:
106e531b1a7Smrg
107e531b1a7Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108e531b1a7Smrg
109e531b1a7Smrg   *Note Defining Variables::, for more details.
110e531b1a7Smrg
111e531b1a7SmrgCompiling For Multiple Architectures
112e531b1a7Smrg====================================
113e531b1a7Smrg
114e531b1a7Smrg   You can compile the package for more than one kind of computer at the
115e531b1a7Smrgsame time, by placing the object files for each architecture in their
116e531b1a7Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117e531b1a7Smrgdirectory where you want the object files and executables to go and run
118e531b1a7Smrgthe `configure' script.  `configure' automatically checks for the
1193e999d35Smrgsource code in the directory that `configure' is in and in `..'.  This
1203e999d35Smrgis known as a "VPATH" build.
121e531b1a7Smrg
122e531b1a7Smrg   With a non-GNU `make', it is safer to compile the package for one
123e531b1a7Smrgarchitecture at a time in the source code directory.  After you have
124e531b1a7Smrginstalled the package for one architecture, use `make distclean' before
125e531b1a7Smrgreconfiguring for another architecture.
126e531b1a7Smrg
127e531b1a7Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128e531b1a7Smrgexecutables that work on multiple system types--known as "fat" or
129e531b1a7Smrg"universal" binaries--by specifying multiple `-arch' options to the
130e531b1a7Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131e531b1a7Smrgthis:
132e531b1a7Smrg
133e531b1a7Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134e531b1a7Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135e531b1a7Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136e531b1a7Smrg
137e531b1a7Smrg   This is not guaranteed to produce working output in all cases, you
138e531b1a7Smrgmay have to build one architecture at a time and combine the results
139e531b1a7Smrgusing the `lipo' tool if you have problems.
140e531b1a7Smrg
141e531b1a7SmrgInstallation Names
142e531b1a7Smrg==================
143e531b1a7Smrg
144e531b1a7Smrg   By default, `make install' installs the package's commands under
145e531b1a7Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146e531b1a7Smrgcan specify an installation prefix other than `/usr/local' by giving
1473e999d35Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1483e999d35Smrgabsolute file name.
149e531b1a7Smrg
150e531b1a7Smrg   You can specify separate installation prefixes for
151e531b1a7Smrgarchitecture-specific files and architecture-independent files.  If you
152e531b1a7Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153e531b1a7SmrgPREFIX as the prefix for installing programs and libraries.
154e531b1a7SmrgDocumentation and other data files still use the regular prefix.
155e531b1a7Smrg
156e531b1a7Smrg   In addition, if you use an unusual directory layout you can give
157e531b1a7Smrgoptions like `--bindir=DIR' to specify different values for particular
158e531b1a7Smrgkinds of files.  Run `configure --help' for a list of the directories
1593e999d35Smrgyou can set and what kinds of files go in them.  In general, the
1603e999d35Smrgdefault for these options is expressed in terms of `${prefix}', so that
1613e999d35Smrgspecifying just `--prefix' will affect all of the other directory
1623e999d35Smrgspecifications that were not explicitly provided.
1633e999d35Smrg
1643e999d35Smrg   The most portable way to affect installation locations is to pass the
1653e999d35Smrgcorrect locations to `configure'; however, many packages provide one or
1663e999d35Smrgboth of the following shortcuts of passing variable assignments to the
1673e999d35Smrg`make install' command line to change installation locations without
1683e999d35Smrghaving to reconfigure or recompile.
1693e999d35Smrg
1703e999d35Smrg   The first method involves providing an override variable for each
1713e999d35Smrgaffected directory.  For example, `make install
1723e999d35Smrgprefix=/alternate/directory' will choose an alternate location for all
1733e999d35Smrgdirectory configuration variables that were expressed in terms of
1743e999d35Smrg`${prefix}'.  Any directories that were specified during `configure',
1753e999d35Smrgbut not in terms of `${prefix}', must each be overridden at install
1763e999d35Smrgtime for the entire installation to be relocated.  The approach of
1773e999d35Smrgmakefile variable overrides for each directory variable is required by
1783e999d35Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1793e999d35SmrgHowever, some platforms have known limitations with the semantics of
1803e999d35Smrgshared libraries that end up requiring recompilation when using this
1813e999d35Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1823e999d35Smrg
1833e999d35Smrg   The second method involves providing the `DESTDIR' variable.  For
1843e999d35Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1853e999d35Smrg`/alternate/directory' before all installation names.  The approach of
1863e999d35Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1873e999d35Smrgdoes not work on platforms that have drive letters.  On the other hand,
1883e999d35Smrgit does better at avoiding recompilation issues, and works well even
1893e999d35Smrgwhen some directory options were not specified in terms of `${prefix}'
1903e999d35Smrgat `configure' time.
1913e999d35Smrg
1923e999d35SmrgOptional Features
1933e999d35Smrg=================
194e531b1a7Smrg
195e531b1a7Smrg   If the package supports it, you can cause programs to be installed
196e531b1a7Smrgwith an extra prefix or suffix on their names by giving `configure' the
197e531b1a7Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198e531b1a7Smrg
199e531b1a7Smrg   Some packages pay attention to `--enable-FEATURE' options to
200e531b1a7Smrg`configure', where FEATURE indicates an optional part of the package.
201e531b1a7SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202e531b1a7Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203e531b1a7Smrg`README' should mention any `--enable-' and `--with-' options that the
204e531b1a7Smrgpackage recognizes.
205e531b1a7Smrg
206e531b1a7Smrg   For packages that use the X Window System, `configure' can usually
207e531b1a7Smrgfind the X include and library files automatically, but if it doesn't,
208e531b1a7Smrgyou can use the `configure' options `--x-includes=DIR' and
209e531b1a7Smrg`--x-libraries=DIR' to specify their locations.
210e531b1a7Smrg
2113e999d35Smrg   Some packages offer the ability to configure how verbose the
2123e999d35Smrgexecution of `make' will be.  For these packages, running `./configure
2133e999d35Smrg--enable-silent-rules' sets the default to minimal output, which can be
2143e999d35Smrgoverridden with `make V=1'; while running `./configure
2153e999d35Smrg--disable-silent-rules' sets the default to verbose, which can be
2163e999d35Smrgoverridden with `make V=0'.
2173e999d35Smrg
218e531b1a7SmrgParticular systems
219e531b1a7Smrg==================
220e531b1a7Smrg
221e531b1a7Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222e531b1a7SmrgCC is not installed, it is recommended to use the following options in
223e531b1a7Smrgorder to use an ANSI C compiler:
224e531b1a7Smrg
2253e999d35Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226e531b1a7Smrg
227e531b1a7Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228e531b1a7Smrg
2293e999d35Smrg   HP-UX `make' updates targets which have the same time stamps as
2303e999d35Smrgtheir prerequisites, which makes it generally unusable when shipped
2313e999d35Smrggenerated files such as `configure' are involved.  Use GNU `make'
2323e999d35Smrginstead.
2333e999d35Smrg
234e531b1a7Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235e531b1a7Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236e531b1a7Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237e531b1a7Smrgto try
238e531b1a7Smrg
239e531b1a7Smrg     ./configure CC="cc"
240e531b1a7Smrg
241e531b1a7Smrgand if that doesn't work, try
242e531b1a7Smrg
243e531b1a7Smrg     ./configure CC="cc -nodtk"
244e531b1a7Smrg
2453e999d35Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2463e999d35Smrgdirectory contains several dysfunctional programs; working variants of
2473e999d35Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2483e999d35Smrgin your `PATH', put it _after_ `/usr/bin'.
2493e999d35Smrg
2503e999d35Smrg   On Haiku, software installed for all users goes in `/boot/common',
2513e999d35Smrgnot `/usr/local'.  It is recommended to use the following options:
2523e999d35Smrg
2533e999d35Smrg     ./configure --prefix=/boot/common
2543e999d35Smrg
255e531b1a7SmrgSpecifying the System Type
256e531b1a7Smrg==========================
257e531b1a7Smrg
258e531b1a7Smrg   There may be some features `configure' cannot figure out
259e531b1a7Smrgautomatically, but needs to determine by the type of machine the package
260e531b1a7Smrgwill run on.  Usually, assuming the package is built to be run on the
261e531b1a7Smrg_same_ architectures, `configure' can figure that out, but if it prints
262e531b1a7Smrga message saying it cannot guess the machine type, give it the
263e531b1a7Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264e531b1a7Smrgtype, such as `sun4', or a canonical name which has the form:
265e531b1a7Smrg
266e531b1a7Smrg     CPU-COMPANY-SYSTEM
267e531b1a7Smrg
268e531b1a7Smrgwhere SYSTEM can have one of these forms:
269e531b1a7Smrg
2703e999d35Smrg     OS
2713e999d35Smrg     KERNEL-OS
272e531b1a7Smrg
273e531b1a7Smrg   See the file `config.sub' for the possible values of each field.  If
274e531b1a7Smrg`config.sub' isn't included in this package, then this package doesn't
275e531b1a7Smrgneed to know the machine type.
276e531b1a7Smrg
277e531b1a7Smrg   If you are _building_ compiler tools for cross-compiling, you should
278e531b1a7Smrguse the option `--target=TYPE' to select the type of system they will
279e531b1a7Smrgproduce code for.
280e531b1a7Smrg
281e531b1a7Smrg   If you want to _use_ a cross compiler, that generates code for a
282e531b1a7Smrgplatform different from the build platform, you should specify the
283e531b1a7Smrg"host" platform (i.e., that on which the generated programs will
284e531b1a7Smrgeventually be run) with `--host=TYPE'.
285e531b1a7Smrg
286e531b1a7SmrgSharing Defaults
287e531b1a7Smrg================
288e531b1a7Smrg
289e531b1a7Smrg   If you want to set default values for `configure' scripts to share,
290e531b1a7Smrgyou can create a site shell script called `config.site' that gives
291e531b1a7Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292e531b1a7Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293e531b1a7Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294e531b1a7Smrg`CONFIG_SITE' environment variable to the location of the site script.
295e531b1a7SmrgA warning: not all `configure' scripts look for a site script.
296e531b1a7Smrg
297e531b1a7SmrgDefining Variables
298e531b1a7Smrg==================
299e531b1a7Smrg
300e531b1a7Smrg   Variables not defined in a site shell script can be set in the
301e531b1a7Smrgenvironment passed to `configure'.  However, some packages may run
302e531b1a7Smrgconfigure again during the build, and the customized values of these
303e531b1a7Smrgvariables may be lost.  In order to avoid this problem, you should set
304e531b1a7Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305e531b1a7Smrg
306e531b1a7Smrg     ./configure CC=/usr/local2/bin/gcc
307e531b1a7Smrg
308e531b1a7Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309e531b1a7Smrgoverridden in the site shell script).
310e531b1a7Smrg
311e531b1a7SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312e531b1a7Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313e531b1a7Smrg
314e531b1a7Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315e531b1a7Smrg
316e531b1a7Smrg`configure' Invocation
317e531b1a7Smrg======================
318e531b1a7Smrg
319e531b1a7Smrg   `configure' recognizes the following options to control how it
320e531b1a7Smrgoperates.
321e531b1a7Smrg
322e531b1a7Smrg`--help'
323e531b1a7Smrg`-h'
324e531b1a7Smrg     Print a summary of all of the options to `configure', and exit.
325e531b1a7Smrg
326e531b1a7Smrg`--help=short'
327e531b1a7Smrg`--help=recursive'
328e531b1a7Smrg     Print a summary of the options unique to this package's
329e531b1a7Smrg     `configure', and exit.  The `short' variant lists options used
330e531b1a7Smrg     only in the top level, while the `recursive' variant lists options
331e531b1a7Smrg     also present in any nested packages.
332e531b1a7Smrg
333e531b1a7Smrg`--version'
334e531b1a7Smrg`-V'
335e531b1a7Smrg     Print the version of Autoconf used to generate the `configure'
336e531b1a7Smrg     script, and exit.
337e531b1a7Smrg
338e531b1a7Smrg`--cache-file=FILE'
339e531b1a7Smrg     Enable the cache: use and save the results of the tests in FILE,
340e531b1a7Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341e531b1a7Smrg     disable caching.
342e531b1a7Smrg
343e531b1a7Smrg`--config-cache'
344e531b1a7Smrg`-C'
345e531b1a7Smrg     Alias for `--cache-file=config.cache'.
346e531b1a7Smrg
347e531b1a7Smrg`--quiet'
348e531b1a7Smrg`--silent'
349e531b1a7Smrg`-q'
350e531b1a7Smrg     Do not print messages saying which checks are being made.  To
351e531b1a7Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352e531b1a7Smrg     messages will still be shown).
353e531b1a7Smrg
354e531b1a7Smrg`--srcdir=DIR'
355e531b1a7Smrg     Look for the package's source code in directory DIR.  Usually
356e531b1a7Smrg     `configure' can determine that directory automatically.
357e531b1a7Smrg
358e531b1a7Smrg`--prefix=DIR'
3593e999d35Smrg     Use DIR as the installation prefix.  *note Installation Names::
360e531b1a7Smrg     for more details, including other options available for fine-tuning
361e531b1a7Smrg     the installation locations.
362e531b1a7Smrg
363e531b1a7Smrg`--no-create'
364e531b1a7Smrg`-n'
365e531b1a7Smrg     Run the configure checks, but stop before creating any output
366e531b1a7Smrg     files.
367e531b1a7Smrg
368e531b1a7Smrg`configure' also accepts some other, not widely useful, options.  Run
369e531b1a7Smrg`configure --help' for more details.
370e531b1a7Smrg
371