INSTALL revision 5cf18391
15cf18391SmrgInstallation Instructions 25cf18391Smrg************************* 35cf18391Smrg 45cf18391SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 55cf18391Smrg2006, 2007, 2008 Free Software Foundation, Inc. 65cf18391Smrg 75cf18391Smrg This file is free documentation; the Free Software Foundation gives 85cf18391Smrgunlimited permission to copy, distribute and modify it. 95cf18391Smrg 105cf18391SmrgBasic Installation 115cf18391Smrg================== 125cf18391Smrg 135cf18391Smrg Briefly, the shell commands `./configure; make; make install' should 145cf18391Smrgconfigure, build, and install this package. The following 155cf18391Smrgmore-detailed instructions are generic; see the `README' file for 165cf18391Smrginstructions specific to this package. 175cf18391Smrg 185cf18391Smrg The `configure' shell script attempts to guess correct values for 195cf18391Smrgvarious system-dependent variables used during compilation. It uses 205cf18391Smrgthose values to create a `Makefile' in each directory of the package. 215cf18391SmrgIt may also create one or more `.h' files containing system-dependent 225cf18391Smrgdefinitions. Finally, it creates a shell script `config.status' that 235cf18391Smrgyou can run in the future to recreate the current configuration, and a 245cf18391Smrgfile `config.log' containing compiler output (useful mainly for 255cf18391Smrgdebugging `configure'). 265cf18391Smrg 275cf18391Smrg It can also use an optional file (typically called `config.cache' 285cf18391Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 295cf18391Smrgthe results of its tests to speed up reconfiguring. Caching is 305cf18391Smrgdisabled by default to prevent problems with accidental use of stale 315cf18391Smrgcache files. 325cf18391Smrg 335cf18391Smrg If you need to do unusual things to compile the package, please try 345cf18391Smrgto figure out how `configure' could check whether to do them, and mail 355cf18391Smrgdiffs or instructions to the address given in the `README' so they can 365cf18391Smrgbe considered for the next release. If you are using the cache, and at 375cf18391Smrgsome point `config.cache' contains results you don't want to keep, you 385cf18391Smrgmay remove or edit it. 395cf18391Smrg 405cf18391Smrg The file `configure.ac' (or `configure.in') is used to create 415cf18391Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 425cf18391Smrgyou want to change it or regenerate `configure' using a newer version 435cf18391Smrgof `autoconf'. 445cf18391Smrg 455cf18391SmrgThe simplest way to compile this package is: 465cf18391Smrg 475cf18391Smrg 1. `cd' to the directory containing the package's source code and type 485cf18391Smrg `./configure' to configure the package for your system. 495cf18391Smrg 505cf18391Smrg Running `configure' might take a while. While running, it prints 515cf18391Smrg some messages telling which features it is checking for. 525cf18391Smrg 535cf18391Smrg 2. Type `make' to compile the package. 545cf18391Smrg 555cf18391Smrg 3. Optionally, type `make check' to run any self-tests that come with 565cf18391Smrg the package. 575cf18391Smrg 585cf18391Smrg 4. Type `make install' to install the programs and any data files and 595cf18391Smrg documentation. 605cf18391Smrg 615cf18391Smrg 5. You can remove the program binaries and object files from the 625cf18391Smrg source code directory by typing `make clean'. To also remove the 635cf18391Smrg files that `configure' created (so you can compile the package for 645cf18391Smrg a different kind of computer), type `make distclean'. There is 655cf18391Smrg also a `make maintainer-clean' target, but that is intended mainly 665cf18391Smrg for the package's developers. If you use it, you may have to get 675cf18391Smrg all sorts of other programs in order to regenerate files that came 685cf18391Smrg with the distribution. 695cf18391Smrg 705cf18391Smrg 6. Often, you can also type `make uninstall' to remove the installed 715cf18391Smrg files again. 725cf18391Smrg 735cf18391SmrgCompilers and Options 745cf18391Smrg===================== 755cf18391Smrg 765cf18391Smrg Some systems require unusual options for compilation or linking that 775cf18391Smrgthe `configure' script does not know about. Run `./configure --help' 785cf18391Smrgfor details on some of the pertinent environment variables. 795cf18391Smrg 805cf18391Smrg You can give `configure' initial values for configuration parameters 815cf18391Smrgby setting variables in the command line or in the environment. Here 825cf18391Smrgis an example: 835cf18391Smrg 845cf18391Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 855cf18391Smrg 865cf18391Smrg *Note Defining Variables::, for more details. 875cf18391Smrg 885cf18391SmrgCompiling For Multiple Architectures 895cf18391Smrg==================================== 905cf18391Smrg 915cf18391Smrg You can compile the package for more than one kind of computer at the 925cf18391Smrgsame time, by placing the object files for each architecture in their 935cf18391Smrgown directory. To do this, you can use GNU `make'. `cd' to the 945cf18391Smrgdirectory where you want the object files and executables to go and run 955cf18391Smrgthe `configure' script. `configure' automatically checks for the 965cf18391Smrgsource code in the directory that `configure' is in and in `..'. 975cf18391Smrg 985cf18391Smrg With a non-GNU `make', it is safer to compile the package for one 995cf18391Smrgarchitecture at a time in the source code directory. After you have 1005cf18391Smrginstalled the package for one architecture, use `make distclean' before 1015cf18391Smrgreconfiguring for another architecture. 1025cf18391Smrg 1035cf18391Smrg On MacOS X 10.5 and later systems, you can create libraries and 1045cf18391Smrgexecutables that work on multiple system types--known as "fat" or 1055cf18391Smrg"universal" binaries--by specifying multiple `-arch' options to the 1065cf18391Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1075cf18391Smrgthis: 1085cf18391Smrg 1095cf18391Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1105cf18391Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1115cf18391Smrg CPP="gcc -E" CXXCPP="g++ -E" 1125cf18391Smrg 1135cf18391Smrg This is not guaranteed to produce working output in all cases, you 1145cf18391Smrgmay have to build one architecture at a time and combine the results 1155cf18391Smrgusing the `lipo' tool if you have problems. 1165cf18391Smrg 1175cf18391SmrgInstallation Names 1185cf18391Smrg================== 1195cf18391Smrg 1205cf18391Smrg By default, `make install' installs the package's commands under 1215cf18391Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1225cf18391Smrgcan specify an installation prefix other than `/usr/local' by giving 1235cf18391Smrg`configure' the option `--prefix=PREFIX'. 1245cf18391Smrg 1255cf18391Smrg You can specify separate installation prefixes for 1265cf18391Smrgarchitecture-specific files and architecture-independent files. If you 1275cf18391Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1285cf18391SmrgPREFIX as the prefix for installing programs and libraries. 1295cf18391SmrgDocumentation and other data files still use the regular prefix. 1305cf18391Smrg 1315cf18391Smrg In addition, if you use an unusual directory layout you can give 1325cf18391Smrgoptions like `--bindir=DIR' to specify different values for particular 1335cf18391Smrgkinds of files. Run `configure --help' for a list of the directories 1345cf18391Smrgyou can set and what kinds of files go in them. 1355cf18391Smrg 1365cf18391Smrg If the package supports it, you can cause programs to be installed 1375cf18391Smrgwith an extra prefix or suffix on their names by giving `configure' the 1385cf18391Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1395cf18391Smrg 1405cf18391SmrgOptional Features 1415cf18391Smrg================= 1425cf18391Smrg 1435cf18391Smrg Some packages pay attention to `--enable-FEATURE' options to 1445cf18391Smrg`configure', where FEATURE indicates an optional part of the package. 1455cf18391SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1465cf18391Smrgis something like `gnu-as' or `x' (for the X Window System). The 1475cf18391Smrg`README' should mention any `--enable-' and `--with-' options that the 1485cf18391Smrgpackage recognizes. 1495cf18391Smrg 1505cf18391Smrg For packages that use the X Window System, `configure' can usually 1515cf18391Smrgfind the X include and library files automatically, but if it doesn't, 1525cf18391Smrgyou can use the `configure' options `--x-includes=DIR' and 1535cf18391Smrg`--x-libraries=DIR' to specify their locations. 1545cf18391Smrg 1555cf18391SmrgParticular systems 1565cf18391Smrg================== 1575cf18391Smrg 1585cf18391Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1595cf18391SmrgCC is not installed, it is recommended to use the following options in 1605cf18391Smrgorder to use an ANSI C compiler: 1615cf18391Smrg 1625cf18391Smrg ./configure CC="cc -Ae" 1635cf18391Smrg 1645cf18391Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1655cf18391Smrg 1665cf18391Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1675cf18391Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1685cf18391Smrga workaround. If GNU CC is not installed, it is therefore recommended 1695cf18391Smrgto try 1705cf18391Smrg 1715cf18391Smrg ./configure CC="cc" 1725cf18391Smrg 1735cf18391Smrgand if that doesn't work, try 1745cf18391Smrg 1755cf18391Smrg ./configure CC="cc -nodtk" 1765cf18391Smrg 1775cf18391SmrgSpecifying the System Type 1785cf18391Smrg========================== 1795cf18391Smrg 1805cf18391Smrg There may be some features `configure' cannot figure out 1815cf18391Smrgautomatically, but needs to determine by the type of machine the package 1825cf18391Smrgwill run on. Usually, assuming the package is built to be run on the 1835cf18391Smrg_same_ architectures, `configure' can figure that out, but if it prints 1845cf18391Smrga message saying it cannot guess the machine type, give it the 1855cf18391Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1865cf18391Smrgtype, such as `sun4', or a canonical name which has the form: 1875cf18391Smrg 1885cf18391Smrg CPU-COMPANY-SYSTEM 1895cf18391Smrg 1905cf18391Smrgwhere SYSTEM can have one of these forms: 1915cf18391Smrg 1925cf18391Smrg OS KERNEL-OS 1935cf18391Smrg 1945cf18391Smrg See the file `config.sub' for the possible values of each field. If 1955cf18391Smrg`config.sub' isn't included in this package, then this package doesn't 1965cf18391Smrgneed to know the machine type. 1975cf18391Smrg 1985cf18391Smrg If you are _building_ compiler tools for cross-compiling, you should 1995cf18391Smrguse the option `--target=TYPE' to select the type of system they will 2005cf18391Smrgproduce code for. 2015cf18391Smrg 2025cf18391Smrg If you want to _use_ a cross compiler, that generates code for a 2035cf18391Smrgplatform different from the build platform, you should specify the 2045cf18391Smrg"host" platform (i.e., that on which the generated programs will 2055cf18391Smrgeventually be run) with `--host=TYPE'. 2065cf18391Smrg 2075cf18391SmrgSharing Defaults 2085cf18391Smrg================ 2095cf18391Smrg 2105cf18391Smrg If you want to set default values for `configure' scripts to share, 2115cf18391Smrgyou can create a site shell script called `config.site' that gives 2125cf18391Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2135cf18391Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2145cf18391Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2155cf18391Smrg`CONFIG_SITE' environment variable to the location of the site script. 2165cf18391SmrgA warning: not all `configure' scripts look for a site script. 2175cf18391Smrg 2185cf18391SmrgDefining Variables 2195cf18391Smrg================== 2205cf18391Smrg 2215cf18391Smrg Variables not defined in a site shell script can be set in the 2225cf18391Smrgenvironment passed to `configure'. However, some packages may run 2235cf18391Smrgconfigure again during the build, and the customized values of these 2245cf18391Smrgvariables may be lost. In order to avoid this problem, you should set 2255cf18391Smrgthem in the `configure' command line, using `VAR=value'. For example: 2265cf18391Smrg 2275cf18391Smrg ./configure CC=/usr/local2/bin/gcc 2285cf18391Smrg 2295cf18391Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2305cf18391Smrgoverridden in the site shell script). 2315cf18391Smrg 2325cf18391SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2335cf18391Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2345cf18391Smrg 2355cf18391Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2365cf18391Smrg 2375cf18391Smrg`configure' Invocation 2385cf18391Smrg====================== 2395cf18391Smrg 2405cf18391Smrg `configure' recognizes the following options to control how it 2415cf18391Smrgoperates. 2425cf18391Smrg 2435cf18391Smrg`--help' 2445cf18391Smrg`-h' 2455cf18391Smrg Print a summary of all of the options to `configure', and exit. 2465cf18391Smrg 2475cf18391Smrg`--help=short' 2485cf18391Smrg`--help=recursive' 2495cf18391Smrg Print a summary of the options unique to this package's 2505cf18391Smrg `configure', and exit. The `short' variant lists options used 2515cf18391Smrg only in the top level, while the `recursive' variant lists options 2525cf18391Smrg also present in any nested packages. 2535cf18391Smrg 2545cf18391Smrg`--version' 2555cf18391Smrg`-V' 2565cf18391Smrg Print the version of Autoconf used to generate the `configure' 2575cf18391Smrg script, and exit. 2585cf18391Smrg 2595cf18391Smrg`--cache-file=FILE' 2605cf18391Smrg Enable the cache: use and save the results of the tests in FILE, 2615cf18391Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2625cf18391Smrg disable caching. 2635cf18391Smrg 2645cf18391Smrg`--config-cache' 2655cf18391Smrg`-C' 2665cf18391Smrg Alias for `--cache-file=config.cache'. 2675cf18391Smrg 2685cf18391Smrg`--quiet' 2695cf18391Smrg`--silent' 2705cf18391Smrg`-q' 2715cf18391Smrg Do not print messages saying which checks are being made. To 2725cf18391Smrg suppress all normal output, redirect it to `/dev/null' (any error 2735cf18391Smrg messages will still be shown). 2745cf18391Smrg 2755cf18391Smrg`--srcdir=DIR' 2765cf18391Smrg Look for the package's source code in directory DIR. Usually 2775cf18391Smrg `configure' can determine that directory automatically. 2785cf18391Smrg 2795cf18391Smrg`--prefix=DIR' 2805cf18391Smrg Use DIR as the installation prefix. *Note Installation Names:: 2815cf18391Smrg for more details, including other options available for fine-tuning 2825cf18391Smrg the installation locations. 2835cf18391Smrg 2845cf18391Smrg`--no-create' 2855cf18391Smrg`-n' 2865cf18391Smrg Run the configure checks, but stop before creating any output 2875cf18391Smrg files. 2885cf18391Smrg 2895cf18391Smrg`configure' also accepts some other, not widely useful, options. Run 2905cf18391Smrg`configure --help' for more details. 2915cf18391Smrg 292