1151497SruInstallation Instructions 2151497Sru************************* 3151497Sru 4151497SruCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free 5151497SruSoftware Foundation, Inc. 6151497Sru 7151497SruThis file is free documentation; the Free Software Foundation gives 8151497Sruunlimited permission to copy, distribute and modify it. 9151497Sru 1018099SpstBasic Installation 1118099Spst================== 1218099Spst 13151497SruThese are generic installation instructions. 1418099Spst 1518099Spst The `configure' shell script attempts to guess correct values for 1618099Spstvarious system-dependent variables used during compilation. It uses 1718099Spstthose values to create a `Makefile' in each directory of the package. 1818099SpstIt may also create one or more `.h' files containing system-dependent 1918099Spstdefinitions. Finally, it creates a shell script `config.status' that 20104862Sruyou can run in the future to recreate the current configuration, and a 21104862Srufile `config.log' containing compiler output (useful mainly for 22104862Srudebugging `configure'). 2318099Spst 24104862Sru It can also use an optional file (typically called `config.cache' 25104862Sruand enabled with `--cache-file=config.cache' or simply `-C') that saves 26104862Sruthe results of its tests to speed up reconfiguring. (Caching is 27104862Srudisabled by default to prevent problems with accidental use of stale 28104862Srucache files.) 29104862Sru 3018099Spst If you need to do unusual things to compile the package, please try 3118099Spstto figure out how `configure' could check whether to do them, and mail 3218099Spstdiffs or instructions to the address given in the `README' so they can 33104862Srube considered for the next release. If you are using the cache, and at 34104862Srusome point `config.cache' contains results you don't want to keep, you 35104862Srumay remove or edit it. 3618099Spst 37104862Sru The file `configure.ac' (or `configure.in') is used to create 38104862Sru`configure' by a program called `autoconf'. You only need 39104862Sru`configure.ac' if you want to change it or regenerate `configure' using 40104862Srua newer version of `autoconf'. 4118099Spst 4218099SpstThe simplest way to compile this package is: 4318099Spst 4418099Spst 1. `cd' to the directory containing the package's source code and type 4518099Spst `./configure' to configure the package for your system. If you're 4618099Spst using `csh' on an old version of System V, you might need to type 4718099Spst `sh ./configure' instead to prevent `csh' from trying to execute 4818099Spst `configure' itself. 4918099Spst 5018099Spst Running `configure' takes awhile. While running, it prints some 5118099Spst messages telling which features it is checking for. 5218099Spst 5318099Spst 2. Type `make' to compile the package. 5418099Spst 5518099Spst 3. Optionally, type `make check' to run any self-tests that come with 5618099Spst the package. 5718099Spst 5818099Spst 4. Type `make install' to install the programs and any data files and 5918099Spst documentation. 6018099Spst 6118099Spst 5. You can remove the program binaries and object files from the 6218099Spst source code directory by typing `make clean'. To also remove the 6318099Spst files that `configure' created (so you can compile the package for 6418099Spst a different kind of computer), type `make distclean'. There is 6518099Spst also a `make maintainer-clean' target, but that is intended mainly 6618099Spst for the package's developers. If you use it, you may have to get 6718099Spst all sorts of other programs in order to regenerate files that came 6818099Spst with the distribution. 6918099Spst 7018099SpstCompilers and Options 7118099Spst===================== 7218099Spst 73151497SruSome systems require unusual options for compilation or linking that the 74151497Sru`configure' script does not know about. Run `./configure --help' for 75151497Srudetails on some of the pertinent environment variables. 7618099Spst 77151497Sru You can give `configure' initial values for configuration parameters 78151497Sruby setting variables in the command line or in the environment. Here 79151497Sruis an example: 8018099Spst 81104862Sru ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 82104862Sru 83151497Sru *Note Defining Variables::, for more details. 84104862Sru 8518099SpstCompiling For Multiple Architectures 8618099Spst==================================== 8718099Spst 88151497SruYou can compile the package for more than one kind of computer at the 8918099Spstsame time, by placing the object files for each architecture in their 9018099Spstown directory. To do this, you must use a version of `make' that 9118099Spstsupports the `VPATH' variable, such as GNU `make'. `cd' to the 9218099Spstdirectory where you want the object files and executables to go and run 9318099Spstthe `configure' script. `configure' automatically checks for the 9418099Spstsource code in the directory that `configure' is in and in `..'. 9518099Spst 96104862Sru If you have to use a `make' that does not support the `VPATH' 97151497Sruvariable, you have to compile the package for one architecture at a 98151497Srutime in the source code directory. After you have installed the 99151497Srupackage for one architecture, use `make distclean' before reconfiguring 100151497Srufor another architecture. 10118099Spst 10218099SpstInstallation Names 10318099Spst================== 10418099Spst 105151497SruBy default, `make install' will install the package's files in 10618099Spst`/usr/local/bin', `/usr/local/man', etc. You can specify an 10718099Spstinstallation prefix other than `/usr/local' by giving `configure' the 108151497Sruoption `--prefix=PREFIX'. 10918099Spst 11018099Spst You can specify separate installation prefixes for 11118099Spstarchitecture-specific files and architecture-independent files. If you 112151497Srugive `configure' the option `--exec-prefix=PREFIX', the package will 113151497Sruuse PREFIX as the prefix for installing programs and libraries. 11418099SpstDocumentation and other data files will still use the regular prefix. 11518099Spst 11669626Sru In addition, if you use an unusual directory layout you can give 117151497Sruoptions like `--bindir=DIR' to specify different values for particular 11869626Srukinds of files. Run `configure --help' for a list of the directories 11969626Sruyou can set and what kinds of files go in them. 12069626Sru 12118099Spst If the package supports it, you can cause programs to be installed 12218099Spstwith an extra prefix or suffix on their names by giving `configure' the 12318099Spstoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 12418099Spst 12518099SpstOptional Features 12618099Spst================= 12718099Spst 128151497SruSome packages pay attention to `--enable-FEATURE' options to 12918099Spst`configure', where FEATURE indicates an optional part of the package. 13018099SpstThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 13118099Spstis something like `gnu-as' or `x' (for the X Window System). The 13218099Spst`README' should mention any `--enable-' and `--with-' options that the 13318099Spstpackage recognizes. 13418099Spst 13518099Spst For packages that use the X Window System, `configure' can usually 13618099Spstfind the X include and library files automatically, but if it doesn't, 13718099Spstyou can use the `configure' options `--x-includes=DIR' and 13818099Spst`--x-libraries=DIR' to specify their locations. 13918099Spst 14018099SpstSpecifying the System Type 14118099Spst========================== 14218099Spst 143151497SruThere may be some features `configure' cannot figure out automatically, 144151497Srubut needs to determine by the type of machine the package will run on. 145151497SruUsually, assuming the package is built to be run on the _same_ 146151497Sruarchitectures, `configure' can figure that out, but if it prints a 147151497Srumessage saying it cannot guess the machine type, give it the 148104862Sru`--build=TYPE' option. TYPE can either be a short name for the system 149104862Srutype, such as `sun4', or a canonical name which has the form: 150104862Sru 15118099Spst CPU-COMPANY-SYSTEM 15218099Spst 153104862Sruwhere SYSTEM can have one of these forms: 154104862Sru 155151497Sru OS KERNEL-OS 156104862Sru 157104862Sru See the file `config.sub' for the possible values of each field. If 15818099Spst`config.sub' isn't included in this package, then this package doesn't 159151497Sruneed to know the machine type. 16018099Spst 161104862Sru If you are _building_ compiler tools for cross-compiling, you should 16218099Spstuse the `--target=TYPE' option to select the type of system they will 163104862Sruproduce code for. 16418099Spst 165104862Sru If you want to _use_ a cross compiler, that generates code for a 166151497Sruplatform different from the build platform, you should specify the 167151497Sru"host" platform (i.e., that on which the generated programs will 168151497Srueventually be run) with `--host=TYPE'. 169104862Sru 17018099SpstSharing Defaults 17118099Spst================ 17218099Spst 173151497SruIf you want to set default values for `configure' scripts to share, you 174151497Srucan create a site shell script called `config.site' that gives default 175151497Sruvalues for variables like `CC', `cache_file', and `prefix'. 17618099Spst`configure' looks for `PREFIX/share/config.site' if it exists, then 17718099Spst`PREFIX/etc/config.site' if it exists. Or, you can set the 17818099Spst`CONFIG_SITE' environment variable to the location of the site script. 17918099SpstA warning: not all `configure' scripts look for a site script. 18018099Spst 181151497SruDefining Variables 182151497Sru================== 18318099Spst 184151497SruVariables not defined in a site shell script can be set in the 185151497Sruenvironment passed to `configure'. However, some packages may run 186104862Sruconfigure again during the build, and the customized values of these 187104862Sruvariables may be lost. In order to avoid this problem, you should set 188104862Sruthem in the `configure' command line, using `VAR=value'. For example: 189104862Sru 190104862Sru ./configure CC=/usr/local2/bin/gcc 191104862Sru 192104862Sruwill cause the specified gcc to be used as the C compiler (unless it is 193104862Sruoverridden in the site shell script). 194104862Sru 195104862Sru`configure' Invocation 196104862Sru====================== 197104862Sru 198151497Sru`configure' recognizes the following options to control how it operates. 19918099Spst 20018099Spst`--help' 201104862Sru`-h' 20218099Spst Print a summary of the options to `configure', and exit. 20318099Spst 204104862Sru`--version' 205104862Sru`-V' 206104862Sru Print the version of Autoconf used to generate the `configure' 207104862Sru script, and exit. 208104862Sru 209104862Sru`--cache-file=FILE' 210104862Sru Enable the cache: use and save the results of the tests in FILE, 211104862Sru traditionally `config.cache'. FILE defaults to `/dev/null' to 212104862Sru disable caching. 213104862Sru 214104862Sru`--config-cache' 215104862Sru`-C' 216104862Sru Alias for `--cache-file=config.cache'. 217104862Sru 21818099Spst`--quiet' 21918099Spst`--silent' 22018099Spst`-q' 22169626Sru Do not print messages saying which checks are being made. To 22269626Sru suppress all normal output, redirect it to `/dev/null' (any error 22369626Sru messages will still be shown). 22418099Spst 22518099Spst`--srcdir=DIR' 22618099Spst Look for the package's source code in directory DIR. Usually 22718099Spst `configure' can determine that directory automatically. 22818099Spst 229104862Sru`configure' also accepts some other, not widely useful, options. Run 230104862Sru`configure --help' for more details. 23118099Spst 232