INSTALL revision a5399cb1
1a5399cb1SmrgInstallation Instructions 2a5399cb1Smrg************************* 3a5399cb1Smrg 4a5399cb1SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5a5399cb1Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6a5399cb1Smrg 7a5399cb1Smrg This file is free documentation; the Free Software Foundation gives 8a5399cb1Smrgunlimited permission to copy, distribute and modify it. 9a5399cb1Smrg 10a5399cb1SmrgBasic Installation 11a5399cb1Smrg================== 12a5399cb1Smrg 13a5399cb1Smrg Briefly, the shell commands `./configure; make; make install' should 14a5399cb1Smrgconfigure, build, and install this package. The following 15a5399cb1Smrgmore-detailed instructions are generic; see the `README' file for 16a5399cb1Smrginstructions specific to this package. 17a5399cb1Smrg 18a5399cb1Smrg The `configure' shell script attempts to guess correct values for 19a5399cb1Smrgvarious system-dependent variables used during compilation. It uses 20a5399cb1Smrgthose values to create a `Makefile' in each directory of the package. 21a5399cb1SmrgIt may also create one or more `.h' files containing system-dependent 22a5399cb1Smrgdefinitions. Finally, it creates a shell script `config.status' that 23a5399cb1Smrgyou can run in the future to recreate the current configuration, and a 24a5399cb1Smrgfile `config.log' containing compiler output (useful mainly for 25a5399cb1Smrgdebugging `configure'). 26a5399cb1Smrg 27a5399cb1Smrg It can also use an optional file (typically called `config.cache' 28a5399cb1Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29a5399cb1Smrgthe results of its tests to speed up reconfiguring. Caching is 30a5399cb1Smrgdisabled by default to prevent problems with accidental use of stale 31a5399cb1Smrgcache files. 32a5399cb1Smrg 33a5399cb1Smrg If you need to do unusual things to compile the package, please try 34a5399cb1Smrgto figure out how `configure' could check whether to do them, and mail 35a5399cb1Smrgdiffs or instructions to the address given in the `README' so they can 36a5399cb1Smrgbe considered for the next release. If you are using the cache, and at 37a5399cb1Smrgsome point `config.cache' contains results you don't want to keep, you 38a5399cb1Smrgmay remove or edit it. 39a5399cb1Smrg 40a5399cb1Smrg The file `configure.ac' (or `configure.in') is used to create 41a5399cb1Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42a5399cb1Smrgyou want to change it or regenerate `configure' using a newer version 43a5399cb1Smrgof `autoconf'. 44a5399cb1Smrg 45a5399cb1SmrgThe simplest way to compile this package is: 46a5399cb1Smrg 47a5399cb1Smrg 1. `cd' to the directory containing the package's source code and type 48a5399cb1Smrg `./configure' to configure the package for your system. 49a5399cb1Smrg 50a5399cb1Smrg Running `configure' might take a while. While running, it prints 51a5399cb1Smrg some messages telling which features it is checking for. 52a5399cb1Smrg 53a5399cb1Smrg 2. Type `make' to compile the package. 54a5399cb1Smrg 55a5399cb1Smrg 3. Optionally, type `make check' to run any self-tests that come with 56a5399cb1Smrg the package. 57a5399cb1Smrg 58a5399cb1Smrg 4. Type `make install' to install the programs and any data files and 59a5399cb1Smrg documentation. 60a5399cb1Smrg 61a5399cb1Smrg 5. You can remove the program binaries and object files from the 62a5399cb1Smrg source code directory by typing `make clean'. To also remove the 63a5399cb1Smrg files that `configure' created (so you can compile the package for 64a5399cb1Smrg a different kind of computer), type `make distclean'. There is 65a5399cb1Smrg also a `make maintainer-clean' target, but that is intended mainly 66a5399cb1Smrg for the package's developers. If you use it, you may have to get 67a5399cb1Smrg all sorts of other programs in order to regenerate files that came 68a5399cb1Smrg with the distribution. 69a5399cb1Smrg 70a5399cb1Smrg 6. Often, you can also type `make uninstall' to remove the installed 71a5399cb1Smrg files again. 72a5399cb1Smrg 73a5399cb1SmrgCompilers and Options 74a5399cb1Smrg===================== 75a5399cb1Smrg 76a5399cb1Smrg Some systems require unusual options for compilation or linking that 77a5399cb1Smrgthe `configure' script does not know about. Run `./configure --help' 78a5399cb1Smrgfor details on some of the pertinent environment variables. 79a5399cb1Smrg 80a5399cb1Smrg You can give `configure' initial values for configuration parameters 81a5399cb1Smrgby setting variables in the command line or in the environment. Here 82a5399cb1Smrgis an example: 83a5399cb1Smrg 84a5399cb1Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85a5399cb1Smrg 86a5399cb1Smrg *Note Defining Variables::, for more details. 87a5399cb1Smrg 88a5399cb1SmrgCompiling For Multiple Architectures 89a5399cb1Smrg==================================== 90a5399cb1Smrg 91a5399cb1Smrg You can compile the package for more than one kind of computer at the 92a5399cb1Smrgsame time, by placing the object files for each architecture in their 93a5399cb1Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94a5399cb1Smrgdirectory where you want the object files and executables to go and run 95a5399cb1Smrgthe `configure' script. `configure' automatically checks for the 96a5399cb1Smrgsource code in the directory that `configure' is in and in `..'. 97a5399cb1Smrg 98a5399cb1Smrg With a non-GNU `make', it is safer to compile the package for one 99a5399cb1Smrgarchitecture at a time in the source code directory. After you have 100a5399cb1Smrginstalled the package for one architecture, use `make distclean' before 101a5399cb1Smrgreconfiguring for another architecture. 102a5399cb1Smrg 103a5399cb1Smrg On MacOS X 10.5 and later systems, you can create libraries and 104a5399cb1Smrgexecutables that work on multiple system types--known as "fat" or 105a5399cb1Smrg"universal" binaries--by specifying multiple `-arch' options to the 106a5399cb1Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107a5399cb1Smrgthis: 108a5399cb1Smrg 109a5399cb1Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110a5399cb1Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111a5399cb1Smrg CPP="gcc -E" CXXCPP="g++ -E" 112a5399cb1Smrg 113a5399cb1Smrg This is not guaranteed to produce working output in all cases, you 114a5399cb1Smrgmay have to build one architecture at a time and combine the results 115a5399cb1Smrgusing the `lipo' tool if you have problems. 116a5399cb1Smrg 117a5399cb1SmrgInstallation Names 118a5399cb1Smrg================== 119a5399cb1Smrg 120a5399cb1Smrg By default, `make install' installs the package's commands under 121a5399cb1Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122a5399cb1Smrgcan specify an installation prefix other than `/usr/local' by giving 123a5399cb1Smrg`configure' the option `--prefix=PREFIX'. 124a5399cb1Smrg 125a5399cb1Smrg You can specify separate installation prefixes for 126a5399cb1Smrgarchitecture-specific files and architecture-independent files. If you 127a5399cb1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128a5399cb1SmrgPREFIX as the prefix for installing programs and libraries. 129a5399cb1SmrgDocumentation and other data files still use the regular prefix. 130a5399cb1Smrg 131a5399cb1Smrg In addition, if you use an unusual directory layout you can give 132a5399cb1Smrgoptions like `--bindir=DIR' to specify different values for particular 133a5399cb1Smrgkinds of files. Run `configure --help' for a list of the directories 134a5399cb1Smrgyou can set and what kinds of files go in them. 135a5399cb1Smrg 136a5399cb1Smrg If the package supports it, you can cause programs to be installed 137a5399cb1Smrgwith an extra prefix or suffix on their names by giving `configure' the 138a5399cb1Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139a5399cb1Smrg 140a5399cb1SmrgOptional Features 141a5399cb1Smrg================= 142a5399cb1Smrg 143a5399cb1Smrg Some packages pay attention to `--enable-FEATURE' options to 144a5399cb1Smrg`configure', where FEATURE indicates an optional part of the package. 145a5399cb1SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146a5399cb1Smrgis something like `gnu-as' or `x' (for the X Window System). The 147a5399cb1Smrg`README' should mention any `--enable-' and `--with-' options that the 148a5399cb1Smrgpackage recognizes. 149a5399cb1Smrg 150a5399cb1Smrg For packages that use the X Window System, `configure' can usually 151a5399cb1Smrgfind the X include and library files automatically, but if it doesn't, 152a5399cb1Smrgyou can use the `configure' options `--x-includes=DIR' and 153a5399cb1Smrg`--x-libraries=DIR' to specify their locations. 154a5399cb1Smrg 155a5399cb1SmrgParticular systems 156a5399cb1Smrg================== 157a5399cb1Smrg 158a5399cb1Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159a5399cb1SmrgCC is not installed, it is recommended to use the following options in 160a5399cb1Smrgorder to use an ANSI C compiler: 161a5399cb1Smrg 162a5399cb1Smrg ./configure CC="cc -Ae" 163a5399cb1Smrg 164a5399cb1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165a5399cb1Smrg 166a5399cb1Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167a5399cb1Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168a5399cb1Smrga workaround. If GNU CC is not installed, it is therefore recommended 169a5399cb1Smrgto try 170a5399cb1Smrg 171a5399cb1Smrg ./configure CC="cc" 172a5399cb1Smrg 173a5399cb1Smrgand if that doesn't work, try 174a5399cb1Smrg 175a5399cb1Smrg ./configure CC="cc -nodtk" 176a5399cb1Smrg 177a5399cb1SmrgSpecifying the System Type 178a5399cb1Smrg========================== 179a5399cb1Smrg 180a5399cb1Smrg There may be some features `configure' cannot figure out 181a5399cb1Smrgautomatically, but needs to determine by the type of machine the package 182a5399cb1Smrgwill run on. Usually, assuming the package is built to be run on the 183a5399cb1Smrg_same_ architectures, `configure' can figure that out, but if it prints 184a5399cb1Smrga message saying it cannot guess the machine type, give it the 185a5399cb1Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186a5399cb1Smrgtype, such as `sun4', or a canonical name which has the form: 187a5399cb1Smrg 188a5399cb1Smrg CPU-COMPANY-SYSTEM 189a5399cb1Smrg 190a5399cb1Smrgwhere SYSTEM can have one of these forms: 191a5399cb1Smrg 192a5399cb1Smrg OS KERNEL-OS 193a5399cb1Smrg 194a5399cb1Smrg See the file `config.sub' for the possible values of each field. If 195a5399cb1Smrg`config.sub' isn't included in this package, then this package doesn't 196a5399cb1Smrgneed to know the machine type. 197a5399cb1Smrg 198a5399cb1Smrg If you are _building_ compiler tools for cross-compiling, you should 199a5399cb1Smrguse the option `--target=TYPE' to select the type of system they will 200a5399cb1Smrgproduce code for. 201a5399cb1Smrg 202a5399cb1Smrg If you want to _use_ a cross compiler, that generates code for a 203a5399cb1Smrgplatform different from the build platform, you should specify the 204a5399cb1Smrg"host" platform (i.e., that on which the generated programs will 205a5399cb1Smrgeventually be run) with `--host=TYPE'. 206a5399cb1Smrg 207a5399cb1SmrgSharing Defaults 208a5399cb1Smrg================ 209a5399cb1Smrg 210a5399cb1Smrg If you want to set default values for `configure' scripts to share, 211a5399cb1Smrgyou can create a site shell script called `config.site' that gives 212a5399cb1Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213a5399cb1Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214a5399cb1Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215a5399cb1Smrg`CONFIG_SITE' environment variable to the location of the site script. 216a5399cb1SmrgA warning: not all `configure' scripts look for a site script. 217a5399cb1Smrg 218a5399cb1SmrgDefining Variables 219a5399cb1Smrg================== 220a5399cb1Smrg 221a5399cb1Smrg Variables not defined in a site shell script can be set in the 222a5399cb1Smrgenvironment passed to `configure'. However, some packages may run 223a5399cb1Smrgconfigure again during the build, and the customized values of these 224a5399cb1Smrgvariables may be lost. In order to avoid this problem, you should set 225a5399cb1Smrgthem in the `configure' command line, using `VAR=value'. For example: 226a5399cb1Smrg 227a5399cb1Smrg ./configure CC=/usr/local2/bin/gcc 228a5399cb1Smrg 229a5399cb1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230a5399cb1Smrgoverridden in the site shell script). 231a5399cb1Smrg 232a5399cb1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233a5399cb1Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234a5399cb1Smrg 235a5399cb1Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236a5399cb1Smrg 237a5399cb1Smrg`configure' Invocation 238a5399cb1Smrg====================== 239a5399cb1Smrg 240a5399cb1Smrg `configure' recognizes the following options to control how it 241a5399cb1Smrgoperates. 242a5399cb1Smrg 243a5399cb1Smrg`--help' 244a5399cb1Smrg`-h' 245a5399cb1Smrg Print a summary of all of the options to `configure', and exit. 246a5399cb1Smrg 247a5399cb1Smrg`--help=short' 248a5399cb1Smrg`--help=recursive' 249a5399cb1Smrg Print a summary of the options unique to this package's 250a5399cb1Smrg `configure', and exit. The `short' variant lists options used 251a5399cb1Smrg only in the top level, while the `recursive' variant lists options 252a5399cb1Smrg also present in any nested packages. 253a5399cb1Smrg 254a5399cb1Smrg`--version' 255a5399cb1Smrg`-V' 256a5399cb1Smrg Print the version of Autoconf used to generate the `configure' 257a5399cb1Smrg script, and exit. 258a5399cb1Smrg 259a5399cb1Smrg`--cache-file=FILE' 260a5399cb1Smrg Enable the cache: use and save the results of the tests in FILE, 261a5399cb1Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262a5399cb1Smrg disable caching. 263a5399cb1Smrg 264a5399cb1Smrg`--config-cache' 265a5399cb1Smrg`-C' 266a5399cb1Smrg Alias for `--cache-file=config.cache'. 267a5399cb1Smrg 268a5399cb1Smrg`--quiet' 269a5399cb1Smrg`--silent' 270a5399cb1Smrg`-q' 271a5399cb1Smrg Do not print messages saying which checks are being made. To 272a5399cb1Smrg suppress all normal output, redirect it to `/dev/null' (any error 273a5399cb1Smrg messages will still be shown). 274a5399cb1Smrg 275a5399cb1Smrg`--srcdir=DIR' 276a5399cb1Smrg Look for the package's source code in directory DIR. Usually 277a5399cb1Smrg `configure' can determine that directory automatically. 278a5399cb1Smrg 279a5399cb1Smrg`--prefix=DIR' 280a5399cb1Smrg Use DIR as the installation prefix. *Note Installation Names:: 281a5399cb1Smrg for more details, including other options available for fine-tuning 282a5399cb1Smrg the installation locations. 283a5399cb1Smrg 284a5399cb1Smrg`--no-create' 285a5399cb1Smrg`-n' 286a5399cb1Smrg Run the configure checks, but stop before creating any output 287a5399cb1Smrg files. 288a5399cb1Smrg 289a5399cb1Smrg`configure' also accepts some other, not widely useful, options. Run 290a5399cb1Smrg`configure --help' for more details. 291a5399cb1Smrg 292