michael@0: Installation Instructions michael@0: ************************* michael@0: michael@0: Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, michael@0: 2006 Free Software Foundation, Inc. michael@0: michael@0: This file is free documentation; the Free Software Foundation gives michael@0: unlimited permission to copy, distribute and modify it. michael@0: michael@0: Basic Installation michael@0: ================== michael@0: michael@0: Briefly, the shell commands `./configure; make; make install' should michael@0: configure, build, and install this package. The following michael@0: more-detailed instructions are generic; see the `README' file for michael@0: instructions specific to this package. michael@0: michael@0: The `configure' shell script attempts to guess correct values for michael@0: various system-dependent variables used during compilation. It uses michael@0: those values to create a `Makefile' in each directory of the package. michael@0: It may also create one or more `.h' files containing system-dependent michael@0: definitions. Finally, it creates a shell script `config.status' that michael@0: you can run in the future to recreate the current configuration, and a michael@0: file `config.log' containing compiler output (useful mainly for michael@0: debugging `configure'). michael@0: michael@0: It can also use an optional file (typically called `config.cache' michael@0: and enabled with `--cache-file=config.cache' or simply `-C') that saves michael@0: the results of its tests to speed up reconfiguring. Caching is michael@0: disabled by default to prevent problems with accidental use of stale michael@0: cache files. michael@0: michael@0: If you need to do unusual things to compile the package, please try michael@0: to figure out how `configure' could check whether to do them, and mail michael@0: diffs or instructions to the address given in the `README' so they can michael@0: be considered for the next release. If you are using the cache, and at michael@0: some point `config.cache' contains results you don't want to keep, you michael@0: may remove or edit it. michael@0: michael@0: The file `configure.ac' (or `configure.in') is used to create michael@0: `configure' by a program called `autoconf'. You need `configure.ac' if michael@0: you want to change it or regenerate `configure' using a newer version michael@0: of `autoconf'. michael@0: michael@0: The simplest way to compile this package is: michael@0: michael@0: 1. `cd' to the directory containing the package's source code and type michael@0: `./configure' to configure the package for your system. michael@0: michael@0: Running `configure' might take a while. While running, it prints michael@0: some messages telling which features it is checking for. michael@0: michael@0: 2. Type `make' to compile the package. michael@0: michael@0: 3. Optionally, type `make check' to run any self-tests that come with michael@0: the package. michael@0: michael@0: 4. Type `make install' to install the programs and any data files and michael@0: documentation. michael@0: michael@0: 5. You can remove the program binaries and object files from the michael@0: source code directory by typing `make clean'. To also remove the michael@0: files that `configure' created (so you can compile the package for michael@0: a different kind of computer), type `make distclean'. There is michael@0: also a `make maintainer-clean' target, but that is intended mainly michael@0: for the package's developers. If you use it, you may have to get michael@0: all sorts of other programs in order to regenerate files that came michael@0: with the distribution. michael@0: michael@0: Compilers and Options michael@0: ===================== michael@0: michael@0: Some systems require unusual options for compilation or linking that the michael@0: `configure' script does not know about. Run `./configure --help' for michael@0: details on some of the pertinent environment variables. michael@0: michael@0: You can give `configure' initial values for configuration parameters michael@0: by setting variables in the command line or in the environment. Here michael@0: is an example: michael@0: michael@0: ./configure CC=c99 CFLAGS=-g LIBS=-lposix michael@0: michael@0: *Note Defining Variables::, for more details. michael@0: michael@0: Compiling For Multiple Architectures michael@0: ==================================== michael@0: michael@0: You can compile the package for more than one kind of computer at the michael@0: same time, by placing the object files for each architecture in their michael@0: own directory. To do this, you can use GNU `make'. `cd' to the michael@0: directory where you want the object files and executables to go and run michael@0: the `configure' script. `configure' automatically checks for the michael@0: source code in the directory that `configure' is in and in `..'. michael@0: michael@0: With a non-GNU `make', it is safer to compile the package for one michael@0: architecture at a time in the source code directory. After you have michael@0: installed the package for one architecture, use `make distclean' before michael@0: reconfiguring for another architecture. michael@0: michael@0: Installation Names michael@0: ================== michael@0: michael@0: By default, `make install' installs the package's commands under michael@0: `/usr/local/bin', include files under `/usr/local/include', etc. You michael@0: can specify an installation prefix other than `/usr/local' by giving michael@0: `configure' the option `--prefix=PREFIX'. michael@0: michael@0: You can specify separate installation prefixes for michael@0: architecture-specific files and architecture-independent files. If you michael@0: pass the option `--exec-prefix=PREFIX' to `configure', the package uses michael@0: PREFIX as the prefix for installing programs and libraries. michael@0: Documentation and other data files still use the regular prefix. michael@0: michael@0: In addition, if you use an unusual directory layout you can give michael@0: options like `--bindir=DIR' to specify different values for particular michael@0: kinds of files. Run `configure --help' for a list of the directories michael@0: you can set and what kinds of files go in them. michael@0: michael@0: If the package supports it, you can cause programs to be installed michael@0: with an extra prefix or suffix on their names by giving `configure' the michael@0: option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. michael@0: michael@0: Optional Features michael@0: ================= michael@0: michael@0: Some packages pay attention to `--enable-FEATURE' options to michael@0: `configure', where FEATURE indicates an optional part of the package. michael@0: They may also pay attention to `--with-PACKAGE' options, where PACKAGE michael@0: is something like `gnu-as' or `x' (for the X Window System). The michael@0: `README' should mention any `--enable-' and `--with-' options that the michael@0: package recognizes. michael@0: michael@0: For packages that use the X Window System, `configure' can usually michael@0: find the X include and library files automatically, but if it doesn't, michael@0: you can use the `configure' options `--x-includes=DIR' and michael@0: `--x-libraries=DIR' to specify their locations. michael@0: michael@0: Specifying the System Type michael@0: ========================== michael@0: michael@0: There may be some features `configure' cannot figure out automatically, michael@0: but needs to determine by the type of machine the package will run on. michael@0: Usually, assuming the package is built to be run on the _same_ michael@0: architectures, `configure' can figure that out, but if it prints a michael@0: message saying it cannot guess the machine type, give it the michael@0: `--build=TYPE' option. TYPE can either be a short name for the system michael@0: type, such as `sun4', or a canonical name which has the form: michael@0: michael@0: CPU-COMPANY-SYSTEM michael@0: michael@0: where SYSTEM can have one of these forms: michael@0: michael@0: OS KERNEL-OS michael@0: michael@0: See the file `config.sub' for the possible values of each field. If michael@0: `config.sub' isn't included in this package, then this package doesn't michael@0: need to know the machine type. michael@0: michael@0: If you are _building_ compiler tools for cross-compiling, you should michael@0: use the option `--target=TYPE' to select the type of system they will michael@0: produce code for. michael@0: michael@0: If you want to _use_ a cross compiler, that generates code for a michael@0: platform different from the build platform, you should specify the michael@0: "host" platform (i.e., that on which the generated programs will michael@0: eventually be run) with `--host=TYPE'. michael@0: michael@0: Sharing Defaults michael@0: ================ michael@0: michael@0: If you want to set default values for `configure' scripts to share, you michael@0: can create a site shell script called `config.site' that gives default michael@0: values for variables like `CC', `cache_file', and `prefix'. michael@0: `configure' looks for `PREFIX/share/config.site' if it exists, then michael@0: `PREFIX/etc/config.site' if it exists. Or, you can set the michael@0: `CONFIG_SITE' environment variable to the location of the site script. michael@0: A warning: not all `configure' scripts look for a site script. michael@0: michael@0: Defining Variables michael@0: ================== michael@0: michael@0: Variables not defined in a site shell script can be set in the michael@0: environment passed to `configure'. However, some packages may run michael@0: configure again during the build, and the customized values of these michael@0: variables may be lost. In order to avoid this problem, you should set michael@0: them in the `configure' command line, using `VAR=value'. For example: michael@0: michael@0: ./configure CC=/usr/local2/bin/gcc michael@0: michael@0: causes the specified `gcc' to be used as the C compiler (unless it is michael@0: overridden in the site shell script). michael@0: michael@0: Unfortunately, this technique does not work for `CONFIG_SHELL' due to michael@0: an Autoconf bug. Until the bug is fixed you can use this workaround: michael@0: michael@0: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash michael@0: michael@0: `configure' Invocation michael@0: ====================== michael@0: michael@0: `configure' recognizes the following options to control how it operates. michael@0: michael@0: `--help' michael@0: `-h' michael@0: Print a summary of the options to `configure', and exit. michael@0: michael@0: `--version' michael@0: `-V' michael@0: Print the version of Autoconf used to generate the `configure' michael@0: script, and exit. michael@0: michael@0: `--cache-file=FILE' michael@0: Enable the cache: use and save the results of the tests in FILE, michael@0: traditionally `config.cache'. FILE defaults to `/dev/null' to michael@0: disable caching. michael@0: michael@0: `--config-cache' michael@0: `-C' michael@0: Alias for `--cache-file=config.cache'. michael@0: michael@0: `--quiet' michael@0: `--silent' michael@0: `-q' michael@0: Do not print messages saying which checks are being made. To michael@0: suppress all normal output, redirect it to `/dev/null' (any error michael@0: messages will still be shown). michael@0: michael@0: `--srcdir=DIR' michael@0: Look for the package's source code in directory DIR. Usually michael@0: `configure' can determine that directory automatically. michael@0: michael@0: `configure' also accepts some other, not widely useful, options. Run michael@0: `configure --help' for more details. michael@0: