INSTALL revision 4cd6a3ae
14cd6a3aeSmrgInstallation Instructions 24cd6a3aeSmrg************************* 34cd6a3aeSmrg 44cd6a3aeSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 54cd6a3aeSmrg2006, 2007, 2008 Free Software Foundation, Inc. 64cd6a3aeSmrg 74cd6a3aeSmrg This file is free documentation; the Free Software Foundation gives 84cd6a3aeSmrgunlimited permission to copy, distribute and modify it. 94cd6a3aeSmrg 104cd6a3aeSmrgBasic Installation 114cd6a3aeSmrg================== 124cd6a3aeSmrg 134cd6a3aeSmrg Briefly, the shell commands `./configure; make; make install' should 144cd6a3aeSmrgconfigure, build, and install this package. The following 154cd6a3aeSmrgmore-detailed instructions are generic; see the `README' file for 164cd6a3aeSmrginstructions specific to this package. 174cd6a3aeSmrg 184cd6a3aeSmrg The `configure' shell script attempts to guess correct values for 194cd6a3aeSmrgvarious system-dependent variables used during compilation. It uses 204cd6a3aeSmrgthose values to create a `Makefile' in each directory of the package. 214cd6a3aeSmrgIt may also create one or more `.h' files containing system-dependent 224cd6a3aeSmrgdefinitions. Finally, it creates a shell script `config.status' that 234cd6a3aeSmrgyou can run in the future to recreate the current configuration, and a 244cd6a3aeSmrgfile `config.log' containing compiler output (useful mainly for 254cd6a3aeSmrgdebugging `configure'). 264cd6a3aeSmrg 274cd6a3aeSmrg It can also use an optional file (typically called `config.cache' 284cd6a3aeSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 294cd6a3aeSmrgthe results of its tests to speed up reconfiguring. Caching is 304cd6a3aeSmrgdisabled by default to prevent problems with accidental use of stale 314cd6a3aeSmrgcache files. 324cd6a3aeSmrg 334cd6a3aeSmrg If you need to do unusual things to compile the package, please try 344cd6a3aeSmrgto figure out how `configure' could check whether to do them, and mail 354cd6a3aeSmrgdiffs or instructions to the address given in the `README' so they can 364cd6a3aeSmrgbe considered for the next release. If you are using the cache, and at 374cd6a3aeSmrgsome point `config.cache' contains results you don't want to keep, you 384cd6a3aeSmrgmay remove or edit it. 394cd6a3aeSmrg 404cd6a3aeSmrg The file `configure.ac' (or `configure.in') is used to create 414cd6a3aeSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 424cd6a3aeSmrgyou want to change it or regenerate `configure' using a newer version 434cd6a3aeSmrgof `autoconf'. 444cd6a3aeSmrg 454cd6a3aeSmrgThe simplest way to compile this package is: 464cd6a3aeSmrg 474cd6a3aeSmrg 1. `cd' to the directory containing the package's source code and type 484cd6a3aeSmrg `./configure' to configure the package for your system. 494cd6a3aeSmrg 504cd6a3aeSmrg Running `configure' might take a while. While running, it prints 514cd6a3aeSmrg some messages telling which features it is checking for. 524cd6a3aeSmrg 534cd6a3aeSmrg 2. Type `make' to compile the package. 544cd6a3aeSmrg 554cd6a3aeSmrg 3. Optionally, type `make check' to run any self-tests that come with 564cd6a3aeSmrg the package. 574cd6a3aeSmrg 584cd6a3aeSmrg 4. Type `make install' to install the programs and any data files and 594cd6a3aeSmrg documentation. 604cd6a3aeSmrg 614cd6a3aeSmrg 5. You can remove the program binaries and object files from the 624cd6a3aeSmrg source code directory by typing `make clean'. To also remove the 634cd6a3aeSmrg files that `configure' created (so you can compile the package for 644cd6a3aeSmrg a different kind of computer), type `make distclean'. There is 654cd6a3aeSmrg also a `make maintainer-clean' target, but that is intended mainly 664cd6a3aeSmrg for the package's developers. If you use it, you may have to get 674cd6a3aeSmrg all sorts of other programs in order to regenerate files that came 684cd6a3aeSmrg with the distribution. 694cd6a3aeSmrg 704cd6a3aeSmrg 6. Often, you can also type `make uninstall' to remove the installed 714cd6a3aeSmrg files again. 724cd6a3aeSmrg 734cd6a3aeSmrgCompilers and Options 744cd6a3aeSmrg===================== 754cd6a3aeSmrg 764cd6a3aeSmrg Some systems require unusual options for compilation or linking that 774cd6a3aeSmrgthe `configure' script does not know about. Run `./configure --help' 784cd6a3aeSmrgfor details on some of the pertinent environment variables. 794cd6a3aeSmrg 804cd6a3aeSmrg You can give `configure' initial values for configuration parameters 814cd6a3aeSmrgby setting variables in the command line or in the environment. Here 824cd6a3aeSmrgis an example: 834cd6a3aeSmrg 844cd6a3aeSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 854cd6a3aeSmrg 864cd6a3aeSmrg *Note Defining Variables::, for more details. 874cd6a3aeSmrg 884cd6a3aeSmrgCompiling For Multiple Architectures 894cd6a3aeSmrg==================================== 904cd6a3aeSmrg 914cd6a3aeSmrg You can compile the package for more than one kind of computer at the 924cd6a3aeSmrgsame time, by placing the object files for each architecture in their 934cd6a3aeSmrgown directory. To do this, you can use GNU `make'. `cd' to the 944cd6a3aeSmrgdirectory where you want the object files and executables to go and run 954cd6a3aeSmrgthe `configure' script. `configure' automatically checks for the 964cd6a3aeSmrgsource code in the directory that `configure' is in and in `..'. 974cd6a3aeSmrg 984cd6a3aeSmrg With a non-GNU `make', it is safer to compile the package for one 994cd6a3aeSmrgarchitecture at a time in the source code directory. After you have 1004cd6a3aeSmrginstalled the package for one architecture, use `make distclean' before 1014cd6a3aeSmrgreconfiguring for another architecture. 1024cd6a3aeSmrg 1034cd6a3aeSmrg On MacOS X 10.5 and later systems, you can create libraries and 1044cd6a3aeSmrgexecutables that work on multiple system types--known as "fat" or 1054cd6a3aeSmrg"universal" binaries--by specifying multiple `-arch' options to the 1064cd6a3aeSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1074cd6a3aeSmrgthis: 1084cd6a3aeSmrg 1094cd6a3aeSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1104cd6a3aeSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1114cd6a3aeSmrg CPP="gcc -E" CXXCPP="g++ -E" 1124cd6a3aeSmrg 1134cd6a3aeSmrg This is not guaranteed to produce working output in all cases, you 1144cd6a3aeSmrgmay have to build one architecture at a time and combine the results 1154cd6a3aeSmrgusing the `lipo' tool if you have problems. 1164cd6a3aeSmrg 1174cd6a3aeSmrgInstallation Names 1184cd6a3aeSmrg================== 1194cd6a3aeSmrg 1204cd6a3aeSmrg By default, `make install' installs the package's commands under 1214cd6a3aeSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1224cd6a3aeSmrgcan specify an installation prefix other than `/usr/local' by giving 1234cd6a3aeSmrg`configure' the option `--prefix=PREFIX'. 1244cd6a3aeSmrg 1254cd6a3aeSmrg You can specify separate installation prefixes for 1264cd6a3aeSmrgarchitecture-specific files and architecture-independent files. If you 1274cd6a3aeSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1284cd6a3aeSmrgPREFIX as the prefix for installing programs and libraries. 1294cd6a3aeSmrgDocumentation and other data files still use the regular prefix. 1304cd6a3aeSmrg 1314cd6a3aeSmrg In addition, if you use an unusual directory layout you can give 1324cd6a3aeSmrgoptions like `--bindir=DIR' to specify different values for particular 1334cd6a3aeSmrgkinds of files. Run `configure --help' for a list of the directories 1344cd6a3aeSmrgyou can set and what kinds of files go in them. 1354cd6a3aeSmrg 1364cd6a3aeSmrg If the package supports it, you can cause programs to be installed 1374cd6a3aeSmrgwith an extra prefix or suffix on their names by giving `configure' the 1384cd6a3aeSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1394cd6a3aeSmrg 1404cd6a3aeSmrgOptional Features 1414cd6a3aeSmrg================= 1424cd6a3aeSmrg 1434cd6a3aeSmrg Some packages pay attention to `--enable-FEATURE' options to 1444cd6a3aeSmrg`configure', where FEATURE indicates an optional part of the package. 1454cd6a3aeSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1464cd6a3aeSmrgis something like `gnu-as' or `x' (for the X Window System). The 1474cd6a3aeSmrg`README' should mention any `--enable-' and `--with-' options that the 1484cd6a3aeSmrgpackage recognizes. 1494cd6a3aeSmrg 1504cd6a3aeSmrg For packages that use the X Window System, `configure' can usually 1514cd6a3aeSmrgfind the X include and library files automatically, but if it doesn't, 1524cd6a3aeSmrgyou can use the `configure' options `--x-includes=DIR' and 1534cd6a3aeSmrg`--x-libraries=DIR' to specify their locations. 1544cd6a3aeSmrg 1554cd6a3aeSmrgParticular systems 1564cd6a3aeSmrg================== 1574cd6a3aeSmrg 1584cd6a3aeSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1594cd6a3aeSmrgCC is not installed, it is recommended to use the following options in 1604cd6a3aeSmrgorder to use an ANSI C compiler: 1614cd6a3aeSmrg 1624cd6a3aeSmrg ./configure CC="cc -Ae" 1634cd6a3aeSmrg 1644cd6a3aeSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1654cd6a3aeSmrg 1664cd6a3aeSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1674cd6a3aeSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1684cd6a3aeSmrga workaround. If GNU CC is not installed, it is therefore recommended 1694cd6a3aeSmrgto try 1704cd6a3aeSmrg 1714cd6a3aeSmrg ./configure CC="cc" 1724cd6a3aeSmrg 1734cd6a3aeSmrgand if that doesn't work, try 1744cd6a3aeSmrg 1754cd6a3aeSmrg ./configure CC="cc -nodtk" 1764cd6a3aeSmrg 1774cd6a3aeSmrgSpecifying the System Type 1784cd6a3aeSmrg========================== 1794cd6a3aeSmrg 1804cd6a3aeSmrg There may be some features `configure' cannot figure out 1814cd6a3aeSmrgautomatically, but needs to determine by the type of machine the package 1824cd6a3aeSmrgwill run on. Usually, assuming the package is built to be run on the 1834cd6a3aeSmrg_same_ architectures, `configure' can figure that out, but if it prints 1844cd6a3aeSmrga message saying it cannot guess the machine type, give it the 1854cd6a3aeSmrg`--build=TYPE' option. TYPE can either be a short name for the system 1864cd6a3aeSmrgtype, such as `sun4', or a canonical name which has the form: 1874cd6a3aeSmrg 1884cd6a3aeSmrg CPU-COMPANY-SYSTEM 1894cd6a3aeSmrg 1904cd6a3aeSmrgwhere SYSTEM can have one of these forms: 1914cd6a3aeSmrg 1924cd6a3aeSmrg OS KERNEL-OS 1934cd6a3aeSmrg 1944cd6a3aeSmrg See the file `config.sub' for the possible values of each field. If 1954cd6a3aeSmrg`config.sub' isn't included in this package, then this package doesn't 1964cd6a3aeSmrgneed to know the machine type. 1974cd6a3aeSmrg 1984cd6a3aeSmrg If you are _building_ compiler tools for cross-compiling, you should 1994cd6a3aeSmrguse the option `--target=TYPE' to select the type of system they will 2004cd6a3aeSmrgproduce code for. 2014cd6a3aeSmrg 2024cd6a3aeSmrg If you want to _use_ a cross compiler, that generates code for a 2034cd6a3aeSmrgplatform different from the build platform, you should specify the 2044cd6a3aeSmrg"host" platform (i.e., that on which the generated programs will 2054cd6a3aeSmrgeventually be run) with `--host=TYPE'. 2064cd6a3aeSmrg 2074cd6a3aeSmrgSharing Defaults 2084cd6a3aeSmrg================ 2094cd6a3aeSmrg 2104cd6a3aeSmrg If you want to set default values for `configure' scripts to share, 2114cd6a3aeSmrgyou can create a site shell script called `config.site' that gives 2124cd6a3aeSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2134cd6a3aeSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2144cd6a3aeSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2154cd6a3aeSmrg`CONFIG_SITE' environment variable to the location of the site script. 2164cd6a3aeSmrgA warning: not all `configure' scripts look for a site script. 2174cd6a3aeSmrg 2184cd6a3aeSmrgDefining Variables 2194cd6a3aeSmrg================== 2204cd6a3aeSmrg 2214cd6a3aeSmrg Variables not defined in a site shell script can be set in the 2224cd6a3aeSmrgenvironment passed to `configure'. However, some packages may run 2234cd6a3aeSmrgconfigure again during the build, and the customized values of these 2244cd6a3aeSmrgvariables may be lost. In order to avoid this problem, you should set 2254cd6a3aeSmrgthem in the `configure' command line, using `VAR=value'. For example: 2264cd6a3aeSmrg 2274cd6a3aeSmrg ./configure CC=/usr/local2/bin/gcc 2284cd6a3aeSmrg 2294cd6a3aeSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 2304cd6a3aeSmrgoverridden in the site shell script). 2314cd6a3aeSmrg 2324cd6a3aeSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2334cd6a3aeSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2344cd6a3aeSmrg 2354cd6a3aeSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2364cd6a3aeSmrg 2374cd6a3aeSmrg`configure' Invocation 2384cd6a3aeSmrg====================== 2394cd6a3aeSmrg 2404cd6a3aeSmrg `configure' recognizes the following options to control how it 2414cd6a3aeSmrgoperates. 2424cd6a3aeSmrg 2434cd6a3aeSmrg`--help' 2444cd6a3aeSmrg`-h' 2454cd6a3aeSmrg Print a summary of all of the options to `configure', and exit. 2464cd6a3aeSmrg 2474cd6a3aeSmrg`--help=short' 2484cd6a3aeSmrg`--help=recursive' 2494cd6a3aeSmrg Print a summary of the options unique to this package's 2504cd6a3aeSmrg `configure', and exit. The `short' variant lists options used 2514cd6a3aeSmrg only in the top level, while the `recursive' variant lists options 2524cd6a3aeSmrg also present in any nested packages. 2534cd6a3aeSmrg 2544cd6a3aeSmrg`--version' 2554cd6a3aeSmrg`-V' 2564cd6a3aeSmrg Print the version of Autoconf used to generate the `configure' 2574cd6a3aeSmrg script, and exit. 2584cd6a3aeSmrg 2594cd6a3aeSmrg`--cache-file=FILE' 2604cd6a3aeSmrg Enable the cache: use and save the results of the tests in FILE, 2614cd6a3aeSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2624cd6a3aeSmrg disable caching. 2634cd6a3aeSmrg 2644cd6a3aeSmrg`--config-cache' 2654cd6a3aeSmrg`-C' 2664cd6a3aeSmrg Alias for `--cache-file=config.cache'. 2674cd6a3aeSmrg 2684cd6a3aeSmrg`--quiet' 2694cd6a3aeSmrg`--silent' 2704cd6a3aeSmrg`-q' 2714cd6a3aeSmrg Do not print messages saying which checks are being made. To 2724cd6a3aeSmrg suppress all normal output, redirect it to `/dev/null' (any error 2734cd6a3aeSmrg messages will still be shown). 2744cd6a3aeSmrg 2754cd6a3aeSmrg`--srcdir=DIR' 2764cd6a3aeSmrg Look for the package's source code in directory DIR. Usually 2774cd6a3aeSmrg `configure' can determine that directory automatically. 2784cd6a3aeSmrg 2794cd6a3aeSmrg`--prefix=DIR' 2804cd6a3aeSmrg Use DIR as the installation prefix. *Note Installation Names:: 2814cd6a3aeSmrg for more details, including other options available for fine-tuning 2824cd6a3aeSmrg the installation locations. 2834cd6a3aeSmrg 2844cd6a3aeSmrg`--no-create' 2854cd6a3aeSmrg`-n' 2864cd6a3aeSmrg Run the configure checks, but stop before creating any output 2874cd6a3aeSmrg files. 2884cd6a3aeSmrg 2894cd6a3aeSmrg`configure' also accepts some other, not widely useful, options. Run 2904cd6a3aeSmrg`configure --help' for more details. 2914cd6a3aeSmrg 292