INSTALL revision 880c7e28
1880c7e28SmrgInstallation Instructions 2880c7e28Smrg************************* 3880c7e28Smrg 4880c7e28SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5880c7e28Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6880c7e28Smrg 7880c7e28Smrg This file is free documentation; the Free Software Foundation gives 8880c7e28Smrgunlimited permission to copy, distribute and modify it. 9880c7e28Smrg 10880c7e28SmrgBasic Installation 11880c7e28Smrg================== 12880c7e28Smrg 13880c7e28Smrg Briefly, the shell commands `./configure; make; make install' should 14880c7e28Smrgconfigure, build, and install this package. The following 15880c7e28Smrgmore-detailed instructions are generic; see the `README' file for 16880c7e28Smrginstructions specific to this package. 17880c7e28Smrg 18880c7e28Smrg The `configure' shell script attempts to guess correct values for 19880c7e28Smrgvarious system-dependent variables used during compilation. It uses 20880c7e28Smrgthose values to create a `Makefile' in each directory of the package. 21880c7e28SmrgIt may also create one or more `.h' files containing system-dependent 22880c7e28Smrgdefinitions. Finally, it creates a shell script `config.status' that 23880c7e28Smrgyou can run in the future to recreate the current configuration, and a 24880c7e28Smrgfile `config.log' containing compiler output (useful mainly for 25880c7e28Smrgdebugging `configure'). 26880c7e28Smrg 27880c7e28Smrg It can also use an optional file (typically called `config.cache' 28880c7e28Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29880c7e28Smrgthe results of its tests to speed up reconfiguring. Caching is 30880c7e28Smrgdisabled by default to prevent problems with accidental use of stale 31880c7e28Smrgcache files. 32880c7e28Smrg 33880c7e28Smrg If you need to do unusual things to compile the package, please try 34880c7e28Smrgto figure out how `configure' could check whether to do them, and mail 35880c7e28Smrgdiffs or instructions to the address given in the `README' so they can 36880c7e28Smrgbe considered for the next release. If you are using the cache, and at 37880c7e28Smrgsome point `config.cache' contains results you don't want to keep, you 38880c7e28Smrgmay remove or edit it. 39880c7e28Smrg 40880c7e28Smrg The file `configure.ac' (or `configure.in') is used to create 41880c7e28Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42880c7e28Smrgyou want to change it or regenerate `configure' using a newer version 43880c7e28Smrgof `autoconf'. 44880c7e28Smrg 45880c7e28SmrgThe simplest way to compile this package is: 46880c7e28Smrg 47880c7e28Smrg 1. `cd' to the directory containing the package's source code and type 48880c7e28Smrg `./configure' to configure the package for your system. 49880c7e28Smrg 50880c7e28Smrg Running `configure' might take a while. While running, it prints 51880c7e28Smrg some messages telling which features it is checking for. 52880c7e28Smrg 53880c7e28Smrg 2. Type `make' to compile the package. 54880c7e28Smrg 55880c7e28Smrg 3. Optionally, type `make check' to run any self-tests that come with 56880c7e28Smrg the package. 57880c7e28Smrg 58880c7e28Smrg 4. Type `make install' to install the programs and any data files and 59880c7e28Smrg documentation. 60880c7e28Smrg 61880c7e28Smrg 5. You can remove the program binaries and object files from the 62880c7e28Smrg source code directory by typing `make clean'. To also remove the 63880c7e28Smrg files that `configure' created (so you can compile the package for 64880c7e28Smrg a different kind of computer), type `make distclean'. There is 65880c7e28Smrg also a `make maintainer-clean' target, but that is intended mainly 66880c7e28Smrg for the package's developers. If you use it, you may have to get 67880c7e28Smrg all sorts of other programs in order to regenerate files that came 68880c7e28Smrg with the distribution. 69880c7e28Smrg 70880c7e28Smrg 6. Often, you can also type `make uninstall' to remove the installed 71880c7e28Smrg files again. 72880c7e28Smrg 73880c7e28SmrgCompilers and Options 74880c7e28Smrg===================== 75880c7e28Smrg 76880c7e28Smrg Some systems require unusual options for compilation or linking that 77880c7e28Smrgthe `configure' script does not know about. Run `./configure --help' 78880c7e28Smrgfor details on some of the pertinent environment variables. 79880c7e28Smrg 80880c7e28Smrg You can give `configure' initial values for configuration parameters 81880c7e28Smrgby setting variables in the command line or in the environment. Here 82880c7e28Smrgis an example: 83880c7e28Smrg 84880c7e28Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85880c7e28Smrg 86880c7e28Smrg *Note Defining Variables::, for more details. 87880c7e28Smrg 88880c7e28SmrgCompiling For Multiple Architectures 89880c7e28Smrg==================================== 90880c7e28Smrg 91880c7e28Smrg You can compile the package for more than one kind of computer at the 92880c7e28Smrgsame time, by placing the object files for each architecture in their 93880c7e28Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94880c7e28Smrgdirectory where you want the object files and executables to go and run 95880c7e28Smrgthe `configure' script. `configure' automatically checks for the 96880c7e28Smrgsource code in the directory that `configure' is in and in `..'. 97880c7e28Smrg 98880c7e28Smrg With a non-GNU `make', it is safer to compile the package for one 99880c7e28Smrgarchitecture at a time in the source code directory. After you have 100880c7e28Smrginstalled the package for one architecture, use `make distclean' before 101880c7e28Smrgreconfiguring for another architecture. 102880c7e28Smrg 103880c7e28Smrg On MacOS X 10.5 and later systems, you can create libraries and 104880c7e28Smrgexecutables that work on multiple system types--known as "fat" or 105880c7e28Smrg"universal" binaries--by specifying multiple `-arch' options to the 106880c7e28Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107880c7e28Smrgthis: 108880c7e28Smrg 109880c7e28Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110880c7e28Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111880c7e28Smrg CPP="gcc -E" CXXCPP="g++ -E" 112880c7e28Smrg 113880c7e28Smrg This is not guaranteed to produce working output in all cases, you 114880c7e28Smrgmay have to build one architecture at a time and combine the results 115880c7e28Smrgusing the `lipo' tool if you have problems. 116880c7e28Smrg 117880c7e28SmrgInstallation Names 118880c7e28Smrg================== 119880c7e28Smrg 120880c7e28Smrg By default, `make install' installs the package's commands under 121880c7e28Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122880c7e28Smrgcan specify an installation prefix other than `/usr/local' by giving 123880c7e28Smrg`configure' the option `--prefix=PREFIX'. 124880c7e28Smrg 125880c7e28Smrg You can specify separate installation prefixes for 126880c7e28Smrgarchitecture-specific files and architecture-independent files. If you 127880c7e28Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128880c7e28SmrgPREFIX as the prefix for installing programs and libraries. 129880c7e28SmrgDocumentation and other data files still use the regular prefix. 130880c7e28Smrg 131880c7e28Smrg In addition, if you use an unusual directory layout you can give 132880c7e28Smrgoptions like `--bindir=DIR' to specify different values for particular 133880c7e28Smrgkinds of files. Run `configure --help' for a list of the directories 134880c7e28Smrgyou can set and what kinds of files go in them. 135880c7e28Smrg 136880c7e28Smrg If the package supports it, you can cause programs to be installed 137880c7e28Smrgwith an extra prefix or suffix on their names by giving `configure' the 138880c7e28Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139880c7e28Smrg 140880c7e28SmrgOptional Features 141880c7e28Smrg================= 142880c7e28Smrg 143880c7e28Smrg Some packages pay attention to `--enable-FEATURE' options to 144880c7e28Smrg`configure', where FEATURE indicates an optional part of the package. 145880c7e28SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146880c7e28Smrgis something like `gnu-as' or `x' (for the X Window System). The 147880c7e28Smrg`README' should mention any `--enable-' and `--with-' options that the 148880c7e28Smrgpackage recognizes. 149880c7e28Smrg 150880c7e28Smrg For packages that use the X Window System, `configure' can usually 151880c7e28Smrgfind the X include and library files automatically, but if it doesn't, 152880c7e28Smrgyou can use the `configure' options `--x-includes=DIR' and 153880c7e28Smrg`--x-libraries=DIR' to specify their locations. 154880c7e28Smrg 155880c7e28SmrgParticular systems 156880c7e28Smrg================== 157880c7e28Smrg 158880c7e28Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159880c7e28SmrgCC is not installed, it is recommended to use the following options in 160880c7e28Smrgorder to use an ANSI C compiler: 161880c7e28Smrg 162880c7e28Smrg ./configure CC="cc -Ae" 163880c7e28Smrg 164880c7e28Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165880c7e28Smrg 166880c7e28Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167880c7e28Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168880c7e28Smrga workaround. If GNU CC is not installed, it is therefore recommended 169880c7e28Smrgto try 170880c7e28Smrg 171880c7e28Smrg ./configure CC="cc" 172880c7e28Smrg 173880c7e28Smrgand if that doesn't work, try 174880c7e28Smrg 175880c7e28Smrg ./configure CC="cc -nodtk" 176880c7e28Smrg 177880c7e28SmrgSpecifying the System Type 178880c7e28Smrg========================== 179880c7e28Smrg 180880c7e28Smrg There may be some features `configure' cannot figure out 181880c7e28Smrgautomatically, but needs to determine by the type of machine the package 182880c7e28Smrgwill run on. Usually, assuming the package is built to be run on the 183880c7e28Smrg_same_ architectures, `configure' can figure that out, but if it prints 184880c7e28Smrga message saying it cannot guess the machine type, give it the 185880c7e28Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186880c7e28Smrgtype, such as `sun4', or a canonical name which has the form: 187880c7e28Smrg 188880c7e28Smrg CPU-COMPANY-SYSTEM 189880c7e28Smrg 190880c7e28Smrgwhere SYSTEM can have one of these forms: 191880c7e28Smrg 192880c7e28Smrg OS KERNEL-OS 193880c7e28Smrg 194880c7e28Smrg See the file `config.sub' for the possible values of each field. If 195880c7e28Smrg`config.sub' isn't included in this package, then this package doesn't 196880c7e28Smrgneed to know the machine type. 197880c7e28Smrg 198880c7e28Smrg If you are _building_ compiler tools for cross-compiling, you should 199880c7e28Smrguse the option `--target=TYPE' to select the type of system they will 200880c7e28Smrgproduce code for. 201880c7e28Smrg 202880c7e28Smrg If you want to _use_ a cross compiler, that generates code for a 203880c7e28Smrgplatform different from the build platform, you should specify the 204880c7e28Smrg"host" platform (i.e., that on which the generated programs will 205880c7e28Smrgeventually be run) with `--host=TYPE'. 206880c7e28Smrg 207880c7e28SmrgSharing Defaults 208880c7e28Smrg================ 209880c7e28Smrg 210880c7e28Smrg If you want to set default values for `configure' scripts to share, 211880c7e28Smrgyou can create a site shell script called `config.site' that gives 212880c7e28Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213880c7e28Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214880c7e28Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215880c7e28Smrg`CONFIG_SITE' environment variable to the location of the site script. 216880c7e28SmrgA warning: not all `configure' scripts look for a site script. 217880c7e28Smrg 218880c7e28SmrgDefining Variables 219880c7e28Smrg================== 220880c7e28Smrg 221880c7e28Smrg Variables not defined in a site shell script can be set in the 222880c7e28Smrgenvironment passed to `configure'. However, some packages may run 223880c7e28Smrgconfigure again during the build, and the customized values of these 224880c7e28Smrgvariables may be lost. In order to avoid this problem, you should set 225880c7e28Smrgthem in the `configure' command line, using `VAR=value'. For example: 226880c7e28Smrg 227880c7e28Smrg ./configure CC=/usr/local2/bin/gcc 228880c7e28Smrg 229880c7e28Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230880c7e28Smrgoverridden in the site shell script). 231880c7e28Smrg 232880c7e28SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233880c7e28Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234880c7e28Smrg 235880c7e28Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236880c7e28Smrg 237880c7e28Smrg`configure' Invocation 238880c7e28Smrg====================== 239880c7e28Smrg 240880c7e28Smrg `configure' recognizes the following options to control how it 241880c7e28Smrgoperates. 242880c7e28Smrg 243880c7e28Smrg`--help' 244880c7e28Smrg`-h' 245880c7e28Smrg Print a summary of all of the options to `configure', and exit. 246880c7e28Smrg 247880c7e28Smrg`--help=short' 248880c7e28Smrg`--help=recursive' 249880c7e28Smrg Print a summary of the options unique to this package's 250880c7e28Smrg `configure', and exit. The `short' variant lists options used 251880c7e28Smrg only in the top level, while the `recursive' variant lists options 252880c7e28Smrg also present in any nested packages. 253880c7e28Smrg 254880c7e28Smrg`--version' 255880c7e28Smrg`-V' 256880c7e28Smrg Print the version of Autoconf used to generate the `configure' 257880c7e28Smrg script, and exit. 258880c7e28Smrg 259880c7e28Smrg`--cache-file=FILE' 260880c7e28Smrg Enable the cache: use and save the results of the tests in FILE, 261880c7e28Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262880c7e28Smrg disable caching. 263880c7e28Smrg 264880c7e28Smrg`--config-cache' 265880c7e28Smrg`-C' 266880c7e28Smrg Alias for `--cache-file=config.cache'. 267880c7e28Smrg 268880c7e28Smrg`--quiet' 269880c7e28Smrg`--silent' 270880c7e28Smrg`-q' 271880c7e28Smrg Do not print messages saying which checks are being made. To 272880c7e28Smrg suppress all normal output, redirect it to `/dev/null' (any error 273880c7e28Smrg messages will still be shown). 274880c7e28Smrg 275880c7e28Smrg`--srcdir=DIR' 276880c7e28Smrg Look for the package's source code in directory DIR. Usually 277880c7e28Smrg `configure' can determine that directory automatically. 278880c7e28Smrg 279880c7e28Smrg`--prefix=DIR' 280880c7e28Smrg Use DIR as the installation prefix. *Note Installation Names:: 281880c7e28Smrg for more details, including other options available for fine-tuning 282880c7e28Smrg the installation locations. 283880c7e28Smrg 284880c7e28Smrg`--no-create' 285880c7e28Smrg`-n' 286880c7e28Smrg Run the configure checks, but stop before creating any output 287880c7e28Smrg files. 288880c7e28Smrg 289880c7e28Smrg`configure' also accepts some other, not widely useful, options. Run 290880c7e28Smrg`configure --help' for more details. 291880c7e28Smrg 292