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