1251883SpeterInstallation Instructions 2251883Speter************************* 3251883Speter 4251883SpeterCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free 5251883SpeterSoftware Foundation, Inc. 6251883Speter 7251883SpeterThis file is free documentation; the Free Software Foundation gives 8251883Speterunlimited permission to copy, distribute and modify it. 9251883Speter 10251883SpeterBasic Installation 11251883Speter================== 12251883Speter 13251883SpeterThese are generic installation instructions. 14251883Speter 15251883Speter The `configure' shell script attempts to guess correct values for 16251883Spetervarious system-dependent variables used during compilation. It uses 17251883Speterthose values to create a `Makefile' in each directory of the package. 18251883SpeterIt may also create one or more `.h' files containing system-dependent 19251883Speterdefinitions. Finally, it creates a shell script `config.status' that 20251883Speteryou can run in the future to recreate the current configuration, and a 21251883Speterfile `config.log' containing compiler output (useful mainly for 22251883Speterdebugging `configure'). 23251883Speter 24251883Speter It can also use an optional file (typically called `config.cache' 25251883Speterand enabled with `--cache-file=config.cache' or simply `-C') that saves 26251883Speterthe results of its tests to speed up reconfiguring. (Caching is 27251883Speterdisabled by default to prevent problems with accidental use of stale 28251883Spetercache files.) 29251883Speter 30251883Speter If you need to do unusual things to compile the package, please try 31251883Speterto figure out how `configure' could check whether to do them, and mail 32251883Speterdiffs or instructions to the address given in the `README' so they can 33251883Speterbe considered for the next release. If you are using the cache, and at 34251883Spetersome point `config.cache' contains results you don't want to keep, you 35251883Spetermay remove or edit it. 36251883Speter 37251883Speter The file `configure.ac' (or `configure.in') is used to create 38251883Speter`configure' by a program called `autoconf'. You only need 39251883Speter`configure.ac' if you want to change it or regenerate `configure' using 40251883Spetera newer version of `autoconf'. 41251883Speter 42251883SpeterThe simplest way to compile this package is: 43251883Speter 44251883Speter 1. `cd' to the directory containing the package's source code and type 45251883Speter `./configure' to configure the package for your system. If you're 46251883Speter using `csh' on an old version of System V, you might need to type 47251883Speter `sh ./configure' instead to prevent `csh' from trying to execute 48251883Speter `configure' itself. 49251883Speter 50251883Speter Running `configure' takes awhile. While running, it prints some 51251883Speter messages telling which features it is checking for. 52251883Speter 53251883Speter 2. Type `make' to compile the package. 54251883Speter 55251883Speter 3. Optionally, type `make check' to run any self-tests that come with 56251883Speter the package. 57251883Speter 58251883Speter 4. Type `make install' to install the programs and any data files and 59251883Speter documentation. 60251883Speter 61251883Speter 5. You can remove the program binaries and object files from the 62251883Speter source code directory by typing `make clean'. To also remove the 63251883Speter files that `configure' created (so you can compile the package for 64251883Speter a different kind of computer), type `make distclean'. There is 65251883Speter also a `make maintainer-clean' target, but that is intended mainly 66251883Speter for the package's developers. If you use it, you may have to get 67251883Speter all sorts of other programs in order to regenerate files that came 68251883Speter with the distribution. 69251883Speter 70251883SpeterCompilers and Options 71251883Speter===================== 72251883Speter 73251883SpeterSome systems require unusual options for compilation or linking that the 74251883Speter`configure' script does not know about. Run `./configure --help' for 75251883Speterdetails on some of the pertinent environment variables. 76251883Speter 77251883Speter You can give `configure' initial values for configuration parameters 78251883Speterby setting variables in the command line or in the environment. Here 79251883Speteris an example: 80251883Speter 81251883Speter ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 82251883Speter 83251883Speter *Note Defining Variables::, for more details. 84251883Speter 85251883SpeterCompiling For Multiple Architectures 86251883Speter==================================== 87251883Speter 88251883SpeterYou can compile the package for more than one kind of computer at the 89251883Spetersame time, by placing the object files for each architecture in their 90251883Speterown directory. To do this, you must use a version of `make' that 91251883Spetersupports the `VPATH' variable, such as GNU `make'. `cd' to the 92251883Speterdirectory where you want the object files and executables to go and run 93251883Speterthe `configure' script. `configure' automatically checks for the 94251883Spetersource code in the directory that `configure' is in and in `..'. 95251883Speter 96251883Speter If you have to use a `make' that does not support the `VPATH' 97251883Spetervariable, you have to compile the package for one architecture at a 98251883Spetertime in the source code directory. After you have installed the 99251883Speterpackage for one architecture, use `make distclean' before reconfiguring 100251883Speterfor another architecture. 101251883Speter 102251883SpeterInstallation Names 103251883Speter================== 104251883Speter 105251883SpeterBy default, `make install' installs the package's commands under 106251883Speter`/usr/local/bin', include files under `/usr/local/include', etc. You 107251883Spetercan specify an installation prefix other than `/usr/local' by giving 108251883Speter`configure' the option `--prefix=PREFIX'. 109251883Speter 110251883Speter You can specify separate installation prefixes for 111251883Speterarchitecture-specific files and architecture-independent files. If you 112251883Speterpass the option `--exec-prefix=PREFIX' to `configure', the package uses 113251883SpeterPREFIX as the prefix for installing programs and libraries. 114251883SpeterDocumentation and other data files still use the regular prefix. 115251883Speter 116251883Speter In addition, if you use an unusual directory layout you can give 117251883Speteroptions like `--bindir=DIR' to specify different values for particular 118251883Speterkinds of files. Run `configure --help' for a list of the directories 119251883Speteryou can set and what kinds of files go in them. 120251883Speter 121251883Speter If the package supports it, you can cause programs to be installed 122251883Speterwith an extra prefix or suffix on their names by giving `configure' the 123251883Speteroption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 124251883Speter 125251883SpeterOptional Features 126251883Speter================= 127251883Speter 128251883SpeterSome packages pay attention to `--enable-FEATURE' options to 129251883Speter`configure', where FEATURE indicates an optional part of the package. 130251883SpeterThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 131251883Speteris something like `gnu-as' or `x' (for the X Window System). The 132251883Speter`README' should mention any `--enable-' and `--with-' options that the 133251883Speterpackage recognizes. 134251883Speter 135251883Speter For packages that use the X Window System, `configure' can usually 136251883Speterfind the X include and library files automatically, but if it doesn't, 137251883Speteryou can use the `configure' options `--x-includes=DIR' and 138251883Speter`--x-libraries=DIR' to specify their locations. 139251883Speter 140251883SpeterSpecifying the System Type 141251883Speter========================== 142251883Speter 143251883SpeterThere may be some features `configure' cannot figure out automatically, 144251883Speterbut needs to determine by the type of machine the package will run on. 145251883SpeterUsually, assuming the package is built to be run on the _same_ 146251883Speterarchitectures, `configure' can figure that out, but if it prints a 147251883Spetermessage saying it cannot guess the machine type, give it the 148251883Speter`--build=TYPE' option. TYPE can either be a short name for the system 149251883Spetertype, such as `sun4', or a canonical name which has the form: 150251883Speter 151251883Speter CPU-COMPANY-SYSTEM 152251883Speter 153251883Speterwhere SYSTEM can have one of these forms: 154251883Speter 155251883Speter OS KERNEL-OS 156251883Speter 157251883Speter See the file `config.sub' for the possible values of each field. If 158251883Speter`config.sub' isn't included in this package, then this package doesn't 159251883Speterneed to know the machine type. 160251883Speter 161251883Speter If you are _building_ compiler tools for cross-compiling, you should 162251883Speteruse the option `--target=TYPE' to select the type of system they will 163251883Speterproduce code for. 164251883Speter 165251883Speter If you want to _use_ a cross compiler, that generates code for a 166251883Speterplatform different from the build platform, you should specify the 167251883Speter"host" platform (i.e., that on which the generated programs will 168251883Spetereventually be run) with `--host=TYPE'. 169251883Speter 170251883SpeterSharing Defaults 171251883Speter================ 172251883Speter 173251883SpeterIf you want to set default values for `configure' scripts to share, you 174251883Spetercan create a site shell script called `config.site' that gives default 175251883Spetervalues for variables like `CC', `cache_file', and `prefix'. 176251883Speter`configure' looks for `PREFIX/share/config.site' if it exists, then 177251883Speter`PREFIX/etc/config.site' if it exists. Or, you can set the 178251883Speter`CONFIG_SITE' environment variable to the location of the site script. 179251883SpeterA warning: not all `configure' scripts look for a site script. 180251883Speter 181251883SpeterDefining Variables 182251883Speter================== 183251883Speter 184251883SpeterVariables not defined in a site shell script can be set in the 185251883Speterenvironment passed to `configure'. However, some packages may run 186251883Speterconfigure again during the build, and the customized values of these 187251883Spetervariables may be lost. In order to avoid this problem, you should set 188251883Speterthem in the `configure' command line, using `VAR=value'. For example: 189251883Speter 190251883Speter ./configure CC=/usr/local2/bin/gcc 191251883Speter 192251883Spetercauses the specified `gcc' to be used as the C compiler (unless it is 193251883Speteroverridden in the site shell script). Here is a another example: 194251883Speter 195251883Speter /bin/bash ./configure CONFIG_SHELL=/bin/bash 196251883Speter 197251883SpeterHere the `CONFIG_SHELL=/bin/bash' operand causes subsequent 198251883Speterconfiguration-related scripts to be executed by `/bin/bash'. 199251883Speter 200251883Speter`configure' Invocation 201251883Speter====================== 202251883Speter 203251883Speter`configure' recognizes the following options to control how it operates. 204251883Speter 205251883Speter`--help' 206251883Speter`-h' 207251883Speter Print a summary of the options to `configure', and exit. 208251883Speter 209251883Speter`--version' 210251883Speter`-V' 211251883Speter Print the version of Autoconf used to generate the `configure' 212251883Speter script, and exit. 213251883Speter 214251883Speter`--cache-file=FILE' 215251883Speter Enable the cache: use and save the results of the tests in FILE, 216251883Speter traditionally `config.cache'. FILE defaults to `/dev/null' to 217251883Speter disable caching. 218251883Speter 219251883Speter`--config-cache' 220251883Speter`-C' 221251883Speter Alias for `--cache-file=config.cache'. 222251883Speter 223251883Speter`--quiet' 224251883Speter`--silent' 225251883Speter`-q' 226251883Speter Do not print messages saying which checks are being made. To 227251883Speter suppress all normal output, redirect it to `/dev/null' (any error 228251883Speter messages will still be shown). 229251883Speter 230251883Speter`--srcdir=DIR' 231251883Speter Look for the package's source code in directory DIR. Usually 232251883Speter `configure' can determine that directory automatically. 233251883Speter 234251883Speter`configure' also accepts some other, not widely useful, options. Run 235251883Speter`configure --help' for more details. 236251883Speter 237