INSTALL revision 186690
1186690SobrienInstallation Instructions 2186690Sobrien************************* 3186690Sobrien 4186690SobrienCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5186690Sobrien2006 Free Software Foundation, Inc. 6186690Sobrien 7186690SobrienThis file is free documentation; the Free Software Foundation gives 8186690Sobrienunlimited permission to copy, distribute and modify it. 9186690Sobrien 10186690SobrienBasic Installation 11186690Sobrien================== 12186690Sobrien 13186690SobrienBriefly, the shell commands `./configure; make; make install' should 14186690Sobrienconfigure, build, and install this package. The following 15186690Sobrienmore-detailed instructions are generic; see the `README' file for 16186690Sobrieninstructions specific to this package. 17186690Sobrien 18186690Sobrien The `configure' shell script attempts to guess correct values for 19186690Sobrienvarious system-dependent variables used during compilation. It uses 20186690Sobrienthose values to create a `Makefile' in each directory of the package. 21186690SobrienIt may also create one or more `.h' files containing system-dependent 22186690Sobriendefinitions. Finally, it creates a shell script `config.status' that 23186690Sobrienyou can run in the future to recreate the current configuration, and a 24186690Sobrienfile `config.log' containing compiler output (useful mainly for 25186690Sobriendebugging `configure'). 26186690Sobrien 27186690Sobrien It can also use an optional file (typically called `config.cache' 28186690Sobrienand enabled with `--cache-file=config.cache' or simply `-C') that saves 29186690Sobrienthe results of its tests to speed up reconfiguring. Caching is 30186690Sobriendisabled by default to prevent problems with accidental use of stale 31186690Sobriencache files. 32186690Sobrien 33186690Sobrien If you need to do unusual things to compile the package, please try 34186690Sobriento figure out how `configure' could check whether to do them, and mail 35186690Sobriendiffs or instructions to the address given in the `README' so they can 36186690Sobrienbe considered for the next release. If you are using the cache, and at 37186690Sobriensome point `config.cache' contains results you don't want to keep, you 38186690Sobrienmay remove or edit it. 39186690Sobrien 40186690Sobrien The file `configure.ac' (or `configure.in') is used to create 41186690Sobrien`configure' by a program called `autoconf'. You need `configure.ac' if 42186690Sobrienyou want to change it or regenerate `configure' using a newer version 43186690Sobrienof `autoconf'. 44186690Sobrien 45186690SobrienThe simplest way to compile this package is: 46186690Sobrien 47186690Sobrien 1. `cd' to the directory containing the package's source code and type 48186690Sobrien `./configure' to configure the package for your system. 49186690Sobrien 50186690Sobrien Running `configure' might take a while. While running, it prints 51186690Sobrien some messages telling which features it is checking for. 52186690Sobrien 53186690Sobrien 2. Type `make' to compile the package. 54186690Sobrien 55186690Sobrien 3. Optionally, type `make check' to run any self-tests that come with 56186690Sobrien the package. 57186690Sobrien 58186690Sobrien 4. Type `make install' to install the programs and any data files and 59186690Sobrien documentation. 60186690Sobrien 61186690Sobrien 5. You can remove the program binaries and object files from the 62186690Sobrien source code directory by typing `make clean'. To also remove the 63186690Sobrien files that `configure' created (so you can compile the package for 64186690Sobrien a different kind of computer), type `make distclean'. There is 65186690Sobrien also a `make maintainer-clean' target, but that is intended mainly 66186690Sobrien for the package's developers. If you use it, you may have to get 67186690Sobrien all sorts of other programs in order to regenerate files that came 68186690Sobrien with the distribution. 69186690Sobrien 70186690SobrienCompilers and Options 71186690Sobrien===================== 72186690Sobrien 73186690SobrienSome systems require unusual options for compilation or linking that the 74186690Sobrien`configure' script does not know about. Run `./configure --help' for 75186690Sobriendetails on some of the pertinent environment variables. 76186690Sobrien 77186690Sobrien You can give `configure' initial values for configuration parameters 78186690Sobrienby setting variables in the command line or in the environment. Here 79186690Sobrienis an example: 80186690Sobrien 81186690Sobrien ./configure CC=c99 CFLAGS=-g LIBS=-lposix 82186690Sobrien 83186690Sobrien *Note Defining Variables::, for more details. 84186690Sobrien 85186690SobrienCompiling For Multiple Architectures 86186690Sobrien==================================== 87186690Sobrien 88186690SobrienYou can compile the package for more than one kind of computer at the 89186690Sobriensame time, by placing the object files for each architecture in their 90186690Sobrienown directory. To do this, you can use GNU `make'. `cd' to the 91186690Sobriendirectory where you want the object files and executables to go and run 92186690Sobrienthe `configure' script. `configure' automatically checks for the 93186690Sobriensource code in the directory that `configure' is in and in `..'. 94186690Sobrien 95186690Sobrien With a non-GNU `make', it is safer to compile the package for one 96186690Sobrienarchitecture at a time in the source code directory. After you have 97186690Sobrieninstalled the package for one architecture, use `make distclean' before 98186690Sobrienreconfiguring for another architecture. 99186690Sobrien 100186690SobrienInstallation Names 101186690Sobrien================== 102186690Sobrien 103186690SobrienBy default, `make install' installs the package's commands under 104186690Sobrien`/usr/local/bin', include files under `/usr/local/include', etc. You 105186690Sobriencan specify an installation prefix other than `/usr/local' by giving 106186690Sobrien`configure' the option `--prefix=PREFIX'. 107186690Sobrien 108186690Sobrien You can specify separate installation prefixes for 109186690Sobrienarchitecture-specific files and architecture-independent files. If you 110186690Sobrienpass the option `--exec-prefix=PREFIX' to `configure', the package uses 111186690SobrienPREFIX as the prefix for installing programs and libraries. 112186690SobrienDocumentation and other data files still use the regular prefix. 113186690Sobrien 114186690Sobrien In addition, if you use an unusual directory layout you can give 115186690Sobrienoptions like `--bindir=DIR' to specify different values for particular 116186690Sobrienkinds of files. Run `configure --help' for a list of the directories 117186690Sobrienyou can set and what kinds of files go in them. 118186690Sobrien 119186690Sobrien If the package supports it, you can cause programs to be installed 120186690Sobrienwith an extra prefix or suffix on their names by giving `configure' the 121186690Sobrienoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 122186690Sobrien 123186690SobrienOptional Features 124186690Sobrien================= 125186690Sobrien 126186690SobrienSome packages pay attention to `--enable-FEATURE' options to 127186690Sobrien`configure', where FEATURE indicates an optional part of the package. 128186690SobrienThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 129186690Sobrienis something like `gnu-as' or `x' (for the X Window System). The 130186690Sobrien`README' should mention any `--enable-' and `--with-' options that the 131186690Sobrienpackage recognizes. 132186690Sobrien 133186690Sobrien For packages that use the X Window System, `configure' can usually 134186690Sobrienfind the X include and library files automatically, but if it doesn't, 135186690Sobrienyou can use the `configure' options `--x-includes=DIR' and 136186690Sobrien`--x-libraries=DIR' to specify their locations. 137186690Sobrien 138186690SobrienSpecifying the System Type 139186690Sobrien========================== 140186690Sobrien 141186690SobrienThere may be some features `configure' cannot figure out automatically, 142186690Sobrienbut needs to determine by the type of machine the package will run on. 143186690SobrienUsually, assuming the package is built to be run on the _same_ 144186690Sobrienarchitectures, `configure' can figure that out, but if it prints a 145186690Sobrienmessage saying it cannot guess the machine type, give it the 146186690Sobrien`--build=TYPE' option. TYPE can either be a short name for the system 147186690Sobrientype, such as `sun4', or a canonical name which has the form: 148186690Sobrien 149186690Sobrien CPU-COMPANY-SYSTEM 150186690Sobrien 151186690Sobrienwhere SYSTEM can have one of these forms: 152186690Sobrien 153186690Sobrien OS KERNEL-OS 154186690Sobrien 155186690Sobrien See the file `config.sub' for the possible values of each field. If 156186690Sobrien`config.sub' isn't included in this package, then this package doesn't 157186690Sobrienneed to know the machine type. 158186690Sobrien 159186690Sobrien If you are _building_ compiler tools for cross-compiling, you should 160186690Sobrienuse the option `--target=TYPE' to select the type of system they will 161186690Sobrienproduce code for. 162186690Sobrien 163186690Sobrien If you want to _use_ a cross compiler, that generates code for a 164186690Sobrienplatform different from the build platform, you should specify the 165186690Sobrien"host" platform (i.e., that on which the generated programs will 166186690Sobrieneventually be run) with `--host=TYPE'. 167186690Sobrien 168186690SobrienSharing Defaults 169186690Sobrien================ 170186690Sobrien 171186690SobrienIf you want to set default values for `configure' scripts to share, you 172186690Sobriencan create a site shell script called `config.site' that gives default 173186690Sobrienvalues for variables like `CC', `cache_file', and `prefix'. 174186690Sobrien`configure' looks for `PREFIX/share/config.site' if it exists, then 175186690Sobrien`PREFIX/etc/config.site' if it exists. Or, you can set the 176186690Sobrien`CONFIG_SITE' environment variable to the location of the site script. 177186690SobrienA warning: not all `configure' scripts look for a site script. 178186690Sobrien 179186690SobrienDefining Variables 180186690Sobrien================== 181186690Sobrien 182186690SobrienVariables not defined in a site shell script can be set in the 183186690Sobrienenvironment passed to `configure'. However, some packages may run 184186690Sobrienconfigure again during the build, and the customized values of these 185186690Sobrienvariables may be lost. In order to avoid this problem, you should set 186186690Sobrienthem in the `configure' command line, using `VAR=value'. For example: 187186690Sobrien 188186690Sobrien ./configure CC=/usr/local2/bin/gcc 189186690Sobrien 190186690Sobriencauses the specified `gcc' to be used as the C compiler (unless it is 191186690Sobrienoverridden in the site shell script). 192186690Sobrien 193186690SobrienUnfortunately, this technique does not work for `CONFIG_SHELL' due to 194186690Sobrienan Autoconf bug. Until the bug is fixed you can use this workaround: 195186690Sobrien 196186690Sobrien CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 197186690Sobrien 198186690Sobrien`configure' Invocation 199186690Sobrien====================== 200186690Sobrien 201186690Sobrien`configure' recognizes the following options to control how it operates. 202186690Sobrien 203186690Sobrien`--help' 204186690Sobrien`-h' 205186690Sobrien Print a summary of the options to `configure', and exit. 206186690Sobrien 207186690Sobrien`--version' 208186690Sobrien`-V' 209186690Sobrien Print the version of Autoconf used to generate the `configure' 210186690Sobrien script, and exit. 211186690Sobrien 212186690Sobrien`--cache-file=FILE' 213186690Sobrien Enable the cache: use and save the results of the tests in FILE, 214186690Sobrien traditionally `config.cache'. FILE defaults to `/dev/null' to 215186690Sobrien disable caching. 216186690Sobrien 217186690Sobrien`--config-cache' 218186690Sobrien`-C' 219186690Sobrien Alias for `--cache-file=config.cache'. 220186690Sobrien 221186690Sobrien`--quiet' 222186690Sobrien`--silent' 223186690Sobrien`-q' 224186690Sobrien Do not print messages saying which checks are being made. To 225186690Sobrien suppress all normal output, redirect it to `/dev/null' (any error 226186690Sobrien messages will still be shown). 227186690Sobrien 228186690Sobrien`--srcdir=DIR' 229186690Sobrien Look for the package's source code in directory DIR. Usually 230186690Sobrien `configure' can determine that directory automatically. 231186690Sobrien 232186690Sobrien`configure' also accepts some other, not widely useful, options. Run 233186690Sobrien`configure --help' for more details. 234186690Sobrien 235