INSTALL revision 9c125d91
19c125d91SmrgInstallation Instructions 29c125d91Smrg************************* 39c125d91Smrg 49c125d91SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 59c125d91Smrg2006, 2007, 2008 Free Software Foundation, Inc. 69c125d91Smrg 79c125d91Smrg This file is free documentation; the Free Software Foundation gives 89c125d91Smrgunlimited permission to copy, distribute and modify it. 99c125d91Smrg 109c125d91SmrgBasic Installation 119c125d91Smrg================== 129c125d91Smrg 139c125d91Smrg Briefly, the shell commands `./configure; make; make install' should 149c125d91Smrgconfigure, build, and install this package. The following 159c125d91Smrgmore-detailed instructions are generic; see the `README' file for 169c125d91Smrginstructions specific to this package. 179c125d91Smrg 189c125d91Smrg The `configure' shell script attempts to guess correct values for 199c125d91Smrgvarious system-dependent variables used during compilation. It uses 209c125d91Smrgthose values to create a `Makefile' in each directory of the package. 219c125d91SmrgIt may also create one or more `.h' files containing system-dependent 229c125d91Smrgdefinitions. Finally, it creates a shell script `config.status' that 239c125d91Smrgyou can run in the future to recreate the current configuration, and a 249c125d91Smrgfile `config.log' containing compiler output (useful mainly for 259c125d91Smrgdebugging `configure'). 269c125d91Smrg 279c125d91Smrg It can also use an optional file (typically called `config.cache' 289c125d91Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 299c125d91Smrgthe results of its tests to speed up reconfiguring. Caching is 309c125d91Smrgdisabled by default to prevent problems with accidental use of stale 319c125d91Smrgcache files. 329c125d91Smrg 339c125d91Smrg If you need to do unusual things to compile the package, please try 349c125d91Smrgto figure out how `configure' could check whether to do them, and mail 359c125d91Smrgdiffs or instructions to the address given in the `README' so they can 369c125d91Smrgbe considered for the next release. If you are using the cache, and at 379c125d91Smrgsome point `config.cache' contains results you don't want to keep, you 389c125d91Smrgmay remove or edit it. 399c125d91Smrg 409c125d91Smrg The file `configure.ac' (or `configure.in') is used to create 419c125d91Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 429c125d91Smrgyou want to change it or regenerate `configure' using a newer version 439c125d91Smrgof `autoconf'. 449c125d91Smrg 459c125d91SmrgThe simplest way to compile this package is: 469c125d91Smrg 479c125d91Smrg 1. `cd' to the directory containing the package's source code and type 489c125d91Smrg `./configure' to configure the package for your system. 499c125d91Smrg 509c125d91Smrg Running `configure' might take a while. While running, it prints 519c125d91Smrg some messages telling which features it is checking for. 529c125d91Smrg 539c125d91Smrg 2. Type `make' to compile the package. 549c125d91Smrg 559c125d91Smrg 3. Optionally, type `make check' to run any self-tests that come with 569c125d91Smrg the package. 579c125d91Smrg 589c125d91Smrg 4. Type `make install' to install the programs and any data files and 599c125d91Smrg documentation. 609c125d91Smrg 619c125d91Smrg 5. You can remove the program binaries and object files from the 629c125d91Smrg source code directory by typing `make clean'. To also remove the 639c125d91Smrg files that `configure' created (so you can compile the package for 649c125d91Smrg a different kind of computer), type `make distclean'. There is 659c125d91Smrg also a `make maintainer-clean' target, but that is intended mainly 669c125d91Smrg for the package's developers. If you use it, you may have to get 679c125d91Smrg all sorts of other programs in order to regenerate files that came 689c125d91Smrg with the distribution. 699c125d91Smrg 709c125d91Smrg 6. Often, you can also type `make uninstall' to remove the installed 719c125d91Smrg files again. 729c125d91Smrg 739c125d91SmrgCompilers and Options 749c125d91Smrg===================== 759c125d91Smrg 769c125d91Smrg Some systems require unusual options for compilation or linking that 779c125d91Smrgthe `configure' script does not know about. Run `./configure --help' 789c125d91Smrgfor details on some of the pertinent environment variables. 799c125d91Smrg 809c125d91Smrg You can give `configure' initial values for configuration parameters 819c125d91Smrgby setting variables in the command line or in the environment. Here 829c125d91Smrgis an example: 839c125d91Smrg 849c125d91Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 859c125d91Smrg 869c125d91Smrg *Note Defining Variables::, for more details. 879c125d91Smrg 889c125d91SmrgCompiling For Multiple Architectures 899c125d91Smrg==================================== 909c125d91Smrg 919c125d91Smrg You can compile the package for more than one kind of computer at the 929c125d91Smrgsame time, by placing the object files for each architecture in their 939c125d91Smrgown directory. To do this, you can use GNU `make'. `cd' to the 949c125d91Smrgdirectory where you want the object files and executables to go and run 959c125d91Smrgthe `configure' script. `configure' automatically checks for the 969c125d91Smrgsource code in the directory that `configure' is in and in `..'. 979c125d91Smrg 989c125d91Smrg With a non-GNU `make', it is safer to compile the package for one 999c125d91Smrgarchitecture at a time in the source code directory. After you have 1009c125d91Smrginstalled the package for one architecture, use `make distclean' before 1019c125d91Smrgreconfiguring for another architecture. 1029c125d91Smrg 1039c125d91Smrg On MacOS X 10.5 and later systems, you can create libraries and 1049c125d91Smrgexecutables that work on multiple system types--known as "fat" or 1059c125d91Smrg"universal" binaries--by specifying multiple `-arch' options to the 1069c125d91Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1079c125d91Smrgthis: 1089c125d91Smrg 1099c125d91Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1109c125d91Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1119c125d91Smrg CPP="gcc -E" CXXCPP="g++ -E" 1129c125d91Smrg 1139c125d91Smrg This is not guaranteed to produce working output in all cases, you 1149c125d91Smrgmay have to build one architecture at a time and combine the results 1159c125d91Smrgusing the `lipo' tool if you have problems. 1169c125d91Smrg 1179c125d91SmrgInstallation Names 1189c125d91Smrg================== 1199c125d91Smrg 1209c125d91Smrg By default, `make install' installs the package's commands under 1219c125d91Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1229c125d91Smrgcan specify an installation prefix other than `/usr/local' by giving 1239c125d91Smrg`configure' the option `--prefix=PREFIX'. 1249c125d91Smrg 1259c125d91Smrg You can specify separate installation prefixes for 1269c125d91Smrgarchitecture-specific files and architecture-independent files. If you 1279c125d91Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1289c125d91SmrgPREFIX as the prefix for installing programs and libraries. 1299c125d91SmrgDocumentation and other data files still use the regular prefix. 1309c125d91Smrg 1319c125d91Smrg In addition, if you use an unusual directory layout you can give 1329c125d91Smrgoptions like `--bindir=DIR' to specify different values for particular 1339c125d91Smrgkinds of files. Run `configure --help' for a list of the directories 1349c125d91Smrgyou can set and what kinds of files go in them. 1359c125d91Smrg 1369c125d91Smrg If the package supports it, you can cause programs to be installed 1379c125d91Smrgwith an extra prefix or suffix on their names by giving `configure' the 1389c125d91Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1399c125d91Smrg 1409c125d91SmrgOptional Features 1419c125d91Smrg================= 1429c125d91Smrg 1439c125d91Smrg Some packages pay attention to `--enable-FEATURE' options to 1449c125d91Smrg`configure', where FEATURE indicates an optional part of the package. 1459c125d91SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1469c125d91Smrgis something like `gnu-as' or `x' (for the X Window System). The 1479c125d91Smrg`README' should mention any `--enable-' and `--with-' options that the 1489c125d91Smrgpackage recognizes. 1499c125d91Smrg 1509c125d91Smrg For packages that use the X Window System, `configure' can usually 1519c125d91Smrgfind the X include and library files automatically, but if it doesn't, 1529c125d91Smrgyou can use the `configure' options `--x-includes=DIR' and 1539c125d91Smrg`--x-libraries=DIR' to specify their locations. 1549c125d91Smrg 1559c125d91SmrgParticular systems 1569c125d91Smrg================== 1579c125d91Smrg 1589c125d91Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1599c125d91SmrgCC is not installed, it is recommended to use the following options in 1609c125d91Smrgorder to use an ANSI C compiler: 1619c125d91Smrg 1629c125d91Smrg ./configure CC="cc -Ae" 1639c125d91Smrg 1649c125d91Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1659c125d91Smrg 1669c125d91Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1679c125d91Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1689c125d91Smrga workaround. If GNU CC is not installed, it is therefore recommended 1699c125d91Smrgto try 1709c125d91Smrg 1719c125d91Smrg ./configure CC="cc" 1729c125d91Smrg 1739c125d91Smrgand if that doesn't work, try 1749c125d91Smrg 1759c125d91Smrg ./configure CC="cc -nodtk" 1769c125d91Smrg 1779c125d91SmrgSpecifying the System Type 1789c125d91Smrg========================== 1799c125d91Smrg 1809c125d91Smrg There may be some features `configure' cannot figure out 1819c125d91Smrgautomatically, but needs to determine by the type of machine the package 1829c125d91Smrgwill run on. Usually, assuming the package is built to be run on the 1839c125d91Smrg_same_ architectures, `configure' can figure that out, but if it prints 1849c125d91Smrga message saying it cannot guess the machine type, give it the 1859c125d91Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1869c125d91Smrgtype, such as `sun4', or a canonical name which has the form: 1879c125d91Smrg 1889c125d91Smrg CPU-COMPANY-SYSTEM 1899c125d91Smrg 1909c125d91Smrgwhere SYSTEM can have one of these forms: 1919c125d91Smrg 1929c125d91Smrg OS KERNEL-OS 1939c125d91Smrg 1949c125d91Smrg See the file `config.sub' for the possible values of each field. If 1959c125d91Smrg`config.sub' isn't included in this package, then this package doesn't 1969c125d91Smrgneed to know the machine type. 1979c125d91Smrg 1989c125d91Smrg If you are _building_ compiler tools for cross-compiling, you should 1999c125d91Smrguse the option `--target=TYPE' to select the type of system they will 2009c125d91Smrgproduce code for. 2019c125d91Smrg 2029c125d91Smrg If you want to _use_ a cross compiler, that generates code for a 2039c125d91Smrgplatform different from the build platform, you should specify the 2049c125d91Smrg"host" platform (i.e., that on which the generated programs will 2059c125d91Smrgeventually be run) with `--host=TYPE'. 2069c125d91Smrg 2079c125d91SmrgSharing Defaults 2089c125d91Smrg================ 2099c125d91Smrg 2109c125d91Smrg If you want to set default values for `configure' scripts to share, 2119c125d91Smrgyou can create a site shell script called `config.site' that gives 2129c125d91Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2139c125d91Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2149c125d91Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2159c125d91Smrg`CONFIG_SITE' environment variable to the location of the site script. 2169c125d91SmrgA warning: not all `configure' scripts look for a site script. 2179c125d91Smrg 2189c125d91SmrgDefining Variables 2199c125d91Smrg================== 2209c125d91Smrg 2219c125d91Smrg Variables not defined in a site shell script can be set in the 2229c125d91Smrgenvironment passed to `configure'. However, some packages may run 2239c125d91Smrgconfigure again during the build, and the customized values of these 2249c125d91Smrgvariables may be lost. In order to avoid this problem, you should set 2259c125d91Smrgthem in the `configure' command line, using `VAR=value'. For example: 2269c125d91Smrg 2279c125d91Smrg ./configure CC=/usr/local2/bin/gcc 2289c125d91Smrg 2299c125d91Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2309c125d91Smrgoverridden in the site shell script). 2319c125d91Smrg 2329c125d91SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2339c125d91Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2349c125d91Smrg 2359c125d91Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2369c125d91Smrg 2379c125d91Smrg`configure' Invocation 2389c125d91Smrg====================== 2399c125d91Smrg 2409c125d91Smrg `configure' recognizes the following options to control how it 2419c125d91Smrgoperates. 2429c125d91Smrg 2439c125d91Smrg`--help' 2449c125d91Smrg`-h' 2459c125d91Smrg Print a summary of all of the options to `configure', and exit. 2469c125d91Smrg 2479c125d91Smrg`--help=short' 2489c125d91Smrg`--help=recursive' 2499c125d91Smrg Print a summary of the options unique to this package's 2509c125d91Smrg `configure', and exit. The `short' variant lists options used 2519c125d91Smrg only in the top level, while the `recursive' variant lists options 2529c125d91Smrg also present in any nested packages. 2539c125d91Smrg 2549c125d91Smrg`--version' 2559c125d91Smrg`-V' 2569c125d91Smrg Print the version of Autoconf used to generate the `configure' 2579c125d91Smrg script, and exit. 2589c125d91Smrg 2599c125d91Smrg`--cache-file=FILE' 2609c125d91Smrg Enable the cache: use and save the results of the tests in FILE, 2619c125d91Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2629c125d91Smrg disable caching. 2639c125d91Smrg 2649c125d91Smrg`--config-cache' 2659c125d91Smrg`-C' 2669c125d91Smrg Alias for `--cache-file=config.cache'. 2679c125d91Smrg 2689c125d91Smrg`--quiet' 2699c125d91Smrg`--silent' 2709c125d91Smrg`-q' 2719c125d91Smrg Do not print messages saying which checks are being made. To 2729c125d91Smrg suppress all normal output, redirect it to `/dev/null' (any error 2739c125d91Smrg messages will still be shown). 2749c125d91Smrg 2759c125d91Smrg`--srcdir=DIR' 2769c125d91Smrg Look for the package's source code in directory DIR. Usually 2779c125d91Smrg `configure' can determine that directory automatically. 2789c125d91Smrg 2799c125d91Smrg`--prefix=DIR' 2809c125d91Smrg Use DIR as the installation prefix. *Note Installation Names:: 2819c125d91Smrg for more details, including other options available for fine-tuning 2829c125d91Smrg the installation locations. 2839c125d91Smrg 2849c125d91Smrg`--no-create' 2859c125d91Smrg`-n' 2869c125d91Smrg Run the configure checks, but stop before creating any output 2879c125d91Smrg files. 2889c125d91Smrg 2899c125d91Smrg`configure' also accepts some other, not widely useful, options. Run 2909c125d91Smrg`configure --help' for more details. 2919c125d91Smrg 292