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