INSTALL revision 6e7d3316
16e7d3316SmrgInstallation Instructions 26e7d3316Smrg************************* 36e7d3316Smrg 46e7d3316SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 56e7d3316Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6a966c04fSmrg 7a966c04fSmrg This file is free documentation; the Free Software Foundation gives 8a966c04fSmrgunlimited permission to copy, distribute and modify it. 9a966c04fSmrg 10a966c04fSmrgBasic Installation 11a966c04fSmrg================== 12a966c04fSmrg 136e7d3316Smrg Briefly, the shell commands `./configure; make; make install' should 146e7d3316Smrgconfigure, build, and install this package. The following 156e7d3316Smrgmore-detailed instructions are generic; see the `README' file for 166e7d3316Smrginstructions specific to this package. 17a966c04fSmrg 18a966c04fSmrg The `configure' shell script attempts to guess correct values for 19a966c04fSmrgvarious system-dependent variables used during compilation. It uses 20a966c04fSmrgthose values to create a `Makefile' in each directory of the package. 21a966c04fSmrgIt may also create one or more `.h' files containing system-dependent 22a966c04fSmrgdefinitions. Finally, it creates a shell script `config.status' that 23a966c04fSmrgyou can run in the future to recreate the current configuration, and a 24a966c04fSmrgfile `config.log' containing compiler output (useful mainly for 25a966c04fSmrgdebugging `configure'). 26a966c04fSmrg 27a966c04fSmrg It can also use an optional file (typically called `config.cache' 28a966c04fSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 296e7d3316Smrgthe results of its tests to speed up reconfiguring. Caching is 30a966c04fSmrgdisabled by default to prevent problems with accidental use of stale 316e7d3316Smrgcache files. 32a966c04fSmrg 33a966c04fSmrg If you need to do unusual things to compile the package, please try 34a966c04fSmrgto figure out how `configure' could check whether to do them, and mail 35a966c04fSmrgdiffs or instructions to the address given in the `README' so they can 36a966c04fSmrgbe considered for the next release. If you are using the cache, and at 37a966c04fSmrgsome point `config.cache' contains results you don't want to keep, you 38a966c04fSmrgmay remove or edit it. 39a966c04fSmrg 40a966c04fSmrg The file `configure.ac' (or `configure.in') is used to create 416e7d3316Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 426e7d3316Smrgyou want to change it or regenerate `configure' using a newer version 436e7d3316Smrgof `autoconf'. 44a966c04fSmrg 45a966c04fSmrgThe simplest way to compile this package is: 46a966c04fSmrg 47a966c04fSmrg 1. `cd' to the directory containing the package's source code and type 486e7d3316Smrg `./configure' to configure the package for your system. 49a966c04fSmrg 506e7d3316Smrg Running `configure' might take a while. While running, it prints 516e7d3316Smrg some messages telling which features it is checking for. 52a966c04fSmrg 53a966c04fSmrg 2. Type `make' to compile the package. 54a966c04fSmrg 55a966c04fSmrg 3. Optionally, type `make check' to run any self-tests that come with 56a966c04fSmrg the package. 57a966c04fSmrg 58a966c04fSmrg 4. Type `make install' to install the programs and any data files and 59a966c04fSmrg documentation. 60a966c04fSmrg 61a966c04fSmrg 5. You can remove the program binaries and object files from the 62a966c04fSmrg source code directory by typing `make clean'. To also remove the 63a966c04fSmrg files that `configure' created (so you can compile the package for 64a966c04fSmrg a different kind of computer), type `make distclean'. There is 65a966c04fSmrg also a `make maintainer-clean' target, but that is intended mainly 66a966c04fSmrg for the package's developers. If you use it, you may have to get 67a966c04fSmrg all sorts of other programs in order to regenerate files that came 68a966c04fSmrg with the distribution. 69a966c04fSmrg 706e7d3316Smrg 6. Often, you can also type `make uninstall' to remove the installed 716e7d3316Smrg files again. 726e7d3316Smrg 73a966c04fSmrgCompilers and Options 74a966c04fSmrg===================== 75a966c04fSmrg 76a966c04fSmrg Some systems require unusual options for compilation or linking that 77a966c04fSmrgthe `configure' script does not know about. Run `./configure --help' 78a966c04fSmrgfor details on some of the pertinent environment variables. 79a966c04fSmrg 80a966c04fSmrg You can give `configure' initial values for configuration parameters 81a966c04fSmrgby setting variables in the command line or in the environment. Here 82a966c04fSmrgis an example: 83a966c04fSmrg 846e7d3316Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85a966c04fSmrg 86a966c04fSmrg *Note Defining Variables::, for more details. 87a966c04fSmrg 88a966c04fSmrgCompiling For Multiple Architectures 89a966c04fSmrg==================================== 90a966c04fSmrg 91a966c04fSmrg You can compile the package for more than one kind of computer at the 92a966c04fSmrgsame time, by placing the object files for each architecture in their 936e7d3316Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94a966c04fSmrgdirectory where you want the object files and executables to go and run 95a966c04fSmrgthe `configure' script. `configure' automatically checks for the 96a966c04fSmrgsource code in the directory that `configure' is in and in `..'. 97a966c04fSmrg 986e7d3316Smrg With a non-GNU `make', it is safer to compile the package for one 996e7d3316Smrgarchitecture at a time in the source code directory. After you have 1006e7d3316Smrginstalled the package for one architecture, use `make distclean' before 1016e7d3316Smrgreconfiguring for another architecture. 1026e7d3316Smrg 1036e7d3316Smrg On MacOS X 10.5 and later systems, you can create libraries and 1046e7d3316Smrgexecutables that work on multiple system types--known as "fat" or 1056e7d3316Smrg"universal" binaries--by specifying multiple `-arch' options to the 1066e7d3316Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1076e7d3316Smrgthis: 1086e7d3316Smrg 1096e7d3316Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1106e7d3316Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1116e7d3316Smrg CPP="gcc -E" CXXCPP="g++ -E" 1126e7d3316Smrg 1136e7d3316Smrg This is not guaranteed to produce working output in all cases, you 1146e7d3316Smrgmay have to build one architecture at a time and combine the results 1156e7d3316Smrgusing the `lipo' tool if you have problems. 116a966c04fSmrg 117a966c04fSmrgInstallation Names 118a966c04fSmrg================== 119a966c04fSmrg 1206e7d3316Smrg By default, `make install' installs the package's commands under 1216e7d3316Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1226e7d3316Smrgcan specify an installation prefix other than `/usr/local' by giving 1236e7d3316Smrg`configure' the option `--prefix=PREFIX'. 124a966c04fSmrg 125a966c04fSmrg You can specify separate installation prefixes for 126a966c04fSmrgarchitecture-specific files and architecture-independent files. If you 1276e7d3316Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1286e7d3316SmrgPREFIX as the prefix for installing programs and libraries. 1296e7d3316SmrgDocumentation and other data files still use the regular prefix. 130a966c04fSmrg 131a966c04fSmrg In addition, if you use an unusual directory layout you can give 1326e7d3316Smrgoptions like `--bindir=DIR' to specify different values for particular 133a966c04fSmrgkinds of files. Run `configure --help' for a list of the directories 134a966c04fSmrgyou can set and what kinds of files go in them. 135a966c04fSmrg 136a966c04fSmrg If the package supports it, you can cause programs to be installed 137a966c04fSmrgwith an extra prefix or suffix on their names by giving `configure' the 138a966c04fSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139a966c04fSmrg 140a966c04fSmrgOptional Features 141a966c04fSmrg================= 142a966c04fSmrg 143a966c04fSmrg Some packages pay attention to `--enable-FEATURE' options to 144a966c04fSmrg`configure', where FEATURE indicates an optional part of the package. 145a966c04fSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146a966c04fSmrgis something like `gnu-as' or `x' (for the X Window System). The 147a966c04fSmrg`README' should mention any `--enable-' and `--with-' options that the 148a966c04fSmrgpackage recognizes. 149a966c04fSmrg 150a966c04fSmrg For packages that use the X Window System, `configure' can usually 151a966c04fSmrgfind the X include and library files automatically, but if it doesn't, 152a966c04fSmrgyou can use the `configure' options `--x-includes=DIR' and 153a966c04fSmrg`--x-libraries=DIR' to specify their locations. 154a966c04fSmrg 1556e7d3316SmrgParticular systems 1566e7d3316Smrg================== 1576e7d3316Smrg 1586e7d3316Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1596e7d3316SmrgCC is not installed, it is recommended to use the following options in 1606e7d3316Smrgorder to use an ANSI C compiler: 1616e7d3316Smrg 1626e7d3316Smrg ./configure CC="cc -Ae" 1636e7d3316Smrg 1646e7d3316Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1656e7d3316Smrg 1666e7d3316Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1676e7d3316Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1686e7d3316Smrga workaround. If GNU CC is not installed, it is therefore recommended 1696e7d3316Smrgto try 1706e7d3316Smrg 1716e7d3316Smrg ./configure CC="cc" 1726e7d3316Smrg 1736e7d3316Smrgand if that doesn't work, try 1746e7d3316Smrg 1756e7d3316Smrg ./configure CC="cc -nodtk" 1766e7d3316Smrg 177a966c04fSmrgSpecifying the System Type 178a966c04fSmrg========================== 179a966c04fSmrg 180a966c04fSmrg There may be some features `configure' cannot figure out 181a966c04fSmrgautomatically, but needs to determine by the type of machine the package 182a966c04fSmrgwill run on. Usually, assuming the package is built to be run on the 183a966c04fSmrg_same_ architectures, `configure' can figure that out, but if it prints 184a966c04fSmrga message saying it cannot guess the machine type, give it the 185a966c04fSmrg`--build=TYPE' option. TYPE can either be a short name for the system 186a966c04fSmrgtype, such as `sun4', or a canonical name which has the form: 187a966c04fSmrg 188a966c04fSmrg CPU-COMPANY-SYSTEM 189a966c04fSmrg 190a966c04fSmrgwhere SYSTEM can have one of these forms: 191a966c04fSmrg 192a966c04fSmrg OS KERNEL-OS 193a966c04fSmrg 194a966c04fSmrg See the file `config.sub' for the possible values of each field. If 195a966c04fSmrg`config.sub' isn't included in this package, then this package doesn't 196a966c04fSmrgneed to know the machine type. 197a966c04fSmrg 198a966c04fSmrg If you are _building_ compiler tools for cross-compiling, you should 1996e7d3316Smrguse the option `--target=TYPE' to select the type of system they will 200a966c04fSmrgproduce code for. 201a966c04fSmrg 202a966c04fSmrg If you want to _use_ a cross compiler, that generates code for a 203a966c04fSmrgplatform different from the build platform, you should specify the 204a966c04fSmrg"host" platform (i.e., that on which the generated programs will 205a966c04fSmrgeventually be run) with `--host=TYPE'. 206a966c04fSmrg 207a966c04fSmrgSharing Defaults 208a966c04fSmrg================ 209a966c04fSmrg 210a966c04fSmrg If you want to set default values for `configure' scripts to share, 211a966c04fSmrgyou can create a site shell script called `config.site' that gives 212a966c04fSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 213a966c04fSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214a966c04fSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215a966c04fSmrg`CONFIG_SITE' environment variable to the location of the site script. 216a966c04fSmrgA warning: not all `configure' scripts look for a site script. 217a966c04fSmrg 218a966c04fSmrgDefining Variables 219a966c04fSmrg================== 220a966c04fSmrg 221a966c04fSmrg Variables not defined in a site shell script can be set in the 222a966c04fSmrgenvironment passed to `configure'. However, some packages may run 223a966c04fSmrgconfigure again during the build, and the customized values of these 224a966c04fSmrgvariables may be lost. In order to avoid this problem, you should set 225a966c04fSmrgthem in the `configure' command line, using `VAR=value'. For example: 226a966c04fSmrg 227a966c04fSmrg ./configure CC=/usr/local2/bin/gcc 228a966c04fSmrg 2296e7d3316Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230a966c04fSmrgoverridden in the site shell script). 231a966c04fSmrg 2326e7d3316SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2336e7d3316Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2346e7d3316Smrg 2356e7d3316Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2366e7d3316Smrg 237a966c04fSmrg`configure' Invocation 238a966c04fSmrg====================== 239a966c04fSmrg 240a966c04fSmrg `configure' recognizes the following options to control how it 241a966c04fSmrgoperates. 242a966c04fSmrg 243a966c04fSmrg`--help' 244a966c04fSmrg`-h' 2456e7d3316Smrg Print a summary of all of the options to `configure', and exit. 2466e7d3316Smrg 2476e7d3316Smrg`--help=short' 2486e7d3316Smrg`--help=recursive' 2496e7d3316Smrg Print a summary of the options unique to this package's 2506e7d3316Smrg `configure', and exit. The `short' variant lists options used 2516e7d3316Smrg only in the top level, while the `recursive' variant lists options 2526e7d3316Smrg also present in any nested packages. 253a966c04fSmrg 254a966c04fSmrg`--version' 255a966c04fSmrg`-V' 256a966c04fSmrg Print the version of Autoconf used to generate the `configure' 257a966c04fSmrg script, and exit. 258a966c04fSmrg 259a966c04fSmrg`--cache-file=FILE' 260a966c04fSmrg Enable the cache: use and save the results of the tests in FILE, 261a966c04fSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262a966c04fSmrg disable caching. 263a966c04fSmrg 264a966c04fSmrg`--config-cache' 265a966c04fSmrg`-C' 266a966c04fSmrg Alias for `--cache-file=config.cache'. 267a966c04fSmrg 268a966c04fSmrg`--quiet' 269a966c04fSmrg`--silent' 270a966c04fSmrg`-q' 271a966c04fSmrg Do not print messages saying which checks are being made. To 272a966c04fSmrg suppress all normal output, redirect it to `/dev/null' (any error 273a966c04fSmrg messages will still be shown). 274a966c04fSmrg 275a966c04fSmrg`--srcdir=DIR' 276a966c04fSmrg Look for the package's source code in directory DIR. Usually 277a966c04fSmrg `configure' can determine that directory automatically. 278a966c04fSmrg 2796e7d3316Smrg`--prefix=DIR' 2806e7d3316Smrg Use DIR as the installation prefix. *Note Installation Names:: 2816e7d3316Smrg for more details, including other options available for fine-tuning 2826e7d3316Smrg the installation locations. 2836e7d3316Smrg 2846e7d3316Smrg`--no-create' 2856e7d3316Smrg`-n' 2866e7d3316Smrg Run the configure checks, but stop before creating any output 2876e7d3316Smrg files. 2886e7d3316Smrg 289a966c04fSmrg`configure' also accepts some other, not widely useful, options. Run 290a966c04fSmrg`configure --help' for more details. 291a966c04fSmrg 292