INSTALL revision 444c061a
1444c061aSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 2444c061aSmrgFoundation, Inc. 3444c061aSmrg 4444c061aSmrg This file is free documentation; the Free Software Foundation gives 5444c061aSmrgunlimited permission to copy, distribute and modify it. 6444c061aSmrg 7444c061aSmrgBasic Installation 8444c061aSmrg================== 9444c061aSmrg 10444c061aSmrg These are generic installation instructions. 11444c061aSmrg 12444c061aSmrg The `configure' shell script attempts to guess correct values for 13444c061aSmrgvarious system-dependent variables used during compilation. It uses 14444c061aSmrgthose values to create a `Makefile' in each directory of the package. 15444c061aSmrgIt may also create one or more `.h' files containing system-dependent 16444c061aSmrgdefinitions. Finally, it creates a shell script `config.status' that 17444c061aSmrgyou can run in the future to recreate the current configuration, and a 18444c061aSmrgfile `config.log' containing compiler output (useful mainly for 19444c061aSmrgdebugging `configure'). 20444c061aSmrg 21444c061aSmrg It can also use an optional file (typically called `config.cache' 22444c061aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 23444c061aSmrgthe results of its tests to speed up reconfiguring. (Caching is 24444c061aSmrgdisabled by default to prevent problems with accidental use of stale 25444c061aSmrgcache files.) 26444c061aSmrg 27444c061aSmrg If you need to do unusual things to compile the package, please try 28444c061aSmrgto figure out how `configure' could check whether to do them, and mail 29444c061aSmrgdiffs or instructions to the address given in the `README' so they can 30444c061aSmrgbe considered for the next release. If you are using the cache, and at 31444c061aSmrgsome point `config.cache' contains results you don't want to keep, you 32444c061aSmrgmay remove or edit it. 33444c061aSmrg 34444c061aSmrg The file `configure.ac' (or `configure.in') is used to create 35444c061aSmrg`configure' by a program called `autoconf'. You only need 36444c061aSmrg`configure.ac' if you want to change it or regenerate `configure' using 37444c061aSmrga newer version of `autoconf'. 38444c061aSmrg 39444c061aSmrgThe simplest way to compile this package is: 40444c061aSmrg 41444c061aSmrg 1. `cd' to the directory containing the package's source code and type 42444c061aSmrg `./configure' to configure the package for your system. If you're 43444c061aSmrg using `csh' on an old version of System V, you might need to type 44444c061aSmrg `sh ./configure' instead to prevent `csh' from trying to execute 45444c061aSmrg `configure' itself. 46444c061aSmrg 47444c061aSmrg Running `configure' takes awhile. While running, it prints some 48444c061aSmrg messages telling which features it is checking for. 49444c061aSmrg 50444c061aSmrg 2. Type `make' to compile the package. 51444c061aSmrg 52444c061aSmrg 3. Optionally, type `make check' to run any self-tests that come with 53444c061aSmrg the package. 54444c061aSmrg 55444c061aSmrg 4. Type `make install' to install the programs and any data files and 56444c061aSmrg documentation. 57444c061aSmrg 58444c061aSmrg 5. You can remove the program binaries and object files from the 59444c061aSmrg source code directory by typing `make clean'. To also remove the 60444c061aSmrg files that `configure' created (so you can compile the package for 61444c061aSmrg a different kind of computer), type `make distclean'. There is 62444c061aSmrg also a `make maintainer-clean' target, but that is intended mainly 63444c061aSmrg for the package's developers. If you use it, you may have to get 64444c061aSmrg all sorts of other programs in order to regenerate files that came 65444c061aSmrg with the distribution. 66444c061aSmrg 67444c061aSmrgCompilers and Options 68444c061aSmrg===================== 69444c061aSmrg 70444c061aSmrg Some systems require unusual options for compilation or linking that 71444c061aSmrgthe `configure' script does not know about. Run `./configure --help' 72444c061aSmrgfor details on some of the pertinent environment variables. 73444c061aSmrg 74444c061aSmrg You can give `configure' initial values for configuration parameters 75444c061aSmrgby setting variables in the command line or in the environment. Here 76444c061aSmrgis an example: 77444c061aSmrg 78444c061aSmrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 79444c061aSmrg 80444c061aSmrg *Note Defining Variables::, for more details. 81444c061aSmrg 82444c061aSmrgCompiling For Multiple Architectures 83444c061aSmrg==================================== 84444c061aSmrg 85444c061aSmrg You can compile the package for more than one kind of computer at the 86444c061aSmrgsame time, by placing the object files for each architecture in their 87444c061aSmrgown directory. To do this, you must use a version of `make' that 88444c061aSmrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 89444c061aSmrgdirectory where you want the object files and executables to go and run 90444c061aSmrgthe `configure' script. `configure' automatically checks for the 91444c061aSmrgsource code in the directory that `configure' is in and in `..'. 92444c061aSmrg 93444c061aSmrg If you have to use a `make' that does not support the `VPATH' 94444c061aSmrgvariable, you have to compile the package for one architecture at a 95444c061aSmrgtime in the source code directory. After you have installed the 96444c061aSmrgpackage for one architecture, use `make distclean' before reconfiguring 97444c061aSmrgfor another architecture. 98444c061aSmrg 99444c061aSmrgInstallation Names 100444c061aSmrg================== 101444c061aSmrg 102444c061aSmrg By default, `make install' will install the package's files in 103444c061aSmrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 104444c061aSmrginstallation prefix other than `/usr/local' by giving `configure' the 105444c061aSmrgoption `--prefix=PATH'. 106444c061aSmrg 107444c061aSmrg You can specify separate installation prefixes for 108444c061aSmrgarchitecture-specific files and architecture-independent files. If you 109444c061aSmrggive `configure' the option `--exec-prefix=PATH', the package will use 110444c061aSmrgPATH as the prefix for installing programs and libraries. 111444c061aSmrgDocumentation and other data files will still use the regular prefix. 112444c061aSmrg 113444c061aSmrg In addition, if you use an unusual directory layout you can give 114444c061aSmrgoptions like `--bindir=PATH' to specify different values for particular 115444c061aSmrgkinds of files. Run `configure --help' for a list of the directories 116444c061aSmrgyou can set and what kinds of files go in them. 117444c061aSmrg 118444c061aSmrg If the package supports it, you can cause programs to be installed 119444c061aSmrgwith an extra prefix or suffix on their names by giving `configure' the 120444c061aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 121444c061aSmrg 122444c061aSmrgOptional Features 123444c061aSmrg================= 124444c061aSmrg 125444c061aSmrg Some packages pay attention to `--enable-FEATURE' options to 126444c061aSmrg`configure', where FEATURE indicates an optional part of the package. 127444c061aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 128444c061aSmrgis something like `gnu-as' or `x' (for the X Window System). The 129444c061aSmrg`README' should mention any `--enable-' and `--with-' options that the 130444c061aSmrgpackage recognizes. 131444c061aSmrg 132444c061aSmrg For packages that use the X Window System, `configure' can usually 133444c061aSmrgfind the X include and library files automatically, but if it doesn't, 134444c061aSmrgyou can use the `configure' options `--x-includes=DIR' and 135444c061aSmrg`--x-libraries=DIR' to specify their locations. 136444c061aSmrg 137444c061aSmrgSpecifying the System Type 138444c061aSmrg========================== 139444c061aSmrg 140444c061aSmrg There may be some features `configure' cannot figure out 141444c061aSmrgautomatically, but needs to determine by the type of machine the package 142444c061aSmrgwill run on. Usually, assuming the package is built to be run on the 143444c061aSmrg_same_ architectures, `configure' can figure that out, but if it prints 144444c061aSmrga message saying it cannot guess the machine type, give it the 145444c061aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 146444c061aSmrgtype, such as `sun4', or a canonical name which has the form: 147444c061aSmrg 148444c061aSmrg CPU-COMPANY-SYSTEM 149444c061aSmrg 150444c061aSmrgwhere SYSTEM can have one of these forms: 151444c061aSmrg 152444c061aSmrg OS KERNEL-OS 153444c061aSmrg 154444c061aSmrg See the file `config.sub' for the possible values of each field. If 155444c061aSmrg`config.sub' isn't included in this package, then this package doesn't 156444c061aSmrgneed to know the machine type. 157444c061aSmrg 158444c061aSmrg If you are _building_ compiler tools for cross-compiling, you should 159444c061aSmrguse the `--target=TYPE' option to select the type of system they will 160444c061aSmrgproduce code for. 161444c061aSmrg 162444c061aSmrg If you want to _use_ a cross compiler, that generates code for a 163444c061aSmrgplatform different from the build platform, you should specify the 164444c061aSmrg"host" platform (i.e., that on which the generated programs will 165444c061aSmrgeventually be run) with `--host=TYPE'. 166444c061aSmrg 167444c061aSmrgSharing Defaults 168444c061aSmrg================ 169444c061aSmrg 170444c061aSmrg If you want to set default values for `configure' scripts to share, 171444c061aSmrgyou can create a site shell script called `config.site' that gives 172444c061aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 173444c061aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 174444c061aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 175444c061aSmrg`CONFIG_SITE' environment variable to the location of the site script. 176444c061aSmrgA warning: not all `configure' scripts look for a site script. 177444c061aSmrg 178444c061aSmrgDefining Variables 179444c061aSmrg================== 180444c061aSmrg 181444c061aSmrg Variables not defined in a site shell script can be set in the 182444c061aSmrgenvironment passed to `configure'. However, some packages may run 183444c061aSmrgconfigure again during the build, and the customized values of these 184444c061aSmrgvariables may be lost. In order to avoid this problem, you should set 185444c061aSmrgthem in the `configure' command line, using `VAR=value'. For example: 186444c061aSmrg 187444c061aSmrg ./configure CC=/usr/local2/bin/gcc 188444c061aSmrg 189444c061aSmrgwill cause the specified gcc to be used as the C compiler (unless it is 190444c061aSmrgoverridden in the site shell script). 191444c061aSmrg 192444c061aSmrg`configure' Invocation 193444c061aSmrg====================== 194444c061aSmrg 195444c061aSmrg `configure' recognizes the following options to control how it 196444c061aSmrgoperates. 197444c061aSmrg 198444c061aSmrg`--help' 199444c061aSmrg`-h' 200444c061aSmrg Print a summary of the options to `configure', and exit. 201444c061aSmrg 202444c061aSmrg`--version' 203444c061aSmrg`-V' 204444c061aSmrg Print the version of Autoconf used to generate the `configure' 205444c061aSmrg script, and exit. 206444c061aSmrg 207444c061aSmrg`--cache-file=FILE' 208444c061aSmrg Enable the cache: use and save the results of the tests in FILE, 209444c061aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 210444c061aSmrg disable caching. 211444c061aSmrg 212444c061aSmrg`--config-cache' 213444c061aSmrg`-C' 214444c061aSmrg Alias for `--cache-file=config.cache'. 215444c061aSmrg 216444c061aSmrg`--quiet' 217444c061aSmrg`--silent' 218444c061aSmrg`-q' 219444c061aSmrg Do not print messages saying which checks are being made. To 220444c061aSmrg suppress all normal output, redirect it to `/dev/null' (any error 221444c061aSmrg messages will still be shown). 222444c061aSmrg 223444c061aSmrg`--srcdir=DIR' 224444c061aSmrg Look for the package's source code in directory DIR. Usually 225444c061aSmrg `configure' can determine that directory automatically. 226444c061aSmrg 227444c061aSmrg`configure' also accepts some other, not widely useful, options. Run 228444c061aSmrg`configure --help' for more details. 229444c061aSmrg 230