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