INSTALL revision 0fa2845d
10fa2845dSmrgInstallation Instructions 20fa2845dSmrg************************* 30fa2845dSmrg 40fa2845dSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free 50fa2845dSmrgSoftware Foundation, Inc. 60fa2845dSmrg 70fa2845dSmrgThis file is free documentation; the Free Software Foundation gives 80fa2845dSmrgunlimited permission to copy, distribute and modify it. 90fa2845dSmrg 100fa2845dSmrgBasic Installation 110fa2845dSmrg================== 120fa2845dSmrg 130fa2845dSmrgThese are generic installation instructions. 140fa2845dSmrg 150fa2845dSmrg The `configure' shell script attempts to guess correct values for 160fa2845dSmrgvarious system-dependent variables used during compilation. It uses 170fa2845dSmrgthose values to create a `Makefile' in each directory of the package. 180fa2845dSmrgIt may also create one or more `.h' files containing system-dependent 190fa2845dSmrgdefinitions. Finally, it creates a shell script `config.status' that 200fa2845dSmrgyou can run in the future to recreate the current configuration, and a 210fa2845dSmrgfile `config.log' containing compiler output (useful mainly for 220fa2845dSmrgdebugging `configure'). 230fa2845dSmrg 240fa2845dSmrg It can also use an optional file (typically called `config.cache' 250fa2845dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 260fa2845dSmrgthe results of its tests to speed up reconfiguring. (Caching is 270fa2845dSmrgdisabled by default to prevent problems with accidental use of stale 280fa2845dSmrgcache files.) 290fa2845dSmrg 300fa2845dSmrg If you need to do unusual things to compile the package, please try 310fa2845dSmrgto figure out how `configure' could check whether to do them, and mail 320fa2845dSmrgdiffs or instructions to the address given in the `README' so they can 330fa2845dSmrgbe considered for the next release. If you are using the cache, and at 340fa2845dSmrgsome point `config.cache' contains results you don't want to keep, you 350fa2845dSmrgmay remove or edit it. 360fa2845dSmrg 370fa2845dSmrg The file `configure.ac' (or `configure.in') is used to create 380fa2845dSmrg`configure' by a program called `autoconf'. You only need 390fa2845dSmrg`configure.ac' if you want to change it or regenerate `configure' using 400fa2845dSmrga newer version of `autoconf'. 410fa2845dSmrg 420fa2845dSmrgThe simplest way to compile this package is: 430fa2845dSmrg 440fa2845dSmrg 1. `cd' to the directory containing the package's source code and type 450fa2845dSmrg `./configure' to configure the package for your system. If you're 460fa2845dSmrg using `csh' on an old version of System V, you might need to type 470fa2845dSmrg `sh ./configure' instead to prevent `csh' from trying to execute 480fa2845dSmrg `configure' itself. 490fa2845dSmrg 500fa2845dSmrg Running `configure' takes awhile. While running, it prints some 510fa2845dSmrg messages telling which features it is checking for. 520fa2845dSmrg 530fa2845dSmrg 2. Type `make' to compile the package. 540fa2845dSmrg 550fa2845dSmrg 3. Optionally, type `make check' to run any self-tests that come with 560fa2845dSmrg the package. 570fa2845dSmrg 580fa2845dSmrg 4. Type `make install' to install the programs and any data files and 590fa2845dSmrg documentation. 600fa2845dSmrg 610fa2845dSmrg 5. You can remove the program binaries and object files from the 620fa2845dSmrg source code directory by typing `make clean'. To also remove the 630fa2845dSmrg files that `configure' created (so you can compile the package for 640fa2845dSmrg a different kind of computer), type `make distclean'. There is 650fa2845dSmrg also a `make maintainer-clean' target, but that is intended mainly 660fa2845dSmrg for the package's developers. If you use it, you may have to get 670fa2845dSmrg all sorts of other programs in order to regenerate files that came 680fa2845dSmrg with the distribution. 690fa2845dSmrg 700fa2845dSmrgCompilers and Options 710fa2845dSmrg===================== 720fa2845dSmrg 730fa2845dSmrgSome systems require unusual options for compilation or linking that the 740fa2845dSmrg`configure' script does not know about. Run `./configure --help' for 750fa2845dSmrgdetails on some of the pertinent environment variables. 760fa2845dSmrg 770fa2845dSmrg You can give `configure' initial values for configuration parameters 780fa2845dSmrgby setting variables in the command line or in the environment. Here 790fa2845dSmrgis an example: 800fa2845dSmrg 810fa2845dSmrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 820fa2845dSmrg 830fa2845dSmrg *Note Defining Variables::, for more details. 840fa2845dSmrg 850fa2845dSmrgCompiling For Multiple Architectures 860fa2845dSmrg==================================== 870fa2845dSmrg 880fa2845dSmrgYou can compile the package for more than one kind of computer at the 890fa2845dSmrgsame time, by placing the object files for each architecture in their 900fa2845dSmrgown directory. To do this, you must use a version of `make' that 910fa2845dSmrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 920fa2845dSmrgdirectory where you want the object files and executables to go and run 930fa2845dSmrgthe `configure' script. `configure' automatically checks for the 940fa2845dSmrgsource code in the directory that `configure' is in and in `..'. 950fa2845dSmrg 960fa2845dSmrg If you have to use a `make' that does not support the `VPATH' 970fa2845dSmrgvariable, you have to compile the package for one architecture at a 980fa2845dSmrgtime in the source code directory. After you have installed the 990fa2845dSmrgpackage for one architecture, use `make distclean' before reconfiguring 1000fa2845dSmrgfor another architecture. 1010fa2845dSmrg 1020fa2845dSmrgInstallation Names 1030fa2845dSmrg================== 1040fa2845dSmrg 1050fa2845dSmrgBy default, `make install' will install the package's files in 1060fa2845dSmrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 1070fa2845dSmrginstallation prefix other than `/usr/local' by giving `configure' the 1080fa2845dSmrgoption `--prefix=PREFIX'. 1090fa2845dSmrg 1100fa2845dSmrg You can specify separate installation prefixes for 1110fa2845dSmrgarchitecture-specific files and architecture-independent files. If you 1120fa2845dSmrggive `configure' the option `--exec-prefix=PREFIX', the package will 1130fa2845dSmrguse PREFIX as the prefix for installing programs and libraries. 1140fa2845dSmrgDocumentation and other data files will still use the regular prefix. 1150fa2845dSmrg 1160fa2845dSmrg In addition, if you use an unusual directory layout you can give 1170fa2845dSmrgoptions like `--bindir=DIR' to specify different values for particular 1180fa2845dSmrgkinds of files. Run `configure --help' for a list of the directories 1190fa2845dSmrgyou can set and what kinds of files go in them. 1200fa2845dSmrg 1210fa2845dSmrg If the package supports it, you can cause programs to be installed 1220fa2845dSmrgwith an extra prefix or suffix on their names by giving `configure' the 1230fa2845dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1240fa2845dSmrg 1250fa2845dSmrgOptional Features 1260fa2845dSmrg================= 1270fa2845dSmrg 1280fa2845dSmrgSome packages pay attention to `--enable-FEATURE' options to 1290fa2845dSmrg`configure', where FEATURE indicates an optional part of the package. 1300fa2845dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1310fa2845dSmrgis something like `gnu-as' or `x' (for the X Window System). The 1320fa2845dSmrg`README' should mention any `--enable-' and `--with-' options that the 1330fa2845dSmrgpackage recognizes. 1340fa2845dSmrg 1350fa2845dSmrg For packages that use the X Window System, `configure' can usually 1360fa2845dSmrgfind the X include and library files automatically, but if it doesn't, 1370fa2845dSmrgyou can use the `configure' options `--x-includes=DIR' and 1380fa2845dSmrg`--x-libraries=DIR' to specify their locations. 1390fa2845dSmrg 1400fa2845dSmrgSpecifying the System Type 1410fa2845dSmrg========================== 1420fa2845dSmrg 1430fa2845dSmrgThere may be some features `configure' cannot figure out automatically, 1440fa2845dSmrgbut needs to determine by the type of machine the package will run on. 1450fa2845dSmrgUsually, assuming the package is built to be run on the _same_ 1460fa2845dSmrgarchitectures, `configure' can figure that out, but if it prints a 1470fa2845dSmrgmessage saying it cannot guess the machine type, give it the 1480fa2845dSmrg`--build=TYPE' option. TYPE can either be a short name for the system 1490fa2845dSmrgtype, such as `sun4', or a canonical name which has the form: 1500fa2845dSmrg 1510fa2845dSmrg CPU-COMPANY-SYSTEM 1520fa2845dSmrg 1530fa2845dSmrgwhere SYSTEM can have one of these forms: 1540fa2845dSmrg 1550fa2845dSmrg OS KERNEL-OS 1560fa2845dSmrg 1570fa2845dSmrg See the file `config.sub' for the possible values of each field. If 1580fa2845dSmrg`config.sub' isn't included in this package, then this package doesn't 1590fa2845dSmrgneed to know the machine type. 1600fa2845dSmrg 1610fa2845dSmrg If you are _building_ compiler tools for cross-compiling, you should 1620fa2845dSmrguse the `--target=TYPE' option to select the type of system they will 1630fa2845dSmrgproduce code for. 1640fa2845dSmrg 1650fa2845dSmrg If you want to _use_ a cross compiler, that generates code for a 1660fa2845dSmrgplatform different from the build platform, you should specify the 1670fa2845dSmrg"host" platform (i.e., that on which the generated programs will 1680fa2845dSmrgeventually be run) with `--host=TYPE'. 1690fa2845dSmrg 1700fa2845dSmrgSharing Defaults 1710fa2845dSmrg================ 1720fa2845dSmrg 1730fa2845dSmrgIf you want to set default values for `configure' scripts to share, you 1740fa2845dSmrgcan create a site shell script called `config.site' that gives default 1750fa2845dSmrgvalues for variables like `CC', `cache_file', and `prefix'. 1760fa2845dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 1770fa2845dSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 1780fa2845dSmrg`CONFIG_SITE' environment variable to the location of the site script. 1790fa2845dSmrgA warning: not all `configure' scripts look for a site script. 1800fa2845dSmrg 1810fa2845dSmrgDefining Variables 1820fa2845dSmrg================== 1830fa2845dSmrg 1840fa2845dSmrgVariables not defined in a site shell script can be set in the 1850fa2845dSmrgenvironment passed to `configure'. However, some packages may run 1860fa2845dSmrgconfigure again during the build, and the customized values of these 1870fa2845dSmrgvariables may be lost. In order to avoid this problem, you should set 1880fa2845dSmrgthem in the `configure' command line, using `VAR=value'. For example: 1890fa2845dSmrg 1900fa2845dSmrg ./configure CC=/usr/local2/bin/gcc 1910fa2845dSmrg 1920fa2845dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 1930fa2845dSmrgoverridden in the site shell script). Here is a another example: 1940fa2845dSmrg 1950fa2845dSmrg /bin/bash ./configure CONFIG_SHELL=/bin/bash 1960fa2845dSmrg 1970fa2845dSmrgHere the `CONFIG_SHELL=/bin/bash' operand causes subsequent 1980fa2845dSmrgconfiguration-related scripts to be executed by `/bin/bash'. 1990fa2845dSmrg 2000fa2845dSmrg`configure' Invocation 2010fa2845dSmrg====================== 2020fa2845dSmrg 2030fa2845dSmrg`configure' recognizes the following options to control how it operates. 2040fa2845dSmrg 2050fa2845dSmrg`--help' 2060fa2845dSmrg`-h' 2070fa2845dSmrg Print a summary of the options to `configure', and exit. 2080fa2845dSmrg 2090fa2845dSmrg`--version' 2100fa2845dSmrg`-V' 2110fa2845dSmrg Print the version of Autoconf used to generate the `configure' 2120fa2845dSmrg script, and exit. 2130fa2845dSmrg 2140fa2845dSmrg`--cache-file=FILE' 2150fa2845dSmrg Enable the cache: use and save the results of the tests in FILE, 2160fa2845dSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2170fa2845dSmrg disable caching. 2180fa2845dSmrg 2190fa2845dSmrg`--config-cache' 2200fa2845dSmrg`-C' 2210fa2845dSmrg Alias for `--cache-file=config.cache'. 2220fa2845dSmrg 2230fa2845dSmrg`--quiet' 2240fa2845dSmrg`--silent' 2250fa2845dSmrg`-q' 2260fa2845dSmrg Do not print messages saying which checks are being made. To 2270fa2845dSmrg suppress all normal output, redirect it to `/dev/null' (any error 2280fa2845dSmrg messages will still be shown). 2290fa2845dSmrg 2300fa2845dSmrg`--srcdir=DIR' 2310fa2845dSmrg Look for the package's source code in directory DIR. Usually 2320fa2845dSmrg `configure' can determine that directory automatically. 2330fa2845dSmrg 2340fa2845dSmrg`configure' also accepts some other, not widely useful, options. Run 2350fa2845dSmrg`configure --help' for more details. 2360fa2845dSmrg 237