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