1*4882a593SmuzhiyunInstallation Instructions 2*4882a593Smuzhiyun************************* 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5*4882a593Smuzhiyun2006, 2007 Free Software Foundation, Inc. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis file is free documentation; the Free Software Foundation gives 8*4882a593Smuzhiyununlimited permission to copy, distribute and modify it. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunBasic Installation 11*4882a593Smuzhiyun================== 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunBriefly, the shell commands `./configure; make; make install' should 14*4882a593Smuzhiyunconfigure, build, and install this package. The following 15*4882a593Smuzhiyunmore-detailed instructions are generic; see the `README' file for 16*4882a593Smuzhiyuninstructions specific to this package. 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun The `configure' shell script attempts to guess correct values for 19*4882a593Smuzhiyunvarious system-dependent variables used during compilation. It uses 20*4882a593Smuzhiyunthose values to create a `Makefile' in each directory of the package. 21*4882a593SmuzhiyunIt may also create one or more `.h' files containing system-dependent 22*4882a593Smuzhiyundefinitions. Finally, it creates a shell script `config.status' that 23*4882a593Smuzhiyunyou can run in the future to recreate the current configuration, and a 24*4882a593Smuzhiyunfile `config.log' containing compiler output (useful mainly for 25*4882a593Smuzhiyundebugging `configure'). 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun It can also use an optional file (typically called `config.cache' 28*4882a593Smuzhiyunand enabled with `--cache-file=config.cache' or simply `-C') that saves 29*4882a593Smuzhiyunthe results of its tests to speed up reconfiguring. Caching is 30*4882a593Smuzhiyundisabled by default to prevent problems with accidental use of stale 31*4882a593Smuzhiyuncache files. 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun If you need to do unusual things to compile the package, please try 34*4882a593Smuzhiyunto figure out how `configure' could check whether to do them, and mail 35*4882a593Smuzhiyundiffs or instructions to the address given in the `README' so they can 36*4882a593Smuzhiyunbe considered for the next release. If you are using the cache, and at 37*4882a593Smuzhiyunsome point `config.cache' contains results you don't want to keep, you 38*4882a593Smuzhiyunmay remove or edit it. 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun The file `configure.ac' (or `configure.in') is used to create 41*4882a593Smuzhiyun`configure' by a program called `autoconf'. You need `configure.ac' if 42*4882a593Smuzhiyunyou want to change it or regenerate `configure' using a newer version 43*4882a593Smuzhiyunof `autoconf'. 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunThe simplest way to compile this package is: 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun 1. `cd' to the directory containing the package's source code and type 48*4882a593Smuzhiyun `./configure' to configure the package for your system. 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun Running `configure' might take a while. While running, it prints 51*4882a593Smuzhiyun some messages telling which features it is checking for. 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun 2. Type `make' to compile the package. 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun 3. Optionally, type `make check' to run any self-tests that come with 56*4882a593Smuzhiyun the package. 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun 4. Type `make install' to install the programs and any data files and 59*4882a593Smuzhiyun documentation. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun 5. You can remove the program binaries and object files from the 62*4882a593Smuzhiyun source code directory by typing `make clean'. To also remove the 63*4882a593Smuzhiyun files that `configure' created (so you can compile the package for 64*4882a593Smuzhiyun a different kind of computer), type `make distclean'. There is 65*4882a593Smuzhiyun also a `make maintainer-clean' target, but that is intended mainly 66*4882a593Smuzhiyun for the package's developers. If you use it, you may have to get 67*4882a593Smuzhiyun all sorts of other programs in order to regenerate files that came 68*4882a593Smuzhiyun with the distribution. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun 6. Often, you can also type `make uninstall' to remove the installed 71*4882a593Smuzhiyun files again. 72*4882a593Smuzhiyun 73*4882a593SmuzhiyunCompilers and Options 74*4882a593Smuzhiyun===================== 75*4882a593Smuzhiyun 76*4882a593SmuzhiyunSome systems require unusual options for compilation or linking that the 77*4882a593Smuzhiyun`configure' script does not know about. Run `./configure --help' for 78*4882a593Smuzhiyundetails on some of the pertinent environment variables. 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun You can give `configure' initial values for configuration parameters 81*4882a593Smuzhiyunby setting variables in the command line or in the environment. Here 82*4882a593Smuzhiyunis an example: 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun *Note Defining Variables::, for more details. 87*4882a593Smuzhiyun 88*4882a593SmuzhiyunCompiling For Multiple Architectures 89*4882a593Smuzhiyun==================================== 90*4882a593Smuzhiyun 91*4882a593SmuzhiyunYou can compile the package for more than one kind of computer at the 92*4882a593Smuzhiyunsame time, by placing the object files for each architecture in their 93*4882a593Smuzhiyunown directory. To do this, you can use GNU `make'. `cd' to the 94*4882a593Smuzhiyundirectory where you want the object files and executables to go and run 95*4882a593Smuzhiyunthe `configure' script. `configure' automatically checks for the 96*4882a593Smuzhiyunsource code in the directory that `configure' is in and in `..'. 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun With a non-GNU `make', it is safer to compile the package for one 99*4882a593Smuzhiyunarchitecture at a time in the source code directory. After you have 100*4882a593Smuzhiyuninstalled the package for one architecture, use `make distclean' before 101*4882a593Smuzhiyunreconfiguring for another architecture. 102*4882a593Smuzhiyun 103*4882a593SmuzhiyunInstallation Names 104*4882a593Smuzhiyun================== 105*4882a593Smuzhiyun 106*4882a593SmuzhiyunBy default, `make install' installs the package's commands under 107*4882a593Smuzhiyun`/usr/local/bin', include files under `/usr/local/include', etc. You 108*4882a593Smuzhiyuncan specify an installation prefix other than `/usr/local' by giving 109*4882a593Smuzhiyun`configure' the option `--prefix=PREFIX'. 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun You can specify separate installation prefixes for 112*4882a593Smuzhiyunarchitecture-specific files and architecture-independent files. If you 113*4882a593Smuzhiyunpass the option `--exec-prefix=PREFIX' to `configure', the package uses 114*4882a593SmuzhiyunPREFIX as the prefix for installing programs and libraries. 115*4882a593SmuzhiyunDocumentation and other data files still use the regular prefix. 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun In addition, if you use an unusual directory layout you can give 118*4882a593Smuzhiyunoptions like `--bindir=DIR' to specify different values for particular 119*4882a593Smuzhiyunkinds of files. Run `configure --help' for a list of the directories 120*4882a593Smuzhiyunyou can set and what kinds of files go in them. 121*4882a593Smuzhiyun 122*4882a593Smuzhiyun If the package supports it, you can cause programs to be installed 123*4882a593Smuzhiyunwith an extra prefix or suffix on their names by giving `configure' the 124*4882a593Smuzhiyunoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 125*4882a593Smuzhiyun 126*4882a593SmuzhiyunOptional Features 127*4882a593Smuzhiyun================= 128*4882a593Smuzhiyun 129*4882a593SmuzhiyunSome packages pay attention to `--enable-FEATURE' options to 130*4882a593Smuzhiyun`configure', where FEATURE indicates an optional part of the package. 131*4882a593SmuzhiyunThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 132*4882a593Smuzhiyunis something like `gnu-as' or `x' (for the X Window System). The 133*4882a593Smuzhiyun`README' should mention any `--enable-' and `--with-' options that the 134*4882a593Smuzhiyunpackage recognizes. 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun For packages that use the X Window System, `configure' can usually 137*4882a593Smuzhiyunfind the X include and library files automatically, but if it doesn't, 138*4882a593Smuzhiyunyou can use the `configure' options `--x-includes=DIR' and 139*4882a593Smuzhiyun`--x-libraries=DIR' to specify their locations. 140*4882a593Smuzhiyun 141*4882a593SmuzhiyunSpecifying the System Type 142*4882a593Smuzhiyun========================== 143*4882a593Smuzhiyun 144*4882a593SmuzhiyunThere may be some features `configure' cannot figure out automatically, 145*4882a593Smuzhiyunbut needs to determine by the type of machine the package will run on. 146*4882a593SmuzhiyunUsually, assuming the package is built to be run on the _same_ 147*4882a593Smuzhiyunarchitectures, `configure' can figure that out, but if it prints a 148*4882a593Smuzhiyunmessage saying it cannot guess the machine type, give it the 149*4882a593Smuzhiyun`--build=TYPE' option. TYPE can either be a short name for the system 150*4882a593Smuzhiyuntype, such as `sun4', or a canonical name which has the form: 151*4882a593Smuzhiyun 152*4882a593Smuzhiyun CPU-COMPANY-SYSTEM 153*4882a593Smuzhiyun 154*4882a593Smuzhiyunwhere SYSTEM can have one of these forms: 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun OS KERNEL-OS 157*4882a593Smuzhiyun 158*4882a593Smuzhiyun See the file `config.sub' for the possible values of each field. If 159*4882a593Smuzhiyun`config.sub' isn't included in this package, then this package doesn't 160*4882a593Smuzhiyunneed to know the machine type. 161*4882a593Smuzhiyun 162*4882a593Smuzhiyun If you are _building_ compiler tools for cross-compiling, you should 163*4882a593Smuzhiyunuse the option `--target=TYPE' to select the type of system they will 164*4882a593Smuzhiyunproduce code for. 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun If you want to _use_ a cross compiler, that generates code for a 167*4882a593Smuzhiyunplatform different from the build platform, you should specify the 168*4882a593Smuzhiyun"host" platform (i.e., that on which the generated programs will 169*4882a593Smuzhiyuneventually be run) with `--host=TYPE'. 170*4882a593Smuzhiyun 171*4882a593SmuzhiyunSharing Defaults 172*4882a593Smuzhiyun================ 173*4882a593Smuzhiyun 174*4882a593SmuzhiyunIf you want to set default values for `configure' scripts to share, you 175*4882a593Smuzhiyuncan create a site shell script called `config.site' that gives default 176*4882a593Smuzhiyunvalues for variables like `CC', `cache_file', and `prefix'. 177*4882a593Smuzhiyun`configure' looks for `PREFIX/share/config.site' if it exists, then 178*4882a593Smuzhiyun`PREFIX/etc/config.site' if it exists. Or, you can set the 179*4882a593Smuzhiyun`CONFIG_SITE' environment variable to the location of the site script. 180*4882a593SmuzhiyunA warning: not all `configure' scripts look for a site script. 181*4882a593Smuzhiyun 182*4882a593SmuzhiyunDefining Variables 183*4882a593Smuzhiyun================== 184*4882a593Smuzhiyun 185*4882a593SmuzhiyunVariables not defined in a site shell script can be set in the 186*4882a593Smuzhiyunenvironment passed to `configure'. However, some packages may run 187*4882a593Smuzhiyunconfigure again during the build, and the customized values of these 188*4882a593Smuzhiyunvariables may be lost. In order to avoid this problem, you should set 189*4882a593Smuzhiyunthem in the `configure' command line, using `VAR=value'. For example: 190*4882a593Smuzhiyun 191*4882a593Smuzhiyun ./configure CC=/usr/local2/bin/gcc 192*4882a593Smuzhiyun 193*4882a593Smuzhiyuncauses the specified `gcc' to be used as the C compiler (unless it is 194*4882a593Smuzhiyunoverridden in the site shell script). 195*4882a593Smuzhiyun 196*4882a593SmuzhiyunUnfortunately, this technique does not work for `CONFIG_SHELL' due to 197*4882a593Smuzhiyunan Autoconf bug. Until the bug is fixed you can use this workaround: 198*4882a593Smuzhiyun 199*4882a593Smuzhiyun CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun`configure' Invocation 202*4882a593Smuzhiyun====================== 203*4882a593Smuzhiyun 204*4882a593Smuzhiyun`configure' recognizes the following options to control how it operates. 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun`--help' 207*4882a593Smuzhiyun`-h' 208*4882a593Smuzhiyun Print a summary of the options to `configure', and exit. 209*4882a593Smuzhiyun 210*4882a593Smuzhiyun`--version' 211*4882a593Smuzhiyun`-V' 212*4882a593Smuzhiyun Print the version of Autoconf used to generate the `configure' 213*4882a593Smuzhiyun script, and exit. 214*4882a593Smuzhiyun 215*4882a593Smuzhiyun`--cache-file=FILE' 216*4882a593Smuzhiyun Enable the cache: use and save the results of the tests in FILE, 217*4882a593Smuzhiyun traditionally `config.cache'. FILE defaults to `/dev/null' to 218*4882a593Smuzhiyun disable caching. 219*4882a593Smuzhiyun 220*4882a593Smuzhiyun`--config-cache' 221*4882a593Smuzhiyun`-C' 222*4882a593Smuzhiyun Alias for `--cache-file=config.cache'. 223*4882a593Smuzhiyun 224*4882a593Smuzhiyun`--quiet' 225*4882a593Smuzhiyun`--silent' 226*4882a593Smuzhiyun`-q' 227*4882a593Smuzhiyun Do not print messages saying which checks are being made. To 228*4882a593Smuzhiyun suppress all normal output, redirect it to `/dev/null' (any error 229*4882a593Smuzhiyun messages will still be shown). 230*4882a593Smuzhiyun 231*4882a593Smuzhiyun`--srcdir=DIR' 232*4882a593Smuzhiyun Look for the package's source code in directory DIR. Usually 233*4882a593Smuzhiyun `configure' can determine that directory automatically. 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun`configure' also accepts some other, not widely useful, options. Run 236*4882a593Smuzhiyun`configure --help' for more details. 237*4882a593Smuzhiyun 238