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