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