INSTALL revision 1ab64890
11ab64890SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 21ab64890SmrgFoundation, Inc. 31ab64890Smrg 41ab64890Smrg This file is free documentation; the Free Software Foundation gives 51ab64890Smrgunlimited permission to copy, distribute and modify it. 61ab64890Smrg 71ab64890SmrgBasic Installation 81ab64890Smrg================== 91ab64890Smrg 101ab64890Smrg These are generic installation instructions. 111ab64890Smrg 121ab64890Smrg The `configure' shell script attempts to guess correct values for 131ab64890Smrgvarious system-dependent variables used during compilation. It uses 141ab64890Smrgthose values to create a `Makefile' in each directory of the package. 151ab64890SmrgIt may also create one or more `.h' files containing system-dependent 161ab64890Smrgdefinitions. Finally, it creates a shell script `config.status' that 171ab64890Smrgyou can run in the future to recreate the current configuration, and a 181ab64890Smrgfile `config.log' containing compiler output (useful mainly for 191ab64890Smrgdebugging `configure'). 201ab64890Smrg 211ab64890Smrg It can also use an optional file (typically called `config.cache' 221ab64890Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 231ab64890Smrgthe results of its tests to speed up reconfiguring. (Caching is 241ab64890Smrgdisabled by default to prevent problems with accidental use of stale 251ab64890Smrgcache files.) 261ab64890Smrg 271ab64890Smrg If you need to do unusual things to compile the package, please try 281ab64890Smrgto figure out how `configure' could check whether to do them, and mail 291ab64890Smrgdiffs or instructions to the address given in the `README' so they can 301ab64890Smrgbe considered for the next release. If you are using the cache, and at 311ab64890Smrgsome point `config.cache' contains results you don't want to keep, you 321ab64890Smrgmay remove or edit it. 331ab64890Smrg 341ab64890Smrg The file `configure.ac' (or `configure.in') is used to create 351ab64890Smrg`configure' by a program called `autoconf'. You only need 361ab64890Smrg`configure.ac' if you want to change it or regenerate `configure' using 371ab64890Smrga newer version of `autoconf'. 381ab64890Smrg 391ab64890SmrgThe simplest way to compile this package is: 401ab64890Smrg 411ab64890Smrg 1. `cd' to the directory containing the package's source code and type 421ab64890Smrg `./configure' to configure the package for your system. If you're 431ab64890Smrg using `csh' on an old version of System V, you might need to type 441ab64890Smrg `sh ./configure' instead to prevent `csh' from trying to execute 451ab64890Smrg `configure' itself. 461ab64890Smrg 471ab64890Smrg Running `configure' takes awhile. While running, it prints some 481ab64890Smrg messages telling which features it is checking for. 491ab64890Smrg 501ab64890Smrg 2. Type `make' to compile the package. 511ab64890Smrg 521ab64890Smrg 3. Optionally, type `make check' to run any self-tests that come with 531ab64890Smrg the package. 541ab64890Smrg 551ab64890Smrg 4. Type `make install' to install the programs and any data files and 561ab64890Smrg documentation. 571ab64890Smrg 581ab64890Smrg 5. You can remove the program binaries and object files from the 591ab64890Smrg source code directory by typing `make clean'. To also remove the 601ab64890Smrg files that `configure' created (so you can compile the package for 611ab64890Smrg a different kind of computer), type `make distclean'. There is 621ab64890Smrg also a `make maintainer-clean' target, but that is intended mainly 631ab64890Smrg for the package's developers. If you use it, you may have to get 641ab64890Smrg all sorts of other programs in order to regenerate files that came 651ab64890Smrg with the distribution. 661ab64890Smrg 671ab64890SmrgCompilers and Options 681ab64890Smrg===================== 691ab64890Smrg 701ab64890Smrg Some systems require unusual options for compilation or linking that 711ab64890Smrgthe `configure' script does not know about. Run `./configure --help' 721ab64890Smrgfor details on some of the pertinent environment variables. 731ab64890Smrg 741ab64890Smrg You can give `configure' initial values for configuration parameters 751ab64890Smrgby setting variables in the command line or in the environment. Here 761ab64890Smrgis an example: 771ab64890Smrg 781ab64890Smrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 791ab64890Smrg 801ab64890Smrg *Note Defining Variables::, for more details. 811ab64890Smrg 821ab64890SmrgCompiling For Multiple Architectures 831ab64890Smrg==================================== 841ab64890Smrg 851ab64890Smrg You can compile the package for more than one kind of computer at the 861ab64890Smrgsame time, by placing the object files for each architecture in their 871ab64890Smrgown directory. To do this, you must use a version of `make' that 881ab64890Smrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 891ab64890Smrgdirectory where you want the object files and executables to go and run 901ab64890Smrgthe `configure' script. `configure' automatically checks for the 911ab64890Smrgsource code in the directory that `configure' is in and in `..'. 921ab64890Smrg 931ab64890Smrg If you have to use a `make' that does not support the `VPATH' 941ab64890Smrgvariable, you have to compile the package for one architecture at a 951ab64890Smrgtime in the source code directory. After you have installed the 961ab64890Smrgpackage for one architecture, use `make distclean' before reconfiguring 971ab64890Smrgfor another architecture. 981ab64890Smrg 991ab64890SmrgInstallation Names 1001ab64890Smrg================== 1011ab64890Smrg 1021ab64890Smrg By default, `make install' will install the package's files in 1031ab64890Smrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 1041ab64890Smrginstallation prefix other than `/usr/local' by giving `configure' the 1051ab64890Smrgoption `--prefix=PATH'. 1061ab64890Smrg 1071ab64890Smrg You can specify separate installation prefixes for 1081ab64890Smrgarchitecture-specific files and architecture-independent files. If you 1091ab64890Smrggive `configure' the option `--exec-prefix=PATH', the package will use 1101ab64890SmrgPATH as the prefix for installing programs and libraries. 1111ab64890SmrgDocumentation and other data files will still use the regular prefix. 1121ab64890Smrg 1131ab64890Smrg In addition, if you use an unusual directory layout you can give 1141ab64890Smrgoptions like `--bindir=PATH' to specify different values for particular 1151ab64890Smrgkinds of files. Run `configure --help' for a list of the directories 1161ab64890Smrgyou can set and what kinds of files go in them. 1171ab64890Smrg 1181ab64890Smrg If the package supports it, you can cause programs to be installed 1191ab64890Smrgwith an extra prefix or suffix on their names by giving `configure' the 1201ab64890Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1211ab64890Smrg 1221ab64890SmrgOptional Features 1231ab64890Smrg================= 1241ab64890Smrg 1251ab64890Smrg Some packages pay attention to `--enable-FEATURE' options to 1261ab64890Smrg`configure', where FEATURE indicates an optional part of the package. 1271ab64890SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1281ab64890Smrgis something like `gnu-as' or `x' (for the X Window System). The 1291ab64890Smrg`README' should mention any `--enable-' and `--with-' options that the 1301ab64890Smrgpackage recognizes. 1311ab64890Smrg 1321ab64890Smrg For packages that use the X Window System, `configure' can usually 1331ab64890Smrgfind the X include and library files automatically, but if it doesn't, 1341ab64890Smrgyou can use the `configure' options `--x-includes=DIR' and 1351ab64890Smrg`--x-libraries=DIR' to specify their locations. 1361ab64890Smrg 1371ab64890SmrgSpecifying the System Type 1381ab64890Smrg========================== 1391ab64890Smrg 1401ab64890Smrg There may be some features `configure' cannot figure out 1411ab64890Smrgautomatically, but needs to determine by the type of machine the package 1421ab64890Smrgwill run on. Usually, assuming the package is built to be run on the 1431ab64890Smrg_same_ architectures, `configure' can figure that out, but if it prints 1441ab64890Smrga message saying it cannot guess the machine type, give it the 1451ab64890Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1461ab64890Smrgtype, such as `sun4', or a canonical name which has the form: 1471ab64890Smrg 1481ab64890Smrg CPU-COMPANY-SYSTEM 1491ab64890Smrg 1501ab64890Smrgwhere SYSTEM can have one of these forms: 1511ab64890Smrg 1521ab64890Smrg OS KERNEL-OS 1531ab64890Smrg 1541ab64890Smrg See the file `config.sub' for the possible values of each field. If 1551ab64890Smrg`config.sub' isn't included in this package, then this package doesn't 1561ab64890Smrgneed to know the machine type. 1571ab64890Smrg 1581ab64890Smrg If you are _building_ compiler tools for cross-compiling, you should 1591ab64890Smrguse the `--target=TYPE' option to select the type of system they will 1601ab64890Smrgproduce code for. 1611ab64890Smrg 1621ab64890Smrg If you want to _use_ a cross compiler, that generates code for a 1631ab64890Smrgplatform different from the build platform, you should specify the 1641ab64890Smrg"host" platform (i.e., that on which the generated programs will 1651ab64890Smrgeventually be run) with `--host=TYPE'. 1661ab64890Smrg 1671ab64890SmrgSharing Defaults 1681ab64890Smrg================ 1691ab64890Smrg 1701ab64890Smrg If you want to set default values for `configure' scripts to share, 1711ab64890Smrgyou can create a site shell script called `config.site' that gives 1721ab64890Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 1731ab64890Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 1741ab64890Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 1751ab64890Smrg`CONFIG_SITE' environment variable to the location of the site script. 1761ab64890SmrgA warning: not all `configure' scripts look for a site script. 1771ab64890Smrg 1781ab64890SmrgDefining Variables 1791ab64890Smrg================== 1801ab64890Smrg 1811ab64890Smrg Variables not defined in a site shell script can be set in the 1821ab64890Smrgenvironment passed to `configure'. However, some packages may run 1831ab64890Smrgconfigure again during the build, and the customized values of these 1841ab64890Smrgvariables may be lost. In order to avoid this problem, you should set 1851ab64890Smrgthem in the `configure' command line, using `VAR=value'. For example: 1861ab64890Smrg 1871ab64890Smrg ./configure CC=/usr/local2/bin/gcc 1881ab64890Smrg 1891ab64890Smrgwill cause the specified gcc to be used as the C compiler (unless it is 1901ab64890Smrgoverridden in the site shell script). 1911ab64890Smrg 1921ab64890Smrg`configure' Invocation 1931ab64890Smrg====================== 1941ab64890Smrg 1951ab64890Smrg `configure' recognizes the following options to control how it 1961ab64890Smrgoperates. 1971ab64890Smrg 1981ab64890Smrg`--help' 1991ab64890Smrg`-h' 2001ab64890Smrg Print a summary of the options to `configure', and exit. 2011ab64890Smrg 2021ab64890Smrg`--version' 2031ab64890Smrg`-V' 2041ab64890Smrg Print the version of Autoconf used to generate the `configure' 2051ab64890Smrg script, and exit. 2061ab64890Smrg 2071ab64890Smrg`--cache-file=FILE' 2081ab64890Smrg Enable the cache: use and save the results of the tests in FILE, 2091ab64890Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2101ab64890Smrg disable caching. 2111ab64890Smrg 2121ab64890Smrg`--config-cache' 2131ab64890Smrg`-C' 2141ab64890Smrg Alias for `--cache-file=config.cache'. 2151ab64890Smrg 2161ab64890Smrg`--quiet' 2171ab64890Smrg`--silent' 2181ab64890Smrg`-q' 2191ab64890Smrg Do not print messages saying which checks are being made. To 2201ab64890Smrg suppress all normal output, redirect it to `/dev/null' (any error 2211ab64890Smrg messages will still be shown). 2221ab64890Smrg 2231ab64890Smrg`--srcdir=DIR' 2241ab64890Smrg Look for the package's source code in directory DIR. Usually 2251ab64890Smrg `configure' can determine that directory automatically. 2261ab64890Smrg 2271ab64890Smrg`configure' also accepts some other, not widely useful, options. Run 2281ab64890Smrg`configure --help' for more details. 2291ab64890Smrg 230