INSTALL revision 417cc7e8
1417cc7e8SmrgInstallation Instructions 2417cc7e8Smrg************************* 3af7c02bdSmrg 4417cc7e8SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5417cc7e8Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6af7c02bdSmrg 7417cc7e8Smrg This file is free documentation; the Free Software Foundation gives 8417cc7e8Smrgunlimited permission to copy, distribute and modify it. 9417cc7e8Smrg 10417cc7e8SmrgBasic Installation 11417cc7e8Smrg================== 12417cc7e8Smrg 13417cc7e8Smrg Briefly, the shell commands `./configure; make; make install' should 14417cc7e8Smrgconfigure, build, and install this package. The following 15417cc7e8Smrgmore-detailed instructions are generic; see the `README' file for 16417cc7e8Smrginstructions specific to this package. 17417cc7e8Smrg 18417cc7e8Smrg The `configure' shell script attempts to guess correct values for 19417cc7e8Smrgvarious system-dependent variables used during compilation. It uses 20417cc7e8Smrgthose values to create a `Makefile' in each directory of the package. 21417cc7e8SmrgIt may also create one or more `.h' files containing system-dependent 22417cc7e8Smrgdefinitions. Finally, it creates a shell script `config.status' that 23417cc7e8Smrgyou can run in the future to recreate the current configuration, and a 24417cc7e8Smrgfile `config.log' containing compiler output (useful mainly for 25417cc7e8Smrgdebugging `configure'). 26417cc7e8Smrg 27417cc7e8Smrg It can also use an optional file (typically called `config.cache' 28417cc7e8Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29417cc7e8Smrgthe results of its tests to speed up reconfiguring. Caching is 30417cc7e8Smrgdisabled by default to prevent problems with accidental use of stale 31417cc7e8Smrgcache files. 32417cc7e8Smrg 33417cc7e8Smrg If you need to do unusual things to compile the package, please try 34417cc7e8Smrgto figure out how `configure' could check whether to do them, and mail 35417cc7e8Smrgdiffs or instructions to the address given in the `README' so they can 36417cc7e8Smrgbe considered for the next release. If you are using the cache, and at 37417cc7e8Smrgsome point `config.cache' contains results you don't want to keep, you 38417cc7e8Smrgmay remove or edit it. 39417cc7e8Smrg 40417cc7e8Smrg The file `configure.ac' (or `configure.in') is used to create 41417cc7e8Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42417cc7e8Smrgyou want to change it or regenerate `configure' using a newer version 43417cc7e8Smrgof `autoconf'. 44417cc7e8Smrg 45417cc7e8SmrgThe simplest way to compile this package is: 46417cc7e8Smrg 47417cc7e8Smrg 1. `cd' to the directory containing the package's source code and type 48417cc7e8Smrg `./configure' to configure the package for your system. 49417cc7e8Smrg 50417cc7e8Smrg Running `configure' might take a while. While running, it prints 51417cc7e8Smrg some messages telling which features it is checking for. 52417cc7e8Smrg 53417cc7e8Smrg 2. Type `make' to compile the package. 54417cc7e8Smrg 55417cc7e8Smrg 3. Optionally, type `make check' to run any self-tests that come with 56417cc7e8Smrg the package. 57417cc7e8Smrg 58417cc7e8Smrg 4. Type `make install' to install the programs and any data files and 59417cc7e8Smrg documentation. 60417cc7e8Smrg 61417cc7e8Smrg 5. You can remove the program binaries and object files from the 62417cc7e8Smrg source code directory by typing `make clean'. To also remove the 63417cc7e8Smrg files that `configure' created (so you can compile the package for 64417cc7e8Smrg a different kind of computer), type `make distclean'. There is 65417cc7e8Smrg also a `make maintainer-clean' target, but that is intended mainly 66417cc7e8Smrg for the package's developers. If you use it, you may have to get 67417cc7e8Smrg all sorts of other programs in order to regenerate files that came 68417cc7e8Smrg with the distribution. 69417cc7e8Smrg 70417cc7e8Smrg 6. Often, you can also type `make uninstall' to remove the installed 71417cc7e8Smrg files again. 72417cc7e8Smrg 73417cc7e8SmrgCompilers and Options 74417cc7e8Smrg===================== 75417cc7e8Smrg 76417cc7e8Smrg Some systems require unusual options for compilation or linking that 77417cc7e8Smrgthe `configure' script does not know about. Run `./configure --help' 78417cc7e8Smrgfor details on some of the pertinent environment variables. 79417cc7e8Smrg 80417cc7e8Smrg You can give `configure' initial values for configuration parameters 81417cc7e8Smrgby setting variables in the command line or in the environment. Here 82417cc7e8Smrgis an example: 83417cc7e8Smrg 84417cc7e8Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85417cc7e8Smrg 86417cc7e8Smrg *Note Defining Variables::, for more details. 87417cc7e8Smrg 88417cc7e8SmrgCompiling For Multiple Architectures 89417cc7e8Smrg==================================== 90417cc7e8Smrg 91417cc7e8Smrg You can compile the package for more than one kind of computer at the 92417cc7e8Smrgsame time, by placing the object files for each architecture in their 93417cc7e8Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94417cc7e8Smrgdirectory where you want the object files and executables to go and run 95417cc7e8Smrgthe `configure' script. `configure' automatically checks for the 96417cc7e8Smrgsource code in the directory that `configure' is in and in `..'. 97417cc7e8Smrg 98417cc7e8Smrg With a non-GNU `make', it is safer to compile the package for one 99417cc7e8Smrgarchitecture at a time in the source code directory. After you have 100417cc7e8Smrginstalled the package for one architecture, use `make distclean' before 101417cc7e8Smrgreconfiguring for another architecture. 102417cc7e8Smrg 103417cc7e8Smrg On MacOS X 10.5 and later systems, you can create libraries and 104417cc7e8Smrgexecutables that work on multiple system types--known as "fat" or 105417cc7e8Smrg"universal" binaries--by specifying multiple `-arch' options to the 106417cc7e8Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107417cc7e8Smrgthis: 108417cc7e8Smrg 109417cc7e8Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110417cc7e8Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111417cc7e8Smrg CPP="gcc -E" CXXCPP="g++ -E" 112417cc7e8Smrg 113417cc7e8Smrg This is not guaranteed to produce working output in all cases, you 114417cc7e8Smrgmay have to build one architecture at a time and combine the results 115417cc7e8Smrgusing the `lipo' tool if you have problems. 116417cc7e8Smrg 117417cc7e8SmrgInstallation Names 118417cc7e8Smrg================== 119417cc7e8Smrg 120417cc7e8Smrg By default, `make install' installs the package's commands under 121417cc7e8Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122417cc7e8Smrgcan specify an installation prefix other than `/usr/local' by giving 123417cc7e8Smrg`configure' the option `--prefix=PREFIX'. 124417cc7e8Smrg 125417cc7e8Smrg You can specify separate installation prefixes for 126417cc7e8Smrgarchitecture-specific files and architecture-independent files. If you 127417cc7e8Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128417cc7e8SmrgPREFIX as the prefix for installing programs and libraries. 129417cc7e8SmrgDocumentation and other data files still use the regular prefix. 130417cc7e8Smrg 131417cc7e8Smrg In addition, if you use an unusual directory layout you can give 132417cc7e8Smrgoptions like `--bindir=DIR' to specify different values for particular 133417cc7e8Smrgkinds of files. Run `configure --help' for a list of the directories 134417cc7e8Smrgyou can set and what kinds of files go in them. 135417cc7e8Smrg 136417cc7e8Smrg If the package supports it, you can cause programs to be installed 137417cc7e8Smrgwith an extra prefix or suffix on their names by giving `configure' the 138417cc7e8Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139417cc7e8Smrg 140417cc7e8SmrgOptional Features 141417cc7e8Smrg================= 142417cc7e8Smrg 143417cc7e8Smrg Some packages pay attention to `--enable-FEATURE' options to 144417cc7e8Smrg`configure', where FEATURE indicates an optional part of the package. 145417cc7e8SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146417cc7e8Smrgis something like `gnu-as' or `x' (for the X Window System). The 147417cc7e8Smrg`README' should mention any `--enable-' and `--with-' options that the 148417cc7e8Smrgpackage recognizes. 149417cc7e8Smrg 150417cc7e8Smrg For packages that use the X Window System, `configure' can usually 151417cc7e8Smrgfind the X include and library files automatically, but if it doesn't, 152417cc7e8Smrgyou can use the `configure' options `--x-includes=DIR' and 153417cc7e8Smrg`--x-libraries=DIR' to specify their locations. 154417cc7e8Smrg 155417cc7e8SmrgParticular systems 156417cc7e8Smrg================== 157417cc7e8Smrg 158417cc7e8Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159417cc7e8SmrgCC is not installed, it is recommended to use the following options in 160417cc7e8Smrgorder to use an ANSI C compiler: 161417cc7e8Smrg 162417cc7e8Smrg ./configure CC="cc -Ae" 163417cc7e8Smrg 164417cc7e8Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165417cc7e8Smrg 166417cc7e8Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167417cc7e8Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168417cc7e8Smrga workaround. If GNU CC is not installed, it is therefore recommended 169417cc7e8Smrgto try 170417cc7e8Smrg 171417cc7e8Smrg ./configure CC="cc" 172417cc7e8Smrg 173417cc7e8Smrgand if that doesn't work, try 174417cc7e8Smrg 175417cc7e8Smrg ./configure CC="cc -nodtk" 176417cc7e8Smrg 177417cc7e8SmrgSpecifying the System Type 178417cc7e8Smrg========================== 179417cc7e8Smrg 180417cc7e8Smrg There may be some features `configure' cannot figure out 181417cc7e8Smrgautomatically, but needs to determine by the type of machine the package 182417cc7e8Smrgwill run on. Usually, assuming the package is built to be run on the 183417cc7e8Smrg_same_ architectures, `configure' can figure that out, but if it prints 184417cc7e8Smrga message saying it cannot guess the machine type, give it the 185417cc7e8Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186417cc7e8Smrgtype, such as `sun4', or a canonical name which has the form: 187417cc7e8Smrg 188417cc7e8Smrg CPU-COMPANY-SYSTEM 189417cc7e8Smrg 190417cc7e8Smrgwhere SYSTEM can have one of these forms: 191417cc7e8Smrg 192417cc7e8Smrg OS KERNEL-OS 193417cc7e8Smrg 194417cc7e8Smrg See the file `config.sub' for the possible values of each field. If 195417cc7e8Smrg`config.sub' isn't included in this package, then this package doesn't 196417cc7e8Smrgneed to know the machine type. 197417cc7e8Smrg 198417cc7e8Smrg If you are _building_ compiler tools for cross-compiling, you should 199417cc7e8Smrguse the option `--target=TYPE' to select the type of system they will 200417cc7e8Smrgproduce code for. 201417cc7e8Smrg 202417cc7e8Smrg If you want to _use_ a cross compiler, that generates code for a 203417cc7e8Smrgplatform different from the build platform, you should specify the 204417cc7e8Smrg"host" platform (i.e., that on which the generated programs will 205417cc7e8Smrgeventually be run) with `--host=TYPE'. 206417cc7e8Smrg 207417cc7e8SmrgSharing Defaults 208417cc7e8Smrg================ 209417cc7e8Smrg 210417cc7e8Smrg If you want to set default values for `configure' scripts to share, 211417cc7e8Smrgyou can create a site shell script called `config.site' that gives 212417cc7e8Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213417cc7e8Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214417cc7e8Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215417cc7e8Smrg`CONFIG_SITE' environment variable to the location of the site script. 216417cc7e8SmrgA warning: not all `configure' scripts look for a site script. 217417cc7e8Smrg 218417cc7e8SmrgDefining Variables 219417cc7e8Smrg================== 220417cc7e8Smrg 221417cc7e8Smrg Variables not defined in a site shell script can be set in the 222417cc7e8Smrgenvironment passed to `configure'. However, some packages may run 223417cc7e8Smrgconfigure again during the build, and the customized values of these 224417cc7e8Smrgvariables may be lost. In order to avoid this problem, you should set 225417cc7e8Smrgthem in the `configure' command line, using `VAR=value'. For example: 226417cc7e8Smrg 227417cc7e8Smrg ./configure CC=/usr/local2/bin/gcc 228417cc7e8Smrg 229417cc7e8Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230417cc7e8Smrgoverridden in the site shell script). 231417cc7e8Smrg 232417cc7e8SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233417cc7e8Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234417cc7e8Smrg 235417cc7e8Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236417cc7e8Smrg 237417cc7e8Smrg`configure' Invocation 238417cc7e8Smrg====================== 239417cc7e8Smrg 240417cc7e8Smrg `configure' recognizes the following options to control how it 241417cc7e8Smrgoperates. 242417cc7e8Smrg 243417cc7e8Smrg`--help' 244417cc7e8Smrg`-h' 245417cc7e8Smrg Print a summary of all of the options to `configure', and exit. 246417cc7e8Smrg 247417cc7e8Smrg`--help=short' 248417cc7e8Smrg`--help=recursive' 249417cc7e8Smrg Print a summary of the options unique to this package's 250417cc7e8Smrg `configure', and exit. The `short' variant lists options used 251417cc7e8Smrg only in the top level, while the `recursive' variant lists options 252417cc7e8Smrg also present in any nested packages. 253417cc7e8Smrg 254417cc7e8Smrg`--version' 255417cc7e8Smrg`-V' 256417cc7e8Smrg Print the version of Autoconf used to generate the `configure' 257417cc7e8Smrg script, and exit. 258417cc7e8Smrg 259417cc7e8Smrg`--cache-file=FILE' 260417cc7e8Smrg Enable the cache: use and save the results of the tests in FILE, 261417cc7e8Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262417cc7e8Smrg disable caching. 263417cc7e8Smrg 264417cc7e8Smrg`--config-cache' 265417cc7e8Smrg`-C' 266417cc7e8Smrg Alias for `--cache-file=config.cache'. 267417cc7e8Smrg 268417cc7e8Smrg`--quiet' 269417cc7e8Smrg`--silent' 270417cc7e8Smrg`-q' 271417cc7e8Smrg Do not print messages saying which checks are being made. To 272417cc7e8Smrg suppress all normal output, redirect it to `/dev/null' (any error 273417cc7e8Smrg messages will still be shown). 274417cc7e8Smrg 275417cc7e8Smrg`--srcdir=DIR' 276417cc7e8Smrg Look for the package's source code in directory DIR. Usually 277417cc7e8Smrg `configure' can determine that directory automatically. 278417cc7e8Smrg 279417cc7e8Smrg`--prefix=DIR' 280417cc7e8Smrg Use DIR as the installation prefix. *Note Installation Names:: 281417cc7e8Smrg for more details, including other options available for fine-tuning 282417cc7e8Smrg the installation locations. 283417cc7e8Smrg 284417cc7e8Smrg`--no-create' 285417cc7e8Smrg`-n' 286417cc7e8Smrg Run the configure checks, but stop before creating any output 287417cc7e8Smrg files. 288417cc7e8Smrg 289417cc7e8Smrg`configure' also accepts some other, not widely useful, options. Run 290417cc7e8Smrg`configure --help' for more details. 291af7c02bdSmrg 292