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