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