INSTALL revision 7a84e134
17a84e134SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
27a84e134SmrgFoundation, Inc.
37a84e134Smrg
47a84e134Smrg   This file is free documentation; the Free Software Foundation gives
57a84e134Smrgunlimited permission to copy, distribute and modify it.
67a84e134Smrg
77a84e134SmrgBasic Installation
87a84e134Smrg==================
97a84e134Smrg
107a84e134Smrg   These are generic installation instructions.
117a84e134Smrg
127a84e134Smrg   The `configure' shell script attempts to guess correct values for
137a84e134Smrgvarious system-dependent variables used during compilation.  It uses
147a84e134Smrgthose values to create a `Makefile' in each directory of the package.
157a84e134SmrgIt may also create one or more `.h' files containing system-dependent
167a84e134Smrgdefinitions.  Finally, it creates a shell script `config.status' that
177a84e134Smrgyou can run in the future to recreate the current configuration, and a
187a84e134Smrgfile `config.log' containing compiler output (useful mainly for
197a84e134Smrgdebugging `configure').
207a84e134Smrg
217a84e134Smrg   It can also use an optional file (typically called `config.cache'
227a84e134Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
237a84e134Smrgthe results of its tests to speed up reconfiguring.  (Caching is
247a84e134Smrgdisabled by default to prevent problems with accidental use of stale
257a84e134Smrgcache files.)
267a84e134Smrg
277a84e134Smrg   If you need to do unusual things to compile the package, please try
287a84e134Smrgto figure out how `configure' could check whether to do them, and mail
297a84e134Smrgdiffs or instructions to the address given in the `README' so they can
307a84e134Smrgbe considered for the next release.  If you are using the cache, and at
317a84e134Smrgsome point `config.cache' contains results you don't want to keep, you
327a84e134Smrgmay remove or edit it.
337a84e134Smrg
347a84e134Smrg   The file `configure.ac' (or `configure.in') is used to create
357a84e134Smrg`configure' by a program called `autoconf'.  You only need
367a84e134Smrg`configure.ac' if you want to change it or regenerate `configure' using
377a84e134Smrga newer version of `autoconf'.
387a84e134Smrg
397a84e134SmrgThe simplest way to compile this package is:
407a84e134Smrg
417a84e134Smrg  1. `cd' to the directory containing the package's source code and type
427a84e134Smrg     `./configure' to configure the package for your system.  If you're
437a84e134Smrg     using `csh' on an old version of System V, you might need to type
447a84e134Smrg     `sh ./configure' instead to prevent `csh' from trying to execute
457a84e134Smrg     `configure' itself.
467a84e134Smrg
477a84e134Smrg     Running `configure' takes awhile.  While running, it prints some
487a84e134Smrg     messages telling which features it is checking for.
497a84e134Smrg
507a84e134Smrg  2. Type `make' to compile the package.
517a84e134Smrg
527a84e134Smrg  3. Optionally, type `make check' to run any self-tests that come with
537a84e134Smrg     the package.
547a84e134Smrg
557a84e134Smrg  4. Type `make install' to install the programs and any data files and
567a84e134Smrg     documentation.
577a84e134Smrg
587a84e134Smrg  5. You can remove the program binaries and object files from the
597a84e134Smrg     source code directory by typing `make clean'.  To also remove the
607a84e134Smrg     files that `configure' created (so you can compile the package for
617a84e134Smrg     a different kind of computer), type `make distclean'.  There is
627a84e134Smrg     also a `make maintainer-clean' target, but that is intended mainly
637a84e134Smrg     for the package's developers.  If you use it, you may have to get
647a84e134Smrg     all sorts of other programs in order to regenerate files that came
657a84e134Smrg     with the distribution.
667a84e134Smrg
677a84e134SmrgCompilers and Options
687a84e134Smrg=====================
697a84e134Smrg
707a84e134Smrg   Some systems require unusual options for compilation or linking that
717a84e134Smrgthe `configure' script does not know about.  Run `./configure --help'
727a84e134Smrgfor details on some of the pertinent environment variables.
737a84e134Smrg
747a84e134Smrg   You can give `configure' initial values for configuration parameters
757a84e134Smrgby setting variables in the command line or in the environment.  Here
767a84e134Smrgis an example:
777a84e134Smrg
787a84e134Smrg     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
797a84e134Smrg
807a84e134Smrg   *Note Defining Variables::, for more details.
817a84e134Smrg
827a84e134SmrgCompiling For Multiple Architectures
837a84e134Smrg====================================
847a84e134Smrg
857a84e134Smrg   You can compile the package for more than one kind of computer at the
867a84e134Smrgsame time, by placing the object files for each architecture in their
877a84e134Smrgown directory.  To do this, you must use a version of `make' that
887a84e134Smrgsupports the `VPATH' variable, such as GNU `make'.  `cd' to the
897a84e134Smrgdirectory where you want the object files and executables to go and run
907a84e134Smrgthe `configure' script.  `configure' automatically checks for the
917a84e134Smrgsource code in the directory that `configure' is in and in `..'.
927a84e134Smrg
937a84e134Smrg   If you have to use a `make' that does not support the `VPATH'
947a84e134Smrgvariable, you have to compile the package for one architecture at a
957a84e134Smrgtime in the source code directory.  After you have installed the
967a84e134Smrgpackage for one architecture, use `make distclean' before reconfiguring
977a84e134Smrgfor another architecture.
987a84e134Smrg
997a84e134SmrgInstallation Names
1007a84e134Smrg==================
1017a84e134Smrg
1027a84e134Smrg   By default, `make install' will install the package's files in
1037a84e134Smrg`/usr/local/bin', `/usr/local/man', etc.  You can specify an
1047a84e134Smrginstallation prefix other than `/usr/local' by giving `configure' the
1057a84e134Smrgoption `--prefix=PATH'.
1067a84e134Smrg
1077a84e134Smrg   You can specify separate installation prefixes for
1087a84e134Smrgarchitecture-specific files and architecture-independent files.  If you
1097a84e134Smrggive `configure' the option `--exec-prefix=PATH', the package will use
1107a84e134SmrgPATH as the prefix for installing programs and libraries.
1117a84e134SmrgDocumentation and other data files will still use the regular prefix.
1127a84e134Smrg
1137a84e134Smrg   In addition, if you use an unusual directory layout you can give
1147a84e134Smrgoptions like `--bindir=PATH' to specify different values for particular
1157a84e134Smrgkinds of files.  Run `configure --help' for a list of the directories
1167a84e134Smrgyou can set and what kinds of files go in them.
1177a84e134Smrg
1187a84e134Smrg   If the package supports it, you can cause programs to be installed
1197a84e134Smrgwith an extra prefix or suffix on their names by giving `configure' the
1207a84e134Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1217a84e134Smrg
1227a84e134SmrgOptional Features
1237a84e134Smrg=================
1247a84e134Smrg
1257a84e134Smrg   Some packages pay attention to `--enable-FEATURE' options to
1267a84e134Smrg`configure', where FEATURE indicates an optional part of the package.
1277a84e134SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
1287a84e134Smrgis something like `gnu-as' or `x' (for the X Window System).  The
1297a84e134Smrg`README' should mention any `--enable-' and `--with-' options that the
1307a84e134Smrgpackage recognizes.
1317a84e134Smrg
1327a84e134Smrg   For packages that use the X Window System, `configure' can usually
1337a84e134Smrgfind the X include and library files automatically, but if it doesn't,
1347a84e134Smrgyou can use the `configure' options `--x-includes=DIR' and
1357a84e134Smrg`--x-libraries=DIR' to specify their locations.
1367a84e134Smrg
1377a84e134SmrgSpecifying the System Type
1387a84e134Smrg==========================
1397a84e134Smrg
1407a84e134Smrg   There may be some features `configure' cannot figure out
1417a84e134Smrgautomatically, but needs to determine by the type of machine the package
1427a84e134Smrgwill run on.  Usually, assuming the package is built to be run on the
1437a84e134Smrg_same_ architectures, `configure' can figure that out, but if it prints
1447a84e134Smrga message saying it cannot guess the machine type, give it the
1457a84e134Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
1467a84e134Smrgtype, such as `sun4', or a canonical name which has the form:
1477a84e134Smrg
1487a84e134Smrg     CPU-COMPANY-SYSTEM
1497a84e134Smrg
1507a84e134Smrgwhere SYSTEM can have one of these forms:
1517a84e134Smrg
1527a84e134Smrg     OS KERNEL-OS
1537a84e134Smrg
1547a84e134Smrg   See the file `config.sub' for the possible values of each field.  If
1557a84e134Smrg`config.sub' isn't included in this package, then this package doesn't
1567a84e134Smrgneed to know the machine type.
1577a84e134Smrg
1587a84e134Smrg   If you are _building_ compiler tools for cross-compiling, you should
1597a84e134Smrguse the `--target=TYPE' option to select the type of system they will
1607a84e134Smrgproduce code for.
1617a84e134Smrg
1627a84e134Smrg   If you want to _use_ a cross compiler, that generates code for a
1637a84e134Smrgplatform different from the build platform, you should specify the
1647a84e134Smrg"host" platform (i.e., that on which the generated programs will
1657a84e134Smrgeventually be run) with `--host=TYPE'.
1667a84e134Smrg
1677a84e134SmrgSharing Defaults
1687a84e134Smrg================
1697a84e134Smrg
1707a84e134Smrg   If you want to set default values for `configure' scripts to share,
1717a84e134Smrgyou can create a site shell script called `config.site' that gives
1727a84e134Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
1737a84e134Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
1747a84e134Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
1757a84e134Smrg`CONFIG_SITE' environment variable to the location of the site script.
1767a84e134SmrgA warning: not all `configure' scripts look for a site script.
1777a84e134Smrg
1787a84e134SmrgDefining Variables
1797a84e134Smrg==================
1807a84e134Smrg
1817a84e134Smrg   Variables not defined in a site shell script can be set in the
1827a84e134Smrgenvironment passed to `configure'.  However, some packages may run
1837a84e134Smrgconfigure again during the build, and the customized values of these
1847a84e134Smrgvariables may be lost.  In order to avoid this problem, you should set
1857a84e134Smrgthem in the `configure' command line, using `VAR=value'.  For example:
1867a84e134Smrg
1877a84e134Smrg     ./configure CC=/usr/local2/bin/gcc
1887a84e134Smrg
1897a84e134Smrgwill cause the specified gcc to be used as the C compiler (unless it is
1907a84e134Smrgoverridden in the site shell script).
1917a84e134Smrg
1927a84e134Smrg`configure' Invocation
1937a84e134Smrg======================
1947a84e134Smrg
1957a84e134Smrg   `configure' recognizes the following options to control how it
1967a84e134Smrgoperates.
1977a84e134Smrg
1987a84e134Smrg`--help'
1997a84e134Smrg`-h'
2007a84e134Smrg     Print a summary of the options to `configure', and exit.
2017a84e134Smrg
2027a84e134Smrg`--version'
2037a84e134Smrg`-V'
2047a84e134Smrg     Print the version of Autoconf used to generate the `configure'
2057a84e134Smrg     script, and exit.
2067a84e134Smrg
2077a84e134Smrg`--cache-file=FILE'
2087a84e134Smrg     Enable the cache: use and save the results of the tests in FILE,
2097a84e134Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
2107a84e134Smrg     disable caching.
2117a84e134Smrg
2127a84e134Smrg`--config-cache'
2137a84e134Smrg`-C'
2147a84e134Smrg     Alias for `--cache-file=config.cache'.
2157a84e134Smrg
2167a84e134Smrg`--quiet'
2177a84e134Smrg`--silent'
2187a84e134Smrg`-q'
2197a84e134Smrg     Do not print messages saying which checks are being made.  To
2207a84e134Smrg     suppress all normal output, redirect it to `/dev/null' (any error
2217a84e134Smrg     messages will still be shown).
2227a84e134Smrg
2237a84e134Smrg`--srcdir=DIR'
2247a84e134Smrg     Look for the package's source code in directory DIR.  Usually
2257a84e134Smrg     `configure' can determine that directory automatically.
2267a84e134Smrg
2277a84e134Smrg`configure' also accepts some other, not widely useful, options.  Run
2287a84e134Smrg`configure --help' for more details.
2297a84e134Smrg
230