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