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