INSTALL revision e120bd27
1e120bd27SmrgInstallation Instructions 2e120bd27Smrg************************* 3e120bd27Smrg 4e120bd27SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5e120bd27Smrg2006, 2007, 2008 Free Software Foundation, Inc. 66c321187Smrg 76c321187Smrg This file is free documentation; the Free Software Foundation gives 86c321187Smrgunlimited permission to copy, distribute and modify it. 96c321187Smrg 106c321187SmrgBasic Installation 116c321187Smrg================== 126c321187Smrg 13e120bd27Smrg Briefly, the shell commands `./configure; make; make install' should 14e120bd27Smrgconfigure, build, and install this package. The following 15e120bd27Smrgmore-detailed instructions are generic; see the `README' file for 16e120bd27Smrginstructions specific to this package. 176c321187Smrg 186c321187Smrg The `configure' shell script attempts to guess correct values for 196c321187Smrgvarious system-dependent variables used during compilation. It uses 206c321187Smrgthose values to create a `Makefile' in each directory of the package. 216c321187SmrgIt may also create one or more `.h' files containing system-dependent 226c321187Smrgdefinitions. Finally, it creates a shell script `config.status' that 236c321187Smrgyou can run in the future to recreate the current configuration, and a 246c321187Smrgfile `config.log' containing compiler output (useful mainly for 256c321187Smrgdebugging `configure'). 266c321187Smrg 276c321187Smrg It can also use an optional file (typically called `config.cache' 286c321187Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29e120bd27Smrgthe results of its tests to speed up reconfiguring. Caching is 306c321187Smrgdisabled by default to prevent problems with accidental use of stale 31e120bd27Smrgcache files. 326c321187Smrg 336c321187Smrg If you need to do unusual things to compile the package, please try 346c321187Smrgto figure out how `configure' could check whether to do them, and mail 356c321187Smrgdiffs or instructions to the address given in the `README' so they can 366c321187Smrgbe considered for the next release. If you are using the cache, and at 376c321187Smrgsome point `config.cache' contains results you don't want to keep, you 386c321187Smrgmay remove or edit it. 396c321187Smrg 406c321187Smrg The file `configure.ac' (or `configure.in') is used to create 41e120bd27Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42e120bd27Smrgyou want to change it or regenerate `configure' using a newer version 43e120bd27Smrgof `autoconf'. 446c321187Smrg 456c321187SmrgThe simplest way to compile this package is: 466c321187Smrg 476c321187Smrg 1. `cd' to the directory containing the package's source code and type 48e120bd27Smrg `./configure' to configure the package for your system. 496c321187Smrg 50e120bd27Smrg Running `configure' might take a while. While running, it prints 51e120bd27Smrg some messages telling which features it is checking for. 526c321187Smrg 536c321187Smrg 2. Type `make' to compile the package. 546c321187Smrg 556c321187Smrg 3. Optionally, type `make check' to run any self-tests that come with 566c321187Smrg the package. 576c321187Smrg 586c321187Smrg 4. Type `make install' to install the programs and any data files and 596c321187Smrg documentation. 606c321187Smrg 616c321187Smrg 5. You can remove the program binaries and object files from the 626c321187Smrg source code directory by typing `make clean'. To also remove the 636c321187Smrg files that `configure' created (so you can compile the package for 646c321187Smrg a different kind of computer), type `make distclean'. There is 656c321187Smrg also a `make maintainer-clean' target, but that is intended mainly 666c321187Smrg for the package's developers. If you use it, you may have to get 676c321187Smrg all sorts of other programs in order to regenerate files that came 686c321187Smrg with the distribution. 696c321187Smrg 70e120bd27Smrg 6. Often, you can also type `make uninstall' to remove the installed 71e120bd27Smrg files again. 72e120bd27Smrg 736c321187SmrgCompilers and Options 746c321187Smrg===================== 756c321187Smrg 766c321187Smrg Some systems require unusual options for compilation or linking that 776c321187Smrgthe `configure' script does not know about. Run `./configure --help' 786c321187Smrgfor details on some of the pertinent environment variables. 796c321187Smrg 806c321187Smrg You can give `configure' initial values for configuration parameters 816c321187Smrgby setting variables in the command line or in the environment. Here 826c321187Smrgis an example: 836c321187Smrg 84e120bd27Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 856c321187Smrg 866c321187Smrg *Note Defining Variables::, for more details. 876c321187Smrg 886c321187SmrgCompiling For Multiple Architectures 896c321187Smrg==================================== 906c321187Smrg 916c321187Smrg You can compile the package for more than one kind of computer at the 926c321187Smrgsame time, by placing the object files for each architecture in their 93e120bd27Smrgown directory. To do this, you can use GNU `make'. `cd' to the 946c321187Smrgdirectory where you want the object files and executables to go and run 956c321187Smrgthe `configure' script. `configure' automatically checks for the 966c321187Smrgsource code in the directory that `configure' is in and in `..'. 976c321187Smrg 98e120bd27Smrg With a non-GNU `make', it is safer to compile the package for one 99e120bd27Smrgarchitecture at a time in the source code directory. After you have 100e120bd27Smrginstalled the package for one architecture, use `make distclean' before 101e120bd27Smrgreconfiguring for another architecture. 102e120bd27Smrg 103e120bd27Smrg On MacOS X 10.5 and later systems, you can create libraries and 104e120bd27Smrgexecutables that work on multiple system types--known as "fat" or 105e120bd27Smrg"universal" binaries--by specifying multiple `-arch' options to the 106e120bd27Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107e120bd27Smrgthis: 108e120bd27Smrg 109e120bd27Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110e120bd27Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111e120bd27Smrg CPP="gcc -E" CXXCPP="g++ -E" 112e120bd27Smrg 113e120bd27Smrg This is not guaranteed to produce working output in all cases, you 114e120bd27Smrgmay have to build one architecture at a time and combine the results 115e120bd27Smrgusing the `lipo' tool if you have problems. 1166c321187Smrg 1176c321187SmrgInstallation Names 1186c321187Smrg================== 1196c321187Smrg 120e120bd27Smrg By default, `make install' installs the package's commands under 121e120bd27Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122e120bd27Smrgcan specify an installation prefix other than `/usr/local' by giving 123e120bd27Smrg`configure' the option `--prefix=PREFIX'. 1246c321187Smrg 1256c321187Smrg You can specify separate installation prefixes for 1266c321187Smrgarchitecture-specific files and architecture-independent files. If you 127e120bd27Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128e120bd27SmrgPREFIX as the prefix for installing programs and libraries. 129e120bd27SmrgDocumentation and other data files still use the regular prefix. 1306c321187Smrg 1316c321187Smrg In addition, if you use an unusual directory layout you can give 132e120bd27Smrgoptions like `--bindir=DIR' to specify different values for particular 1336c321187Smrgkinds of files. Run `configure --help' for a list of the directories 1346c321187Smrgyou can set and what kinds of files go in them. 1356c321187Smrg 1366c321187Smrg If the package supports it, you can cause programs to be installed 1376c321187Smrgwith an extra prefix or suffix on their names by giving `configure' the 1386c321187Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1396c321187Smrg 1406c321187SmrgOptional Features 1416c321187Smrg================= 1426c321187Smrg 1436c321187Smrg Some packages pay attention to `--enable-FEATURE' options to 1446c321187Smrg`configure', where FEATURE indicates an optional part of the package. 1456c321187SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1466c321187Smrgis something like `gnu-as' or `x' (for the X Window System). The 1476c321187Smrg`README' should mention any `--enable-' and `--with-' options that the 1486c321187Smrgpackage recognizes. 1496c321187Smrg 1506c321187Smrg For packages that use the X Window System, `configure' can usually 1516c321187Smrgfind the X include and library files automatically, but if it doesn't, 1526c321187Smrgyou can use the `configure' options `--x-includes=DIR' and 1536c321187Smrg`--x-libraries=DIR' to specify their locations. 1546c321187Smrg 155e120bd27SmrgParticular systems 156e120bd27Smrg================== 157e120bd27Smrg 158e120bd27Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159e120bd27SmrgCC is not installed, it is recommended to use the following options in 160e120bd27Smrgorder to use an ANSI C compiler: 161e120bd27Smrg 162e120bd27Smrg ./configure CC="cc -Ae" 163e120bd27Smrg 164e120bd27Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165e120bd27Smrg 166e120bd27Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167e120bd27Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168e120bd27Smrga workaround. If GNU CC is not installed, it is therefore recommended 169e120bd27Smrgto try 170e120bd27Smrg 171e120bd27Smrg ./configure CC="cc" 172e120bd27Smrg 173e120bd27Smrgand if that doesn't work, try 174e120bd27Smrg 175e120bd27Smrg ./configure CC="cc -nodtk" 176e120bd27Smrg 1776c321187SmrgSpecifying the System Type 1786c321187Smrg========================== 1796c321187Smrg 1806c321187Smrg There may be some features `configure' cannot figure out 1816c321187Smrgautomatically, but needs to determine by the type of machine the package 1826c321187Smrgwill run on. Usually, assuming the package is built to be run on the 1836c321187Smrg_same_ architectures, `configure' can figure that out, but if it prints 1846c321187Smrga message saying it cannot guess the machine type, give it the 1856c321187Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1866c321187Smrgtype, such as `sun4', or a canonical name which has the form: 1876c321187Smrg 1886c321187Smrg CPU-COMPANY-SYSTEM 1896c321187Smrg 1906c321187Smrgwhere SYSTEM can have one of these forms: 1916c321187Smrg 1926c321187Smrg OS KERNEL-OS 1936c321187Smrg 1946c321187Smrg See the file `config.sub' for the possible values of each field. If 1956c321187Smrg`config.sub' isn't included in this package, then this package doesn't 1966c321187Smrgneed to know the machine type. 1976c321187Smrg 1986c321187Smrg If you are _building_ compiler tools for cross-compiling, you should 199e120bd27Smrguse the option `--target=TYPE' to select the type of system they will 2006c321187Smrgproduce code for. 2016c321187Smrg 2026c321187Smrg If you want to _use_ a cross compiler, that generates code for a 2036c321187Smrgplatform different from the build platform, you should specify the 2046c321187Smrg"host" platform (i.e., that on which the generated programs will 2056c321187Smrgeventually be run) with `--host=TYPE'. 2066c321187Smrg 2076c321187SmrgSharing Defaults 2086c321187Smrg================ 2096c321187Smrg 2106c321187Smrg If you want to set default values for `configure' scripts to share, 2116c321187Smrgyou can create a site shell script called `config.site' that gives 2126c321187Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2136c321187Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2146c321187Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2156c321187Smrg`CONFIG_SITE' environment variable to the location of the site script. 2166c321187SmrgA warning: not all `configure' scripts look for a site script. 2176c321187Smrg 2186c321187SmrgDefining Variables 2196c321187Smrg================== 2206c321187Smrg 2216c321187Smrg Variables not defined in a site shell script can be set in the 2226c321187Smrgenvironment passed to `configure'. However, some packages may run 2236c321187Smrgconfigure again during the build, and the customized values of these 2246c321187Smrgvariables may be lost. In order to avoid this problem, you should set 2256c321187Smrgthem in the `configure' command line, using `VAR=value'. For example: 2266c321187Smrg 2276c321187Smrg ./configure CC=/usr/local2/bin/gcc 2286c321187Smrg 229e120bd27Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2306c321187Smrgoverridden in the site shell script). 2316c321187Smrg 232e120bd27SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233e120bd27Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234e120bd27Smrg 235e120bd27Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236e120bd27Smrg 2376c321187Smrg`configure' Invocation 2386c321187Smrg====================== 2396c321187Smrg 2406c321187Smrg `configure' recognizes the following options to control how it 2416c321187Smrgoperates. 2426c321187Smrg 2436c321187Smrg`--help' 2446c321187Smrg`-h' 245e120bd27Smrg Print a summary of all of the options to `configure', and exit. 246e120bd27Smrg 247e120bd27Smrg`--help=short' 248e120bd27Smrg`--help=recursive' 249e120bd27Smrg Print a summary of the options unique to this package's 250e120bd27Smrg `configure', and exit. The `short' variant lists options used 251e120bd27Smrg only in the top level, while the `recursive' variant lists options 252e120bd27Smrg also present in any nested packages. 2536c321187Smrg 2546c321187Smrg`--version' 2556c321187Smrg`-V' 2566c321187Smrg Print the version of Autoconf used to generate the `configure' 2576c321187Smrg script, and exit. 2586c321187Smrg 2596c321187Smrg`--cache-file=FILE' 2606c321187Smrg Enable the cache: use and save the results of the tests in FILE, 2616c321187Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2626c321187Smrg disable caching. 2636c321187Smrg 2646c321187Smrg`--config-cache' 2656c321187Smrg`-C' 2666c321187Smrg Alias for `--cache-file=config.cache'. 2676c321187Smrg 2686c321187Smrg`--quiet' 2696c321187Smrg`--silent' 2706c321187Smrg`-q' 2716c321187Smrg Do not print messages saying which checks are being made. To 2726c321187Smrg suppress all normal output, redirect it to `/dev/null' (any error 2736c321187Smrg messages will still be shown). 2746c321187Smrg 2756c321187Smrg`--srcdir=DIR' 2766c321187Smrg Look for the package's source code in directory DIR. Usually 2776c321187Smrg `configure' can determine that directory automatically. 2786c321187Smrg 279e120bd27Smrg`--prefix=DIR' 280e120bd27Smrg Use DIR as the installation prefix. *Note Installation Names:: 281e120bd27Smrg for more details, including other options available for fine-tuning 282e120bd27Smrg the installation locations. 283e120bd27Smrg 284e120bd27Smrg`--no-create' 285e120bd27Smrg`-n' 286e120bd27Smrg Run the configure checks, but stop before creating any output 287e120bd27Smrg files. 288e120bd27Smrg 2896c321187Smrg`configure' also accepts some other, not widely useful, options. Run 2906c321187Smrg`configure --help' for more details. 2916c321187Smrg 292