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