INSTALL revision bd1da9d7
1bd1da9d7SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 2bd1da9d7SmrgFoundation, Inc. 3bd1da9d7Smrg 4bd1da9d7Smrg This file is free documentation; the Free Software Foundation gives 5bd1da9d7Smrgunlimited permission to copy, distribute and modify it. 6bd1da9d7Smrg 7bd1da9d7SmrgBasic Installation 8bd1da9d7Smrg================== 9bd1da9d7Smrg 10bd1da9d7Smrg These are generic installation instructions. 11bd1da9d7Smrg 12bd1da9d7Smrg The `configure' shell script attempts to guess correct values for 13bd1da9d7Smrgvarious system-dependent variables used during compilation. It uses 14bd1da9d7Smrgthose values to create a `Makefile' in each directory of the package. 15bd1da9d7SmrgIt may also create one or more `.h' files containing system-dependent 16bd1da9d7Smrgdefinitions. Finally, it creates a shell script `config.status' that 17bd1da9d7Smrgyou can run in the future to recreate the current configuration, and a 18bd1da9d7Smrgfile `config.log' containing compiler output (useful mainly for 19bd1da9d7Smrgdebugging `configure'). 20bd1da9d7Smrg 21bd1da9d7Smrg It can also use an optional file (typically called `config.cache' 22bd1da9d7Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 23bd1da9d7Smrgthe results of its tests to speed up reconfiguring. (Caching is 24bd1da9d7Smrgdisabled by default to prevent problems with accidental use of stale 25bd1da9d7Smrgcache files.) 26bd1da9d7Smrg 27bd1da9d7Smrg If you need to do unusual things to compile the package, please try 28bd1da9d7Smrgto figure out how `configure' could check whether to do them, and mail 29bd1da9d7Smrgdiffs or instructions to the address given in the `README' so they can 30bd1da9d7Smrgbe considered for the next release. If you are using the cache, and at 31bd1da9d7Smrgsome point `config.cache' contains results you don't want to keep, you 32bd1da9d7Smrgmay remove or edit it. 33bd1da9d7Smrg 34bd1da9d7Smrg The file `configure.ac' (or `configure.in') is used to create 35bd1da9d7Smrg`configure' by a program called `autoconf'. You only need 36bd1da9d7Smrg`configure.ac' if you want to change it or regenerate `configure' using 37bd1da9d7Smrga newer version of `autoconf'. 38bd1da9d7Smrg 39bd1da9d7SmrgThe simplest way to compile this package is: 40bd1da9d7Smrg 41bd1da9d7Smrg 1. `cd' to the directory containing the package's source code and type 42bd1da9d7Smrg `./configure' to configure the package for your system. If you're 43bd1da9d7Smrg using `csh' on an old version of System V, you might need to type 44bd1da9d7Smrg `sh ./configure' instead to prevent `csh' from trying to execute 45bd1da9d7Smrg `configure' itself. 46bd1da9d7Smrg 47bd1da9d7Smrg Running `configure' takes awhile. While running, it prints some 48bd1da9d7Smrg messages telling which features it is checking for. 49bd1da9d7Smrg 50bd1da9d7Smrg 2. Type `make' to compile the package. 51bd1da9d7Smrg 52bd1da9d7Smrg 3. Optionally, type `make check' to run any self-tests that come with 53bd1da9d7Smrg the package. 54bd1da9d7Smrg 55bd1da9d7Smrg 4. Type `make install' to install the programs and any data files and 56bd1da9d7Smrg documentation. 57bd1da9d7Smrg 58bd1da9d7Smrg 5. You can remove the program binaries and object files from the 59bd1da9d7Smrg source code directory by typing `make clean'. To also remove the 60bd1da9d7Smrg files that `configure' created (so you can compile the package for 61bd1da9d7Smrg a different kind of computer), type `make distclean'. There is 62bd1da9d7Smrg also a `make maintainer-clean' target, but that is intended mainly 63bd1da9d7Smrg for the package's developers. If you use it, you may have to get 64bd1da9d7Smrg all sorts of other programs in order to regenerate files that came 65bd1da9d7Smrg with the distribution. 66bd1da9d7Smrg 67bd1da9d7SmrgCompilers and Options 68bd1da9d7Smrg===================== 69bd1da9d7Smrg 70bd1da9d7Smrg Some systems require unusual options for compilation or linking that 71bd1da9d7Smrgthe `configure' script does not know about. Run `./configure --help' 72bd1da9d7Smrgfor details on some of the pertinent environment variables. 73bd1da9d7Smrg 74bd1da9d7Smrg You can give `configure' initial values for configuration parameters 75bd1da9d7Smrgby setting variables in the command line or in the environment. Here 76bd1da9d7Smrgis an example: 77bd1da9d7Smrg 78bd1da9d7Smrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 79bd1da9d7Smrg 80bd1da9d7Smrg *Note Defining Variables::, for more details. 81bd1da9d7Smrg 82bd1da9d7SmrgCompiling For Multiple Architectures 83bd1da9d7Smrg==================================== 84bd1da9d7Smrg 85bd1da9d7Smrg You can compile the package for more than one kind of computer at the 86bd1da9d7Smrgsame time, by placing the object files for each architecture in their 87bd1da9d7Smrgown directory. To do this, you must use a version of `make' that 88bd1da9d7Smrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 89bd1da9d7Smrgdirectory where you want the object files and executables to go and run 90bd1da9d7Smrgthe `configure' script. `configure' automatically checks for the 91bd1da9d7Smrgsource code in the directory that `configure' is in and in `..'. 92bd1da9d7Smrg 93bd1da9d7Smrg If you have to use a `make' that does not support the `VPATH' 94bd1da9d7Smrgvariable, you have to compile the package for one architecture at a 95bd1da9d7Smrgtime in the source code directory. After you have installed the 96bd1da9d7Smrgpackage for one architecture, use `make distclean' before reconfiguring 97bd1da9d7Smrgfor another architecture. 98bd1da9d7Smrg 99bd1da9d7SmrgInstallation Names 100bd1da9d7Smrg================== 101bd1da9d7Smrg 102bd1da9d7Smrg By default, `make install' will install the package's files in 103bd1da9d7Smrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 104bd1da9d7Smrginstallation prefix other than `/usr/local' by giving `configure' the 105bd1da9d7Smrgoption `--prefix=PATH'. 106bd1da9d7Smrg 107bd1da9d7Smrg You can specify separate installation prefixes for 108bd1da9d7Smrgarchitecture-specific files and architecture-independent files. If you 109bd1da9d7Smrggive `configure' the option `--exec-prefix=PATH', the package will use 110bd1da9d7SmrgPATH as the prefix for installing programs and libraries. 111bd1da9d7SmrgDocumentation and other data files will still use the regular prefix. 112bd1da9d7Smrg 113bd1da9d7Smrg In addition, if you use an unusual directory layout you can give 114bd1da9d7Smrgoptions like `--bindir=PATH' to specify different values for particular 115bd1da9d7Smrgkinds of files. Run `configure --help' for a list of the directories 116bd1da9d7Smrgyou can set and what kinds of files go in them. 117bd1da9d7Smrg 118bd1da9d7Smrg If the package supports it, you can cause programs to be installed 119bd1da9d7Smrgwith an extra prefix or suffix on their names by giving `configure' the 120bd1da9d7Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 121bd1da9d7Smrg 122bd1da9d7SmrgOptional Features 123bd1da9d7Smrg================= 124bd1da9d7Smrg 125bd1da9d7Smrg Some packages pay attention to `--enable-FEATURE' options to 126bd1da9d7Smrg`configure', where FEATURE indicates an optional part of the package. 127bd1da9d7SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 128bd1da9d7Smrgis something like `gnu-as' or `x' (for the X Window System). The 129bd1da9d7Smrg`README' should mention any `--enable-' and `--with-' options that the 130bd1da9d7Smrgpackage recognizes. 131bd1da9d7Smrg 132bd1da9d7Smrg For packages that use the X Window System, `configure' can usually 133bd1da9d7Smrgfind the X include and library files automatically, but if it doesn't, 134bd1da9d7Smrgyou can use the `configure' options `--x-includes=DIR' and 135bd1da9d7Smrg`--x-libraries=DIR' to specify their locations. 136bd1da9d7Smrg 137bd1da9d7SmrgSpecifying the System Type 138bd1da9d7Smrg========================== 139bd1da9d7Smrg 140bd1da9d7Smrg There may be some features `configure' cannot figure out 141bd1da9d7Smrgautomatically, but needs to determine by the type of machine the package 142bd1da9d7Smrgwill run on. Usually, assuming the package is built to be run on the 143bd1da9d7Smrg_same_ architectures, `configure' can figure that out, but if it prints 144bd1da9d7Smrga message saying it cannot guess the machine type, give it the 145bd1da9d7Smrg`--build=TYPE' option. TYPE can either be a short name for the system 146bd1da9d7Smrgtype, such as `sun4', or a canonical name which has the form: 147bd1da9d7Smrg 148bd1da9d7Smrg CPU-COMPANY-SYSTEM 149bd1da9d7Smrg 150bd1da9d7Smrgwhere SYSTEM can have one of these forms: 151bd1da9d7Smrg 152bd1da9d7Smrg OS KERNEL-OS 153bd1da9d7Smrg 154bd1da9d7Smrg See the file `config.sub' for the possible values of each field. If 155bd1da9d7Smrg`config.sub' isn't included in this package, then this package doesn't 156bd1da9d7Smrgneed to know the machine type. 157bd1da9d7Smrg 158bd1da9d7Smrg If you are _building_ compiler tools for cross-compiling, you should 159bd1da9d7Smrguse the `--target=TYPE' option to select the type of system they will 160bd1da9d7Smrgproduce code for. 161bd1da9d7Smrg 162bd1da9d7Smrg If you want to _use_ a cross compiler, that generates code for a 163bd1da9d7Smrgplatform different from the build platform, you should specify the 164bd1da9d7Smrg"host" platform (i.e., that on which the generated programs will 165bd1da9d7Smrgeventually be run) with `--host=TYPE'. 166bd1da9d7Smrg 167bd1da9d7SmrgSharing Defaults 168bd1da9d7Smrg================ 169bd1da9d7Smrg 170bd1da9d7Smrg If you want to set default values for `configure' scripts to share, 171bd1da9d7Smrgyou can create a site shell script called `config.site' that gives 172bd1da9d7Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 173bd1da9d7Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 174bd1da9d7Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 175bd1da9d7Smrg`CONFIG_SITE' environment variable to the location of the site script. 176bd1da9d7SmrgA warning: not all `configure' scripts look for a site script. 177bd1da9d7Smrg 178bd1da9d7SmrgDefining Variables 179bd1da9d7Smrg================== 180bd1da9d7Smrg 181bd1da9d7Smrg Variables not defined in a site shell script can be set in the 182bd1da9d7Smrgenvironment passed to `configure'. However, some packages may run 183bd1da9d7Smrgconfigure again during the build, and the customized values of these 184bd1da9d7Smrgvariables may be lost. In order to avoid this problem, you should set 185bd1da9d7Smrgthem in the `configure' command line, using `VAR=value'. For example: 186bd1da9d7Smrg 187bd1da9d7Smrg ./configure CC=/usr/local2/bin/gcc 188bd1da9d7Smrg 189bd1da9d7Smrgwill cause the specified gcc to be used as the C compiler (unless it is 190bd1da9d7Smrgoverridden in the site shell script). 191bd1da9d7Smrg 192bd1da9d7Smrg`configure' Invocation 193bd1da9d7Smrg====================== 194bd1da9d7Smrg 195bd1da9d7Smrg `configure' recognizes the following options to control how it 196bd1da9d7Smrgoperates. 197bd1da9d7Smrg 198bd1da9d7Smrg`--help' 199bd1da9d7Smrg`-h' 200bd1da9d7Smrg Print a summary of the options to `configure', and exit. 201bd1da9d7Smrg 202bd1da9d7Smrg`--version' 203bd1da9d7Smrg`-V' 204bd1da9d7Smrg Print the version of Autoconf used to generate the `configure' 205bd1da9d7Smrg script, and exit. 206bd1da9d7Smrg 207bd1da9d7Smrg`--cache-file=FILE' 208bd1da9d7Smrg Enable the cache: use and save the results of the tests in FILE, 209bd1da9d7Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 210bd1da9d7Smrg disable caching. 211bd1da9d7Smrg 212bd1da9d7Smrg`--config-cache' 213bd1da9d7Smrg`-C' 214bd1da9d7Smrg Alias for `--cache-file=config.cache'. 215bd1da9d7Smrg 216bd1da9d7Smrg`--quiet' 217bd1da9d7Smrg`--silent' 218bd1da9d7Smrg`-q' 219bd1da9d7Smrg Do not print messages saying which checks are being made. To 220bd1da9d7Smrg suppress all normal output, redirect it to `/dev/null' (any error 221bd1da9d7Smrg messages will still be shown). 222bd1da9d7Smrg 223bd1da9d7Smrg`--srcdir=DIR' 224bd1da9d7Smrg Look for the package's source code in directory DIR. Usually 225bd1da9d7Smrg `configure' can determine that directory automatically. 226bd1da9d7Smrg 227bd1da9d7Smrg`configure' also accepts some other, not widely useful, options. Run 228bd1da9d7Smrg`configure --help' for more details. 229bd1da9d7Smrg 230