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