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