INSTALL revision 863f95b1
1863f95b1SmrgInstallation Instructions 2863f95b1Smrg************************* 3863f95b1Smrg 4863f95b1SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5863f95b1Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6863f95b1Smrg 7863f95b1Smrg This file is free documentation; the Free Software Foundation gives 8863f95b1Smrgunlimited permission to copy, distribute and modify it. 9863f95b1Smrg 10863f95b1SmrgBasic Installation 11863f95b1Smrg================== 12863f95b1Smrg 13863f95b1Smrg Briefly, the shell commands `./configure; make; make install' should 14863f95b1Smrgconfigure, build, and install this package. The following 15863f95b1Smrgmore-detailed instructions are generic; see the `README' file for 16863f95b1Smrginstructions specific to this package. 17863f95b1Smrg 18863f95b1Smrg The `configure' shell script attempts to guess correct values for 19863f95b1Smrgvarious system-dependent variables used during compilation. It uses 20863f95b1Smrgthose values to create a `Makefile' in each directory of the package. 21863f95b1SmrgIt may also create one or more `.h' files containing system-dependent 22863f95b1Smrgdefinitions. Finally, it creates a shell script `config.status' that 23863f95b1Smrgyou can run in the future to recreate the current configuration, and a 24863f95b1Smrgfile `config.log' containing compiler output (useful mainly for 25863f95b1Smrgdebugging `configure'). 26863f95b1Smrg 27863f95b1Smrg It can also use an optional file (typically called `config.cache' 28863f95b1Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29863f95b1Smrgthe results of its tests to speed up reconfiguring. Caching is 30863f95b1Smrgdisabled by default to prevent problems with accidental use of stale 31863f95b1Smrgcache files. 32863f95b1Smrg 33863f95b1Smrg If you need to do unusual things to compile the package, please try 34863f95b1Smrgto figure out how `configure' could check whether to do them, and mail 35863f95b1Smrgdiffs or instructions to the address given in the `README' so they can 36863f95b1Smrgbe considered for the next release. If you are using the cache, and at 37863f95b1Smrgsome point `config.cache' contains results you don't want to keep, you 38863f95b1Smrgmay remove or edit it. 39863f95b1Smrg 40863f95b1Smrg The file `configure.ac' (or `configure.in') is used to create 41863f95b1Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42863f95b1Smrgyou want to change it or regenerate `configure' using a newer version 43863f95b1Smrgof `autoconf'. 44863f95b1Smrg 45863f95b1SmrgThe simplest way to compile this package is: 46863f95b1Smrg 47863f95b1Smrg 1. `cd' to the directory containing the package's source code and type 48863f95b1Smrg `./configure' to configure the package for your system. 49863f95b1Smrg 50863f95b1Smrg Running `configure' might take a while. While running, it prints 51863f95b1Smrg some messages telling which features it is checking for. 52863f95b1Smrg 53863f95b1Smrg 2. Type `make' to compile the package. 54863f95b1Smrg 55863f95b1Smrg 3. Optionally, type `make check' to run any self-tests that come with 56863f95b1Smrg the package. 57863f95b1Smrg 58863f95b1Smrg 4. Type `make install' to install the programs and any data files and 59863f95b1Smrg documentation. 60863f95b1Smrg 61863f95b1Smrg 5. You can remove the program binaries and object files from the 62863f95b1Smrg source code directory by typing `make clean'. To also remove the 63863f95b1Smrg files that `configure' created (so you can compile the package for 64863f95b1Smrg a different kind of computer), type `make distclean'. There is 65863f95b1Smrg also a `make maintainer-clean' target, but that is intended mainly 66863f95b1Smrg for the package's developers. If you use it, you may have to get 67863f95b1Smrg all sorts of other programs in order to regenerate files that came 68863f95b1Smrg with the distribution. 69863f95b1Smrg 70863f95b1Smrg 6. Often, you can also type `make uninstall' to remove the installed 71863f95b1Smrg files again. 72863f95b1Smrg 73863f95b1SmrgCompilers and Options 74863f95b1Smrg===================== 75863f95b1Smrg 76863f95b1Smrg Some systems require unusual options for compilation or linking that 77863f95b1Smrgthe `configure' script does not know about. Run `./configure --help' 78863f95b1Smrgfor details on some of the pertinent environment variables. 79863f95b1Smrg 80863f95b1Smrg You can give `configure' initial values for configuration parameters 81863f95b1Smrgby setting variables in the command line or in the environment. Here 82863f95b1Smrgis an example: 83863f95b1Smrg 84863f95b1Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85863f95b1Smrg 86863f95b1Smrg *Note Defining Variables::, for more details. 87863f95b1Smrg 88863f95b1SmrgCompiling For Multiple Architectures 89863f95b1Smrg==================================== 90863f95b1Smrg 91863f95b1Smrg You can compile the package for more than one kind of computer at the 92863f95b1Smrgsame time, by placing the object files for each architecture in their 93863f95b1Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94863f95b1Smrgdirectory where you want the object files and executables to go and run 95863f95b1Smrgthe `configure' script. `configure' automatically checks for the 96863f95b1Smrgsource code in the directory that `configure' is in and in `..'. 97863f95b1Smrg 98863f95b1Smrg With a non-GNU `make', it is safer to compile the package for one 99863f95b1Smrgarchitecture at a time in the source code directory. After you have 100863f95b1Smrginstalled the package for one architecture, use `make distclean' before 101863f95b1Smrgreconfiguring for another architecture. 102863f95b1Smrg 103863f95b1Smrg On MacOS X 10.5 and later systems, you can create libraries and 104863f95b1Smrgexecutables that work on multiple system types--known as "fat" or 105863f95b1Smrg"universal" binaries--by specifying multiple `-arch' options to the 106863f95b1Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107863f95b1Smrgthis: 108863f95b1Smrg 109863f95b1Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110863f95b1Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111863f95b1Smrg CPP="gcc -E" CXXCPP="g++ -E" 112863f95b1Smrg 113863f95b1Smrg This is not guaranteed to produce working output in all cases, you 114863f95b1Smrgmay have to build one architecture at a time and combine the results 115863f95b1Smrgusing the `lipo' tool if you have problems. 116863f95b1Smrg 117863f95b1SmrgInstallation Names 118863f95b1Smrg================== 119863f95b1Smrg 120863f95b1Smrg By default, `make install' installs the package's commands under 121863f95b1Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122863f95b1Smrgcan specify an installation prefix other than `/usr/local' by giving 123863f95b1Smrg`configure' the option `--prefix=PREFIX'. 124863f95b1Smrg 125863f95b1Smrg You can specify separate installation prefixes for 126863f95b1Smrgarchitecture-specific files and architecture-independent files. If you 127863f95b1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128863f95b1SmrgPREFIX as the prefix for installing programs and libraries. 129863f95b1SmrgDocumentation and other data files still use the regular prefix. 130863f95b1Smrg 131863f95b1Smrg In addition, if you use an unusual directory layout you can give 132863f95b1Smrgoptions like `--bindir=DIR' to specify different values for particular 133863f95b1Smrgkinds of files. Run `configure --help' for a list of the directories 134863f95b1Smrgyou can set and what kinds of files go in them. 135863f95b1Smrg 136863f95b1Smrg If the package supports it, you can cause programs to be installed 137863f95b1Smrgwith an extra prefix or suffix on their names by giving `configure' the 138863f95b1Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139863f95b1Smrg 140863f95b1SmrgOptional Features 141863f95b1Smrg================= 142863f95b1Smrg 143863f95b1Smrg Some packages pay attention to `--enable-FEATURE' options to 144863f95b1Smrg`configure', where FEATURE indicates an optional part of the package. 145863f95b1SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146863f95b1Smrgis something like `gnu-as' or `x' (for the X Window System). The 147863f95b1Smrg`README' should mention any `--enable-' and `--with-' options that the 148863f95b1Smrgpackage recognizes. 149863f95b1Smrg 150863f95b1Smrg For packages that use the X Window System, `configure' can usually 151863f95b1Smrgfind the X include and library files automatically, but if it doesn't, 152863f95b1Smrgyou can use the `configure' options `--x-includes=DIR' and 153863f95b1Smrg`--x-libraries=DIR' to specify their locations. 154863f95b1Smrg 155863f95b1SmrgParticular systems 156863f95b1Smrg================== 157863f95b1Smrg 158863f95b1Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159863f95b1SmrgCC is not installed, it is recommended to use the following options in 160863f95b1Smrgorder to use an ANSI C compiler: 161863f95b1Smrg 162863f95b1Smrg ./configure CC="cc -Ae" 163863f95b1Smrg 164863f95b1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165863f95b1Smrg 166863f95b1Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167863f95b1Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168863f95b1Smrga workaround. If GNU CC is not installed, it is therefore recommended 169863f95b1Smrgto try 170863f95b1Smrg 171863f95b1Smrg ./configure CC="cc" 172863f95b1Smrg 173863f95b1Smrgand if that doesn't work, try 174863f95b1Smrg 175863f95b1Smrg ./configure CC="cc -nodtk" 176863f95b1Smrg 177863f95b1SmrgSpecifying the System Type 178863f95b1Smrg========================== 179863f95b1Smrg 180863f95b1Smrg There may be some features `configure' cannot figure out 181863f95b1Smrgautomatically, but needs to determine by the type of machine the package 182863f95b1Smrgwill run on. Usually, assuming the package is built to be run on the 183863f95b1Smrg_same_ architectures, `configure' can figure that out, but if it prints 184863f95b1Smrga message saying it cannot guess the machine type, give it the 185863f95b1Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186863f95b1Smrgtype, such as `sun4', or a canonical name which has the form: 187863f95b1Smrg 188863f95b1Smrg CPU-COMPANY-SYSTEM 189863f95b1Smrg 190863f95b1Smrgwhere SYSTEM can have one of these forms: 191863f95b1Smrg 192863f95b1Smrg OS KERNEL-OS 193863f95b1Smrg 194863f95b1Smrg See the file `config.sub' for the possible values of each field. If 195863f95b1Smrg`config.sub' isn't included in this package, then this package doesn't 196863f95b1Smrgneed to know the machine type. 197863f95b1Smrg 198863f95b1Smrg If you are _building_ compiler tools for cross-compiling, you should 199863f95b1Smrguse the option `--target=TYPE' to select the type of system they will 200863f95b1Smrgproduce code for. 201863f95b1Smrg 202863f95b1Smrg If you want to _use_ a cross compiler, that generates code for a 203863f95b1Smrgplatform different from the build platform, you should specify the 204863f95b1Smrg"host" platform (i.e., that on which the generated programs will 205863f95b1Smrgeventually be run) with `--host=TYPE'. 206863f95b1Smrg 207863f95b1SmrgSharing Defaults 208863f95b1Smrg================ 209863f95b1Smrg 210863f95b1Smrg If you want to set default values for `configure' scripts to share, 211863f95b1Smrgyou can create a site shell script called `config.site' that gives 212863f95b1Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213863f95b1Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214863f95b1Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215863f95b1Smrg`CONFIG_SITE' environment variable to the location of the site script. 216863f95b1SmrgA warning: not all `configure' scripts look for a site script. 217863f95b1Smrg 218863f95b1SmrgDefining Variables 219863f95b1Smrg================== 220863f95b1Smrg 221863f95b1Smrg Variables not defined in a site shell script can be set in the 222863f95b1Smrgenvironment passed to `configure'. However, some packages may run 223863f95b1Smrgconfigure again during the build, and the customized values of these 224863f95b1Smrgvariables may be lost. In order to avoid this problem, you should set 225863f95b1Smrgthem in the `configure' command line, using `VAR=value'. For example: 226863f95b1Smrg 227863f95b1Smrg ./configure CC=/usr/local2/bin/gcc 228863f95b1Smrg 229863f95b1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230863f95b1Smrgoverridden in the site shell script). 231863f95b1Smrg 232863f95b1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233863f95b1Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234863f95b1Smrg 235863f95b1Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236863f95b1Smrg 237863f95b1Smrg`configure' Invocation 238863f95b1Smrg====================== 239863f95b1Smrg 240863f95b1Smrg `configure' recognizes the following options to control how it 241863f95b1Smrgoperates. 242863f95b1Smrg 243863f95b1Smrg`--help' 244863f95b1Smrg`-h' 245863f95b1Smrg Print a summary of all of the options to `configure', and exit. 246863f95b1Smrg 247863f95b1Smrg`--help=short' 248863f95b1Smrg`--help=recursive' 249863f95b1Smrg Print a summary of the options unique to this package's 250863f95b1Smrg `configure', and exit. The `short' variant lists options used 251863f95b1Smrg only in the top level, while the `recursive' variant lists options 252863f95b1Smrg also present in any nested packages. 253863f95b1Smrg 254863f95b1Smrg`--version' 255863f95b1Smrg`-V' 256863f95b1Smrg Print the version of Autoconf used to generate the `configure' 257863f95b1Smrg script, and exit. 258863f95b1Smrg 259863f95b1Smrg`--cache-file=FILE' 260863f95b1Smrg Enable the cache: use and save the results of the tests in FILE, 261863f95b1Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262863f95b1Smrg disable caching. 263863f95b1Smrg 264863f95b1Smrg`--config-cache' 265863f95b1Smrg`-C' 266863f95b1Smrg Alias for `--cache-file=config.cache'. 267863f95b1Smrg 268863f95b1Smrg`--quiet' 269863f95b1Smrg`--silent' 270863f95b1Smrg`-q' 271863f95b1Smrg Do not print messages saying which checks are being made. To 272863f95b1Smrg suppress all normal output, redirect it to `/dev/null' (any error 273863f95b1Smrg messages will still be shown). 274863f95b1Smrg 275863f95b1Smrg`--srcdir=DIR' 276863f95b1Smrg Look for the package's source code in directory DIR. Usually 277863f95b1Smrg `configure' can determine that directory automatically. 278863f95b1Smrg 279863f95b1Smrg`--prefix=DIR' 280863f95b1Smrg Use DIR as the installation prefix. *Note Installation Names:: 281863f95b1Smrg for more details, including other options available for fine-tuning 282863f95b1Smrg the installation locations. 283863f95b1Smrg 284863f95b1Smrg`--no-create' 285863f95b1Smrg`-n' 286863f95b1Smrg Run the configure checks, but stop before creating any output 287863f95b1Smrg files. 288863f95b1Smrg 289863f95b1Smrg`configure' also accepts some other, not widely useful, options. Run 290863f95b1Smrg`configure --help' for more details. 291863f95b1Smrg 292