INSTALL revision 251886
1213277SgonzoInstallation Instructions 2213277Sgonzo************************* 3213277Sgonzo 4213277SgonzoCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free 5213277SgonzoSoftware Foundation, Inc. 6213277Sgonzo 7213277SgonzoThis file is free documentation; the Free Software Foundation gives 8213277Sgonzounlimited permission to copy, distribute and modify it. 9213277Sgonzo 10213277SgonzoBasic Installation 11213277Sgonzo================== 12213277Sgonzo 13213277SgonzoThese are generic installation instructions. 14213277Sgonzo 15213277Sgonzo The `configure' shell script attempts to guess correct values for 16213277Sgonzovarious system-dependent variables used during compilation. It uses 17213277Sgonzothose values to create a `Makefile' in each directory of the package. 18213277SgonzoIt may also create one or more `.h' files containing system-dependent 19213277Sgonzodefinitions. Finally, it creates a shell script `config.status' that 20213277Sgonzoyou can run in the future to recreate the current configuration, and a 21213277Sgonzofile `config.log' containing compiler output (useful mainly for 22213277Sgonzodebugging `configure'). 23213277Sgonzo 24213277Sgonzo It can also use an optional file (typically called `config.cache' 25213277Sgonzoand enabled with `--cache-file=config.cache' or simply `-C') that saves 26213277Sgonzothe results of its tests to speed up reconfiguring. (Caching is 27213237Sgonzodisabled by default to prevent problems with accidental use of stale 28213237Sgonzocache files.) 29213237Sgonzo 30213237Sgonzo If you need to do unusual things to compile the package, please try 31213237Sgonzoto figure out how `configure' could check whether to do them, and mail 32213237Sgonzodiffs or instructions to the address given in the `README' so they can 33213237Sgonzobe considered for the next release. If you are using the cache, and at 34213237Sgonzosome point `config.cache' contains results you don't want to keep, you 35213237Sgonzomay remove or edit it. 36213237Sgonzo 37213237Sgonzo The file `configure.ac' (or `configure.in') is used to create 38213237Sgonzo`configure' by a program called `autoconf'. You only need 39213237Sgonzo`configure.ac' if you want to change it or regenerate `configure' using 40213237Sgonzoa newer version of `autoconf'. 41213237Sgonzo 42213237SgonzoThe simplest way to compile this package is: 43213237Sgonzo 44213237Sgonzo 1. `cd' to the directory containing the package's source code and type 45213237Sgonzo `./configure' to configure the package for your system. If you're 46213237Sgonzo using `csh' on an old version of System V, you might need to type 47213237Sgonzo `sh ./configure' instead to prevent `csh' from trying to execute 48213237Sgonzo `configure' itself. 49213237Sgonzo 50213237Sgonzo Running `configure' takes awhile. While running, it prints some 51213237Sgonzo messages telling which features it is checking for. 52213237Sgonzo 53213237Sgonzo 2. Type `make' to compile the package. 54213237Sgonzo 55213237Sgonzo 3. Optionally, type `make check' to run any self-tests that come with 56213237Sgonzo the package. 57213237Sgonzo 58213237Sgonzo 4. Type `make install' to install the programs and any data files and 59213237Sgonzo documentation. 60213237Sgonzo 61213237Sgonzo 5. You can remove the program binaries and object files from the 62213237Sgonzo source code directory by typing `make clean'. To also remove the 63213237Sgonzo files that `configure' created (so you can compile the package for 64213237Sgonzo a different kind of computer), type `make distclean'. There is 65213237Sgonzo also a `make maintainer-clean' target, but that is intended mainly 66213237Sgonzo for the package's developers. If you use it, you may have to get 67213237Sgonzo all sorts of other programs in order to regenerate files that came 68213237Sgonzo with the distribution. 69213237Sgonzo 70213237SgonzoCompilers and Options 71213237Sgonzo===================== 72213237Sgonzo 73213237SgonzoSome systems require unusual options for compilation or linking that the 74213237Sgonzo`configure' script does not know about. Run `./configure --help' for 75213237Sgonzodetails on some of the pertinent environment variables. 76213237Sgonzo 77213237Sgonzo You can give `configure' initial values for configuration parameters 78213237Sgonzoby setting variables in the command line or in the environment. Here 79213237Sgonzois an example: 80213237Sgonzo 81213237Sgonzo ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 82213237Sgonzo 83213237Sgonzo *Note Defining Variables::, for more details. 84213237Sgonzo 85213237SgonzoCompiling For Multiple Architectures 86213237Sgonzo==================================== 87213237Sgonzo 88213237SgonzoYou can compile the package for more than one kind of computer at the 89213237Sgonzosame time, by placing the object files for each architecture in their 90213237Sgonzoown directory. To do this, you must use a version of `make' that 91213237Sgonzosupports the `VPATH' variable, such as GNU `make'. `cd' to the 92213237Sgonzodirectory where you want the object files and executables to go and run 93213237Sgonzothe `configure' script. `configure' automatically checks for the 94213237Sgonzosource code in the directory that `configure' is in and in `..'. 95213237Sgonzo 96213237Sgonzo If you have to use a `make' that does not support the `VPATH' 97213237Sgonzovariable, you have to compile the package for one architecture at a 98213237Sgonzotime in the source code directory. After you have installed the 99213237Sgonzopackage for one architecture, use `make distclean' before reconfiguring 100213237Sgonzofor another architecture. 101213237Sgonzo 102213237SgonzoInstallation Names 103213237Sgonzo================== 104213237Sgonzo 105213237SgonzoBy default, `make install' installs the package's commands under 106213237Sgonzo`/usr/local/bin', include files under `/usr/local/include', etc. You 107213237Sgonzocan specify an installation prefix other than `/usr/local' by giving 108213237Sgonzo`configure' the option `--prefix=PREFIX'. 109213237Sgonzo 110213237Sgonzo You can specify separate installation prefixes for 111213237Sgonzoarchitecture-specific files and architecture-independent files. If you 112213237Sgonzopass the option `--exec-prefix=PREFIX' to `configure', the package uses 113213237SgonzoPREFIX as the prefix for installing programs and libraries. 114213237SgonzoDocumentation and other data files still use the regular prefix. 115213237Sgonzo 116213237Sgonzo In addition, if you use an unusual directory layout you can give 117213237Sgonzooptions like `--bindir=DIR' to specify different values for particular 118213237Sgonzokinds of files. Run `configure --help' for a list of the directories 119213237Sgonzoyou can set and what kinds of files go in them. 120213237Sgonzo 121213237Sgonzo If the package supports it, you can cause programs to be installed 122213237Sgonzowith an extra prefix or suffix on their names by giving `configure' the 123213237Sgonzooption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 124213237Sgonzo 125213237SgonzoOptional Features 126213237Sgonzo================= 127213237Sgonzo 128213237SgonzoSome packages pay attention to `--enable-FEATURE' options to 129213237Sgonzo`configure', where FEATURE indicates an optional part of the package. 130213237SgonzoThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 131213237Sgonzois something like `gnu-as' or `x' (for the X Window System). The 132213237Sgonzo`README' should mention any `--enable-' and `--with-' options that the 133213237Sgonzopackage recognizes. 134213237Sgonzo 135213237Sgonzo For packages that use the X Window System, `configure' can usually 136213237Sgonzofind the X include and library files automatically, but if it doesn't, 137213237Sgonzoyou can use the `configure' options `--x-includes=DIR' and 138213237Sgonzo`--x-libraries=DIR' to specify their locations. 139213237Sgonzo 140213237SgonzoSpecifying the System Type 141213237Sgonzo========================== 142213237Sgonzo 143213237SgonzoThere may be some features `configure' cannot figure out automatically, 144213237Sgonzobut needs to determine by the type of machine the package will run on. 145213237SgonzoUsually, assuming the package is built to be run on the _same_ 146213237Sgonzoarchitectures, `configure' can figure that out, but if it prints a 147213237Sgonzomessage saying it cannot guess the machine type, give it the 148213237Sgonzo`--build=TYPE' option. TYPE can either be a short name for the system 149213237Sgonzotype, such as `sun4', or a canonical name which has the form: 150213237Sgonzo 151213237Sgonzo CPU-COMPANY-SYSTEM 152213237Sgonzo 153213237Sgonzowhere SYSTEM can have one of these forms: 154213237Sgonzo 155213237Sgonzo OS KERNEL-OS 156213237Sgonzo 157213237Sgonzo See the file `config.sub' for the possible values of each field. If 158213237Sgonzo`config.sub' isn't included in this package, then this package doesn't 159213237Sgonzoneed to know the machine type. 160213237Sgonzo 161213237Sgonzo If you are _building_ compiler tools for cross-compiling, you should 162213237Sgonzouse the option `--target=TYPE' to select the type of system they will 163213237Sgonzoproduce code for. 164213237Sgonzo 165213237Sgonzo If you want to _use_ a cross compiler, that generates code for a 166213237Sgonzoplatform different from the build platform, you should specify the 167213237Sgonzo"host" platform (i.e., that on which the generated programs will 168213237Sgonzoeventually be run) with `--host=TYPE'. 169213237Sgonzo 170213237SgonzoSharing Defaults 171213237Sgonzo================ 172213237Sgonzo 173213237SgonzoIf you want to set default values for `configure' scripts to share, you 174213237Sgonzocan create a site shell script called `config.site' that gives default 175213237Sgonzovalues for variables like `CC', `cache_file', and `prefix'. 176213237Sgonzo`configure' looks for `PREFIX/share/config.site' if it exists, then 177213237Sgonzo`PREFIX/etc/config.site' if it exists. Or, you can set the 178213237Sgonzo`CONFIG_SITE' environment variable to the location of the site script. 179213237SgonzoA warning: not all `configure' scripts look for a site script. 180213237Sgonzo 181213237SgonzoDefining Variables 182213237Sgonzo================== 183213237Sgonzo 184213237SgonzoVariables not defined in a site shell script can be set in the 185213237Sgonzoenvironment passed to `configure'. However, some packages may run 186213237Sgonzoconfigure again during the build, and the customized values of these 187213237Sgonzovariables may be lost. In order to avoid this problem, you should set 188213237Sgonzothem in the `configure' command line, using `VAR=value'. For example: 189213237Sgonzo 190213237Sgonzo ./configure CC=/usr/local2/bin/gcc 191213237Sgonzo 192213237Sgonzocauses the specified `gcc' to be used as the C compiler (unless it is 193213237Sgonzooverridden in the site shell script). Here is a another example: 194213237Sgonzo 195213237Sgonzo /bin/bash ./configure CONFIG_SHELL=/bin/bash 196213237Sgonzo 197213237SgonzoHere the `CONFIG_SHELL=/bin/bash' operand causes subsequent 198213237Sgonzoconfiguration-related scripts to be executed by `/bin/bash'. 199213237Sgonzo 200213237Sgonzo`configure' Invocation 201====================== 202 203`configure' recognizes the following options to control how it operates. 204 205`--help' 206`-h' 207 Print a summary of the options to `configure', and exit. 208 209`--version' 210`-V' 211 Print the version of Autoconf used to generate the `configure' 212 script, and exit. 213 214`--cache-file=FILE' 215 Enable the cache: use and save the results of the tests in FILE, 216 traditionally `config.cache'. FILE defaults to `/dev/null' to 217 disable caching. 218 219`--config-cache' 220`-C' 221 Alias for `--cache-file=config.cache'. 222 223`--quiet' 224`--silent' 225`-q' 226 Do not print messages saying which checks are being made. To 227 suppress all normal output, redirect it to `/dev/null' (any error 228 messages will still be shown). 229 230`--srcdir=DIR' 231 Look for the package's source code in directory DIR. Usually 232 `configure' can determine that directory automatically. 233 234`configure' also accepts some other, not widely useful, options. Run 235`configure --help' for more details. 236 237