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