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