186d7f5d3SJohn MarinoCopyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 286d7f5d3SJohn MarinoFoundation, Inc. 386d7f5d3SJohn Marino 486d7f5d3SJohn Marino This file is free documentation; the Free Software Foundation gives 586d7f5d3SJohn Marinounlimited permission to copy, distribute and modify it. 686d7f5d3SJohn Marino 786d7f5d3SJohn MarinoBasic Installation 886d7f5d3SJohn Marino================== 986d7f5d3SJohn Marino 1086d7f5d3SJohn Marino These are generic installation instructions. 1186d7f5d3SJohn Marino 1286d7f5d3SJohn Marino The `configure' shell script attempts to guess correct values for 1386d7f5d3SJohn Marinovarious system-dependent variables used during compilation. It uses 1486d7f5d3SJohn Marinothose values to create a `Makefile' in each directory of the package. 1586d7f5d3SJohn MarinoIt may also create one or more `.h' files containing system-dependent 1686d7f5d3SJohn Marinodefinitions. Finally, it creates a shell script `config.status' that 1786d7f5d3SJohn Marinoyou can run in the future to recreate the current configuration, and a 1886d7f5d3SJohn Marinofile `config.log' containing compiler output (useful mainly for 1986d7f5d3SJohn Marinodebugging `configure'). 2086d7f5d3SJohn Marino 2186d7f5d3SJohn Marino It can also use an optional file (typically called `config.cache' 2286d7f5d3SJohn Marinoand enabled with `--cache-file=config.cache' or simply `-C') that saves 2386d7f5d3SJohn Marinothe results of its tests to speed up reconfiguring. (Caching is 2486d7f5d3SJohn Marinodisabled by default to prevent problems with accidental use of stale 2586d7f5d3SJohn Marinocache files.) 2686d7f5d3SJohn Marino 2786d7f5d3SJohn Marino If you need to do unusual things to compile the package, please try 2886d7f5d3SJohn Marinoto figure out how `configure' could check whether to do them, and mail 2986d7f5d3SJohn Marinodiffs or instructions to the address given in the `README' so they can 3086d7f5d3SJohn Marinobe considered for the next release. If you are using the cache, and at 3186d7f5d3SJohn Marinosome point `config.cache' contains results you don't want to keep, you 3286d7f5d3SJohn Marinomay remove or edit it. 3386d7f5d3SJohn Marino 3486d7f5d3SJohn Marino The file `configure.ac' (or `configure.in') is used to create 3586d7f5d3SJohn Marino`configure' by a program called `autoconf'. You only need 3686d7f5d3SJohn Marino`configure.ac' if you want to change it or regenerate `configure' using 3786d7f5d3SJohn Marinoa newer version of `autoconf'. 3886d7f5d3SJohn Marino 3986d7f5d3SJohn MarinoThe simplest way to compile this package is: 4086d7f5d3SJohn Marino 4186d7f5d3SJohn Marino 1. `cd' to the directory containing the package's source code and type 4286d7f5d3SJohn Marino `./configure' to configure the package for your system. If you're 4386d7f5d3SJohn Marino using `csh' on an old version of System V, you might need to type 4486d7f5d3SJohn Marino `sh ./configure' instead to prevent `csh' from trying to execute 4586d7f5d3SJohn Marino `configure' itself. 4686d7f5d3SJohn Marino 4786d7f5d3SJohn Marino Running `configure' takes awhile. While running, it prints some 4886d7f5d3SJohn Marino messages telling which features it is checking for. 4986d7f5d3SJohn Marino 5086d7f5d3SJohn Marino 2. Type `make' to compile the package. 5186d7f5d3SJohn Marino 5286d7f5d3SJohn Marino 3. Optionally, type `make check' to run any self-tests that come with 5386d7f5d3SJohn Marino the package. 5486d7f5d3SJohn Marino 5586d7f5d3SJohn Marino 4. Type `make install' to install the programs and any data files and 5686d7f5d3SJohn Marino documentation. 5786d7f5d3SJohn Marino 5886d7f5d3SJohn Marino 5. You can remove the program binaries and object files from the 5986d7f5d3SJohn Marino source code directory by typing `make clean'. To also remove the 6086d7f5d3SJohn Marino files that `configure' created (so you can compile the package for 6186d7f5d3SJohn Marino a different kind of computer), type `make distclean'. There is 6286d7f5d3SJohn Marino also a `make maintainer-clean' target, but that is intended mainly 6386d7f5d3SJohn Marino for the package's developers. If you use it, you may have to get 6486d7f5d3SJohn Marino all sorts of other programs in order to regenerate files that came 6586d7f5d3SJohn Marino with the distribution. 6686d7f5d3SJohn Marino 6786d7f5d3SJohn MarinoCompilers and Options 6886d7f5d3SJohn Marino===================== 6986d7f5d3SJohn Marino 7086d7f5d3SJohn Marino Some systems require unusual options for compilation or linking that 7186d7f5d3SJohn Marinothe `configure' script does not know about. Run `./configure --help' 7286d7f5d3SJohn Marinofor details on some of the pertinent environment variables. 7386d7f5d3SJohn Marino 7486d7f5d3SJohn Marino You can give `configure' initial values for configuration parameters 7586d7f5d3SJohn Marinoby setting variables in the command line or in the environment. Here 7686d7f5d3SJohn Marinois an example: 7786d7f5d3SJohn Marino 7886d7f5d3SJohn Marino ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 7986d7f5d3SJohn Marino 8086d7f5d3SJohn Marino *Note Defining Variables::, for more details. 8186d7f5d3SJohn Marino 8286d7f5d3SJohn MarinoCompiling For Multiple Architectures 8386d7f5d3SJohn Marino==================================== 8486d7f5d3SJohn Marino 8586d7f5d3SJohn Marino You can compile the package for more than one kind of computer at the 8686d7f5d3SJohn Marinosame time, by placing the object files for each architecture in their 8786d7f5d3SJohn Marinoown directory. To do this, you must use a version of `make' that 8886d7f5d3SJohn Marinosupports the `VPATH' variable, such as GNU `make'. `cd' to the 8986d7f5d3SJohn Marinodirectory where you want the object files and executables to go and run 9086d7f5d3SJohn Marinothe `configure' script. `configure' automatically checks for the 9186d7f5d3SJohn Marinosource code in the directory that `configure' is in and in `..'. 9286d7f5d3SJohn Marino 9386d7f5d3SJohn Marino If you have to use a `make' that does not support the `VPATH' 9486d7f5d3SJohn Marinovariable, you have to compile the package for one architecture at a 9586d7f5d3SJohn Marinotime in the source code directory. After you have installed the 9686d7f5d3SJohn Marinopackage for one architecture, use `make distclean' before reconfiguring 9786d7f5d3SJohn Marinofor another architecture. 9886d7f5d3SJohn Marino 9986d7f5d3SJohn MarinoInstallation Names 10086d7f5d3SJohn Marino================== 10186d7f5d3SJohn Marino 10286d7f5d3SJohn Marino By default, `make install' will install the package's files in 10386d7f5d3SJohn Marino`/usr/local/bin', `/usr/local/man', etc. You can specify an 10486d7f5d3SJohn Marinoinstallation prefix other than `/usr/local' by giving `configure' the 10586d7f5d3SJohn Marinooption `--prefix=PATH'. 10686d7f5d3SJohn Marino 10786d7f5d3SJohn Marino You can specify separate installation prefixes for 10886d7f5d3SJohn Marinoarchitecture-specific files and architecture-independent files. If you 10986d7f5d3SJohn Marinogive `configure' the option `--exec-prefix=PATH', the package will use 11086d7f5d3SJohn MarinoPATH as the prefix for installing programs and libraries. 11186d7f5d3SJohn MarinoDocumentation and other data files will still use the regular prefix. 11286d7f5d3SJohn Marino 11386d7f5d3SJohn Marino In addition, if you use an unusual directory layout you can give 11486d7f5d3SJohn Marinooptions like `--bindir=PATH' to specify different values for particular 11586d7f5d3SJohn Marinokinds of files. Run `configure --help' for a list of the directories 11686d7f5d3SJohn Marinoyou can set and what kinds of files go in them. 11786d7f5d3SJohn Marino 11886d7f5d3SJohn Marino If the package supports it, you can cause programs to be installed 11986d7f5d3SJohn Marinowith an extra prefix or suffix on their names by giving `configure' the 12086d7f5d3SJohn Marinooption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 12186d7f5d3SJohn Marino 12286d7f5d3SJohn MarinoOptional Features 12386d7f5d3SJohn Marino================= 12486d7f5d3SJohn Marino 12586d7f5d3SJohn Marino Some packages pay attention to `--enable-FEATURE' options to 12686d7f5d3SJohn Marino`configure', where FEATURE indicates an optional part of the package. 12786d7f5d3SJohn MarinoThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 12886d7f5d3SJohn Marinois something like `gnu-as' or `x' (for the X Window System). The 12986d7f5d3SJohn Marino`README' should mention any `--enable-' and `--with-' options that the 13086d7f5d3SJohn Marinopackage recognizes. 13186d7f5d3SJohn Marino 13286d7f5d3SJohn Marino For packages that use the X Window System, `configure' can usually 13386d7f5d3SJohn Marinofind the X include and library files automatically, but if it doesn't, 13486d7f5d3SJohn Marinoyou can use the `configure' options `--x-includes=DIR' and 13586d7f5d3SJohn Marino`--x-libraries=DIR' to specify their locations. 13686d7f5d3SJohn Marino 13786d7f5d3SJohn MarinoSpecifying the System Type 13886d7f5d3SJohn Marino========================== 13986d7f5d3SJohn Marino 14086d7f5d3SJohn Marino There may be some features `configure' cannot figure out 14186d7f5d3SJohn Marinoautomatically, but needs to determine by the type of machine the package 14286d7f5d3SJohn Marinowill run on. Usually, assuming the package is built to be run on the 14386d7f5d3SJohn Marino_same_ architectures, `configure' can figure that out, but if it prints 14486d7f5d3SJohn Marinoa message saying it cannot guess the machine type, give it the 14586d7f5d3SJohn Marino`--build=TYPE' option. TYPE can either be a short name for the system 14686d7f5d3SJohn Marinotype, such as `sun4', or a canonical name which has the form: 14786d7f5d3SJohn Marino 14886d7f5d3SJohn Marino CPU-COMPANY-SYSTEM 14986d7f5d3SJohn Marino 15086d7f5d3SJohn Marinowhere SYSTEM can have one of these forms: 15186d7f5d3SJohn Marino 15286d7f5d3SJohn Marino OS KERNEL-OS 15386d7f5d3SJohn Marino 15486d7f5d3SJohn Marino See the file `config.sub' for the possible values of each field. If 15586d7f5d3SJohn Marino`config.sub' isn't included in this package, then this package doesn't 15686d7f5d3SJohn Marinoneed to know the machine type. 15786d7f5d3SJohn Marino 15886d7f5d3SJohn Marino If you are _building_ compiler tools for cross-compiling, you should 15986d7f5d3SJohn Marinouse the `--target=TYPE' option to select the type of system they will 16086d7f5d3SJohn Marinoproduce code for. 16186d7f5d3SJohn Marino 16286d7f5d3SJohn Marino If you want to _use_ a cross compiler, that generates code for a 16386d7f5d3SJohn Marinoplatform different from the build platform, you should specify the 16486d7f5d3SJohn Marino"host" platform (i.e., that on which the generated programs will 16586d7f5d3SJohn Marinoeventually be run) with `--host=TYPE'. 16686d7f5d3SJohn Marino 16786d7f5d3SJohn MarinoSharing Defaults 16886d7f5d3SJohn Marino================ 16986d7f5d3SJohn Marino 17086d7f5d3SJohn Marino If you want to set default values for `configure' scripts to share, 17186d7f5d3SJohn Marinoyou can create a site shell script called `config.site' that gives 17286d7f5d3SJohn Marinodefault values for variables like `CC', `cache_file', and `prefix'. 17386d7f5d3SJohn Marino`configure' looks for `PREFIX/share/config.site' if it exists, then 17486d7f5d3SJohn Marino`PREFIX/etc/config.site' if it exists. Or, you can set the 17586d7f5d3SJohn Marino`CONFIG_SITE' environment variable to the location of the site script. 17686d7f5d3SJohn MarinoA warning: not all `configure' scripts look for a site script. 17786d7f5d3SJohn Marino 17886d7f5d3SJohn MarinoDefining Variables 17986d7f5d3SJohn Marino================== 18086d7f5d3SJohn Marino 18186d7f5d3SJohn Marino Variables not defined in a site shell script can be set in the 18286d7f5d3SJohn Marinoenvironment passed to `configure'. However, some packages may run 18386d7f5d3SJohn Marinoconfigure again during the build, and the customized values of these 18486d7f5d3SJohn Marinovariables may be lost. In order to avoid this problem, you should set 18586d7f5d3SJohn Marinothem in the `configure' command line, using `VAR=value'. For example: 18686d7f5d3SJohn Marino 18786d7f5d3SJohn Marino ./configure CC=/usr/local2/bin/gcc 18886d7f5d3SJohn Marino 18986d7f5d3SJohn Marinowill cause the specified gcc to be used as the C compiler (unless it is 19086d7f5d3SJohn Marinooverridden in the site shell script). 19186d7f5d3SJohn Marino 19286d7f5d3SJohn Marino`configure' Invocation 19386d7f5d3SJohn Marino====================== 19486d7f5d3SJohn Marino 19586d7f5d3SJohn Marino `configure' recognizes the following options to control how it 19686d7f5d3SJohn Marinooperates. 19786d7f5d3SJohn Marino 19886d7f5d3SJohn Marino`--help' 19986d7f5d3SJohn Marino`-h' 20086d7f5d3SJohn Marino Print a summary of the options to `configure', and exit. 20186d7f5d3SJohn Marino 20286d7f5d3SJohn Marino`--version' 20386d7f5d3SJohn Marino`-V' 20486d7f5d3SJohn Marino Print the version of Autoconf used to generate the `configure' 20586d7f5d3SJohn Marino script, and exit. 20686d7f5d3SJohn Marino 20786d7f5d3SJohn Marino`--cache-file=FILE' 20886d7f5d3SJohn Marino Enable the cache: use and save the results of the tests in FILE, 20986d7f5d3SJohn Marino traditionally `config.cache'. FILE defaults to `/dev/null' to 21086d7f5d3SJohn Marino disable caching. 21186d7f5d3SJohn Marino 21286d7f5d3SJohn Marino`--config-cache' 21386d7f5d3SJohn Marino`-C' 21486d7f5d3SJohn Marino Alias for `--cache-file=config.cache'. 21586d7f5d3SJohn Marino 21686d7f5d3SJohn Marino`--quiet' 21786d7f5d3SJohn Marino`--silent' 21886d7f5d3SJohn Marino`-q' 21986d7f5d3SJohn Marino Do not print messages saying which checks are being made. To 22086d7f5d3SJohn Marino suppress all normal output, redirect it to `/dev/null' (any error 22186d7f5d3SJohn Marino messages will still be shown). 22286d7f5d3SJohn Marino 22386d7f5d3SJohn Marino`--srcdir=DIR' 22486d7f5d3SJohn Marino Look for the package's source code in directory DIR. Usually 22586d7f5d3SJohn Marino `configure' can determine that directory automatically. 22686d7f5d3SJohn Marino 22786d7f5d3SJohn Marino`configure' also accepts some other, not widely useful, options. Run 22886d7f5d3SJohn Marino`configure --help' for more details. 22986d7f5d3SJohn Marino 230