1*7ab6e6acSAndroid Build Coastguard WorkerInstallation Instructions 2*7ab6e6acSAndroid Build Coastguard Worker************************* 3*7ab6e6acSAndroid Build Coastguard Worker 4*7ab6e6acSAndroid Build Coastguard WorkerCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free 5*7ab6e6acSAndroid Build Coastguard WorkerSoftware Foundation, Inc. 6*7ab6e6acSAndroid Build Coastguard Worker 7*7ab6e6acSAndroid Build Coastguard WorkerThis file is free documentation; the Free Software Foundation gives 8*7ab6e6acSAndroid Build Coastguard Workerunlimited permission to copy, distribute and modify it. 9*7ab6e6acSAndroid Build Coastguard Worker 10*7ab6e6acSAndroid Build Coastguard WorkerBasic Installation 11*7ab6e6acSAndroid Build Coastguard Worker================== 12*7ab6e6acSAndroid Build Coastguard Worker 13*7ab6e6acSAndroid Build Coastguard WorkerThese are generic installation instructions. 14*7ab6e6acSAndroid Build Coastguard Worker 15*7ab6e6acSAndroid Build Coastguard Worker The `configure' shell script attempts to guess correct values for 16*7ab6e6acSAndroid Build Coastguard Workervarious system-dependent variables used during compilation. It uses 17*7ab6e6acSAndroid Build Coastguard Workerthose values to create a `Makefile' in each directory of the package. 18*7ab6e6acSAndroid Build Coastguard WorkerIt may also create one or more `.h' files containing system-dependent 19*7ab6e6acSAndroid Build Coastguard Workerdefinitions. Finally, it creates a shell script `config.status' that 20*7ab6e6acSAndroid Build Coastguard Workeryou can run in the future to recreate the current configuration, and a 21*7ab6e6acSAndroid Build Coastguard Workerfile `config.log' containing compiler output (useful mainly for 22*7ab6e6acSAndroid Build Coastguard Workerdebugging `configure'). 23*7ab6e6acSAndroid Build Coastguard Worker 24*7ab6e6acSAndroid Build Coastguard Worker It can also use an optional file (typically called `config.cache' 25*7ab6e6acSAndroid Build Coastguard Workerand enabled with `--cache-file=config.cache' or simply `-C') that saves 26*7ab6e6acSAndroid Build Coastguard Workerthe results of its tests to speed up reconfiguring. (Caching is 27*7ab6e6acSAndroid Build Coastguard Workerdisabled by default to prevent problems with accidental use of stale 28*7ab6e6acSAndroid Build Coastguard Workercache files.) 29*7ab6e6acSAndroid Build Coastguard Worker 30*7ab6e6acSAndroid Build Coastguard Worker If you need to do unusual things to compile the package, please try 31*7ab6e6acSAndroid Build Coastguard Workerto figure out how `configure' could check whether to do them, and mail 32*7ab6e6acSAndroid Build Coastguard Workerdiffs or instructions to the address given in the `README' so they can 33*7ab6e6acSAndroid Build Coastguard Workerbe considered for the next release. If you are using the cache, and at 34*7ab6e6acSAndroid Build Coastguard Workersome point `config.cache' contains results you don't want to keep, you 35*7ab6e6acSAndroid Build Coastguard Workermay remove or edit it. 36*7ab6e6acSAndroid Build Coastguard Worker 37*7ab6e6acSAndroid Build Coastguard Worker The file `configure.ac' (or `configure.in') is used to create 38*7ab6e6acSAndroid Build Coastguard Worker`configure' by a program called `autoconf'. You only need 39*7ab6e6acSAndroid Build Coastguard Worker`configure.ac' if you want to change it or regenerate `configure' using 40*7ab6e6acSAndroid Build Coastguard Workera newer version of `autoconf'. 41*7ab6e6acSAndroid Build Coastguard Worker 42*7ab6e6acSAndroid Build Coastguard WorkerThe simplest way to compile this package is: 43*7ab6e6acSAndroid Build Coastguard Worker 44*7ab6e6acSAndroid Build Coastguard Worker 1. `cd' to the directory containing the package's source code and type 45*7ab6e6acSAndroid Build Coastguard Worker `./configure' to configure the package for your system. If you're 46*7ab6e6acSAndroid Build Coastguard Worker using `csh' on an old version of System V, you might need to type 47*7ab6e6acSAndroid Build Coastguard Worker `sh ./configure' instead to prevent `csh' from trying to execute 48*7ab6e6acSAndroid Build Coastguard Worker `configure' itself. 49*7ab6e6acSAndroid Build Coastguard Worker 50*7ab6e6acSAndroid Build Coastguard Worker Running `configure' takes awhile. While running, it prints some 51*7ab6e6acSAndroid Build Coastguard Worker messages telling which features it is checking for. 52*7ab6e6acSAndroid Build Coastguard Worker 53*7ab6e6acSAndroid Build Coastguard Worker 2. Type `make' to compile the package. 54*7ab6e6acSAndroid Build Coastguard Worker 55*7ab6e6acSAndroid Build Coastguard Worker 3. Optionally, type `make check' to run any self-tests that come with 56*7ab6e6acSAndroid Build Coastguard Worker the package. 57*7ab6e6acSAndroid Build Coastguard Worker 58*7ab6e6acSAndroid Build Coastguard Worker 4. Type `make install' to install the programs and any data files and 59*7ab6e6acSAndroid Build Coastguard Worker documentation. 60*7ab6e6acSAndroid Build Coastguard Worker 61*7ab6e6acSAndroid Build Coastguard Worker 5. You can remove the program binaries and object files from the 62*7ab6e6acSAndroid Build Coastguard Worker source code directory by typing `make clean'. To also remove the 63*7ab6e6acSAndroid Build Coastguard Worker files that `configure' created (so you can compile the package for 64*7ab6e6acSAndroid Build Coastguard Worker a different kind of computer), type `make distclean'. There is 65*7ab6e6acSAndroid Build Coastguard Worker also a `make maintainer-clean' target, but that is intended mainly 66*7ab6e6acSAndroid Build Coastguard Worker for the package's developers. If you use it, you may have to get 67*7ab6e6acSAndroid Build Coastguard Worker all sorts of other programs in order to regenerate files that came 68*7ab6e6acSAndroid Build Coastguard Worker with the distribution. 69*7ab6e6acSAndroid Build Coastguard Worker 70*7ab6e6acSAndroid Build Coastguard WorkerCompilers and Options 71*7ab6e6acSAndroid Build Coastguard Worker===================== 72*7ab6e6acSAndroid Build Coastguard Worker 73*7ab6e6acSAndroid Build Coastguard WorkerSome systems require unusual options for compilation or linking that the 74*7ab6e6acSAndroid Build Coastguard Worker`configure' script does not know about. Run `./configure --help' for 75*7ab6e6acSAndroid Build Coastguard Workerdetails on some of the pertinent environment variables. 76*7ab6e6acSAndroid Build Coastguard Worker 77*7ab6e6acSAndroid Build Coastguard Worker You can give `configure' initial values for configuration parameters 78*7ab6e6acSAndroid Build Coastguard Workerby setting variables in the command line or in the environment. Here 79*7ab6e6acSAndroid Build Coastguard Workeris an example: 80*7ab6e6acSAndroid Build Coastguard Worker 81*7ab6e6acSAndroid Build Coastguard Worker ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 82*7ab6e6acSAndroid Build Coastguard Worker 83*7ab6e6acSAndroid Build Coastguard Worker *Note Defining Variables::, for more details. 84*7ab6e6acSAndroid Build Coastguard Worker 85*7ab6e6acSAndroid Build Coastguard WorkerCompiling For Multiple Architectures 86*7ab6e6acSAndroid Build Coastguard Worker==================================== 87*7ab6e6acSAndroid Build Coastguard Worker 88*7ab6e6acSAndroid Build Coastguard WorkerYou can compile the package for more than one kind of computer at the 89*7ab6e6acSAndroid Build Coastguard Workersame time, by placing the object files for each architecture in their 90*7ab6e6acSAndroid Build Coastguard Workerown directory. To do this, you must use a version of `make' that 91*7ab6e6acSAndroid Build Coastguard Workersupports the `VPATH' variable, such as GNU `make'. `cd' to the 92*7ab6e6acSAndroid Build Coastguard Workerdirectory where you want the object files and executables to go and run 93*7ab6e6acSAndroid Build Coastguard Workerthe `configure' script. `configure' automatically checks for the 94*7ab6e6acSAndroid Build Coastguard Workersource code in the directory that `configure' is in and in `..'. 95*7ab6e6acSAndroid Build Coastguard Worker 96*7ab6e6acSAndroid Build Coastguard Worker If you have to use a `make' that does not support the `VPATH' 97*7ab6e6acSAndroid Build Coastguard Workervariable, you have to compile the package for one architecture at a 98*7ab6e6acSAndroid Build Coastguard Workertime in the source code directory. After you have installed the 99*7ab6e6acSAndroid Build Coastguard Workerpackage for one architecture, use `make distclean' before reconfiguring 100*7ab6e6acSAndroid Build Coastguard Workerfor another architecture. 101*7ab6e6acSAndroid Build Coastguard Worker 102*7ab6e6acSAndroid Build Coastguard WorkerInstallation Names 103*7ab6e6acSAndroid Build Coastguard Worker================== 104*7ab6e6acSAndroid Build Coastguard Worker 105*7ab6e6acSAndroid Build Coastguard WorkerBy default, `make install' installs the package's commands under 106*7ab6e6acSAndroid Build Coastguard Worker`/usr/local/bin', include files under `/usr/local/include', etc. You 107*7ab6e6acSAndroid Build Coastguard Workercan specify an installation prefix other than `/usr/local' by giving 108*7ab6e6acSAndroid Build Coastguard Worker`configure' the option `--prefix=PREFIX'. 109*7ab6e6acSAndroid Build Coastguard Worker 110*7ab6e6acSAndroid Build Coastguard Worker You can specify separate installation prefixes for 111*7ab6e6acSAndroid Build Coastguard Workerarchitecture-specific files and architecture-independent files. If you 112*7ab6e6acSAndroid Build Coastguard Workerpass the option `--exec-prefix=PREFIX' to `configure', the package uses 113*7ab6e6acSAndroid Build Coastguard WorkerPREFIX as the prefix for installing programs and libraries. 114*7ab6e6acSAndroid Build Coastguard WorkerDocumentation and other data files still use the regular prefix. 115*7ab6e6acSAndroid Build Coastguard Worker 116*7ab6e6acSAndroid Build Coastguard Worker In addition, if you use an unusual directory layout you can give 117*7ab6e6acSAndroid Build Coastguard Workeroptions like `--bindir=DIR' to specify different values for particular 118*7ab6e6acSAndroid Build Coastguard Workerkinds of files. Run `configure --help' for a list of the directories 119*7ab6e6acSAndroid Build Coastguard Workeryou can set and what kinds of files go in them. 120*7ab6e6acSAndroid Build Coastguard Worker 121*7ab6e6acSAndroid Build Coastguard Worker If the package supports it, you can cause programs to be installed 122*7ab6e6acSAndroid Build Coastguard Workerwith an extra prefix or suffix on their names by giving `configure' the 123*7ab6e6acSAndroid Build Coastguard Workeroption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 124*7ab6e6acSAndroid Build Coastguard Worker 125*7ab6e6acSAndroid Build Coastguard WorkerOptional Features 126*7ab6e6acSAndroid Build Coastguard Worker================= 127*7ab6e6acSAndroid Build Coastguard Worker 128*7ab6e6acSAndroid Build Coastguard WorkerSome packages pay attention to `--enable-FEATURE' options to 129*7ab6e6acSAndroid Build Coastguard Worker`configure', where FEATURE indicates an optional part of the package. 130*7ab6e6acSAndroid Build Coastguard WorkerThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 131*7ab6e6acSAndroid Build Coastguard Workeris something like `gnu-as' or `x' (for the X Window System). The 132*7ab6e6acSAndroid Build Coastguard Worker`README' should mention any `--enable-' and `--with-' options that the 133*7ab6e6acSAndroid Build Coastguard Workerpackage recognizes. 134*7ab6e6acSAndroid Build Coastguard Worker 135*7ab6e6acSAndroid Build Coastguard Worker For packages that use the X Window System, `configure' can usually 136*7ab6e6acSAndroid Build Coastguard Workerfind the X include and library files automatically, but if it doesn't, 137*7ab6e6acSAndroid Build Coastguard Workeryou can use the `configure' options `--x-includes=DIR' and 138*7ab6e6acSAndroid Build Coastguard Worker`--x-libraries=DIR' to specify their locations. 139*7ab6e6acSAndroid Build Coastguard Worker 140*7ab6e6acSAndroid Build Coastguard WorkerSpecifying the System Type 141*7ab6e6acSAndroid Build Coastguard Worker========================== 142*7ab6e6acSAndroid Build Coastguard Worker 143*7ab6e6acSAndroid Build Coastguard WorkerThere may be some features `configure' cannot figure out automatically, 144*7ab6e6acSAndroid Build Coastguard Workerbut needs to determine by the type of machine the package will run on. 145*7ab6e6acSAndroid Build Coastguard WorkerUsually, assuming the package is built to be run on the _same_ 146*7ab6e6acSAndroid Build Coastguard Workerarchitectures, `configure' can figure that out, but if it prints a 147*7ab6e6acSAndroid Build Coastguard Workermessage saying it cannot guess the machine type, give it the 148*7ab6e6acSAndroid Build Coastguard Worker`--build=TYPE' option. TYPE can either be a short name for the system 149*7ab6e6acSAndroid Build Coastguard Workertype, such as `sun4', or a canonical name which has the form: 150*7ab6e6acSAndroid Build Coastguard Worker 151*7ab6e6acSAndroid Build Coastguard Worker CPU-COMPANY-SYSTEM 152*7ab6e6acSAndroid Build Coastguard Worker 153*7ab6e6acSAndroid Build Coastguard Workerwhere SYSTEM can have one of these forms: 154*7ab6e6acSAndroid Build Coastguard Worker 155*7ab6e6acSAndroid Build Coastguard Worker OS KERNEL-OS 156*7ab6e6acSAndroid Build Coastguard Worker 157*7ab6e6acSAndroid Build Coastguard Worker See the file `config.sub' for the possible values of each field. If 158*7ab6e6acSAndroid Build Coastguard Worker`config.sub' isn't included in this package, then this package doesn't 159*7ab6e6acSAndroid Build Coastguard Workerneed to know the machine type. 160*7ab6e6acSAndroid Build Coastguard Worker 161*7ab6e6acSAndroid Build Coastguard Worker If you are _building_ compiler tools for cross-compiling, you should 162*7ab6e6acSAndroid Build Coastguard Workeruse the option `--target=TYPE' to select the type of system they will 163*7ab6e6acSAndroid Build Coastguard Workerproduce code for. 164*7ab6e6acSAndroid Build Coastguard Worker 165*7ab6e6acSAndroid Build Coastguard Worker If you want to _use_ a cross compiler, that generates code for a 166*7ab6e6acSAndroid Build Coastguard Workerplatform different from the build platform, you should specify the 167*7ab6e6acSAndroid Build Coastguard Worker"host" platform (i.e., that on which the generated programs will 168*7ab6e6acSAndroid Build Coastguard Workereventually be run) with `--host=TYPE'. 169*7ab6e6acSAndroid Build Coastguard Worker 170*7ab6e6acSAndroid Build Coastguard WorkerSharing Defaults 171*7ab6e6acSAndroid Build Coastguard Worker================ 172*7ab6e6acSAndroid Build Coastguard Worker 173*7ab6e6acSAndroid Build Coastguard WorkerIf you want to set default values for `configure' scripts to share, you 174*7ab6e6acSAndroid Build Coastguard Workercan create a site shell script called `config.site' that gives default 175*7ab6e6acSAndroid Build Coastguard Workervalues for variables like `CC', `cache_file', and `prefix'. 176*7ab6e6acSAndroid Build Coastguard Worker`configure' looks for `PREFIX/share/config.site' if it exists, then 177*7ab6e6acSAndroid Build Coastguard Worker`PREFIX/etc/config.site' if it exists. Or, you can set the 178*7ab6e6acSAndroid Build Coastguard Worker`CONFIG_SITE' environment variable to the location of the site script. 179*7ab6e6acSAndroid Build Coastguard WorkerA warning: not all `configure' scripts look for a site script. 180*7ab6e6acSAndroid Build Coastguard Worker 181*7ab6e6acSAndroid Build Coastguard WorkerDefining Variables 182*7ab6e6acSAndroid Build Coastguard Worker================== 183*7ab6e6acSAndroid Build Coastguard Worker 184*7ab6e6acSAndroid Build Coastguard WorkerVariables not defined in a site shell script can be set in the 185*7ab6e6acSAndroid Build Coastguard Workerenvironment passed to `configure'. However, some packages may run 186*7ab6e6acSAndroid Build Coastguard Workerconfigure again during the build, and the customized values of these 187*7ab6e6acSAndroid Build Coastguard Workervariables may be lost. In order to avoid this problem, you should set 188*7ab6e6acSAndroid Build Coastguard Workerthem in the `configure' command line, using `VAR=value'. For example: 189*7ab6e6acSAndroid Build Coastguard Worker 190*7ab6e6acSAndroid Build Coastguard Worker ./configure CC=/usr/local2/bin/gcc 191*7ab6e6acSAndroid Build Coastguard Worker 192*7ab6e6acSAndroid Build Coastguard Workercauses the specified `gcc' to be used as the C compiler (unless it is 193*7ab6e6acSAndroid Build Coastguard Workeroverridden in the site shell script). Here is a another example: 194*7ab6e6acSAndroid Build Coastguard Worker 195*7ab6e6acSAndroid Build Coastguard Worker /bin/bash ./configure CONFIG_SHELL=/bin/bash 196*7ab6e6acSAndroid Build Coastguard Worker 197*7ab6e6acSAndroid Build Coastguard WorkerHere the `CONFIG_SHELL=/bin/bash' operand causes subsequent 198*7ab6e6acSAndroid Build Coastguard Workerconfiguration-related scripts to be executed by `/bin/bash'. 199*7ab6e6acSAndroid Build Coastguard Worker 200*7ab6e6acSAndroid Build Coastguard Worker`configure' Invocation 201*7ab6e6acSAndroid Build Coastguard Worker====================== 202*7ab6e6acSAndroid Build Coastguard Worker 203*7ab6e6acSAndroid Build Coastguard Worker`configure' recognizes the following options to control how it operates. 204*7ab6e6acSAndroid Build Coastguard Worker 205*7ab6e6acSAndroid Build Coastguard Worker`--help' 206*7ab6e6acSAndroid Build Coastguard Worker`-h' 207*7ab6e6acSAndroid Build Coastguard Worker Print a summary of the options to `configure', and exit. 208*7ab6e6acSAndroid Build Coastguard Worker 209*7ab6e6acSAndroid Build Coastguard Worker`--version' 210*7ab6e6acSAndroid Build Coastguard Worker`-V' 211*7ab6e6acSAndroid Build Coastguard Worker Print the version of Autoconf used to generate the `configure' 212*7ab6e6acSAndroid Build Coastguard Worker script, and exit. 213*7ab6e6acSAndroid Build Coastguard Worker 214*7ab6e6acSAndroid Build Coastguard Worker`--cache-file=FILE' 215*7ab6e6acSAndroid Build Coastguard Worker Enable the cache: use and save the results of the tests in FILE, 216*7ab6e6acSAndroid Build Coastguard Worker traditionally `config.cache'. FILE defaults to `/dev/null' to 217*7ab6e6acSAndroid Build Coastguard Worker disable caching. 218*7ab6e6acSAndroid Build Coastguard Worker 219*7ab6e6acSAndroid Build Coastguard Worker`--config-cache' 220*7ab6e6acSAndroid Build Coastguard Worker`-C' 221*7ab6e6acSAndroid Build Coastguard Worker Alias for `--cache-file=config.cache'. 222*7ab6e6acSAndroid Build Coastguard Worker 223*7ab6e6acSAndroid Build Coastguard Worker`--quiet' 224*7ab6e6acSAndroid Build Coastguard Worker`--silent' 225*7ab6e6acSAndroid Build Coastguard Worker`-q' 226*7ab6e6acSAndroid Build Coastguard Worker Do not print messages saying which checks are being made. To 227*7ab6e6acSAndroid Build Coastguard Worker suppress all normal output, redirect it to `/dev/null' (any error 228*7ab6e6acSAndroid Build Coastguard Worker messages will still be shown). 229*7ab6e6acSAndroid Build Coastguard Worker 230*7ab6e6acSAndroid Build Coastguard Worker`--srcdir=DIR' 231*7ab6e6acSAndroid Build Coastguard Worker Look for the package's source code in directory DIR. Usually 232*7ab6e6acSAndroid Build Coastguard Worker `configure' can determine that directory automatically. 233*7ab6e6acSAndroid Build Coastguard Worker 234*7ab6e6acSAndroid Build Coastguard Worker`configure' also accepts some other, not widely useful, options. Run 235*7ab6e6acSAndroid Build Coastguard Worker`configure --help' for more details. 236*7ab6e6acSAndroid Build Coastguard Worker 237