INSTALL revision 7bd0f98d
17bd0f98dSmrgInstallation Instructions 27bd0f98dSmrg************************* 37bd0f98dSmrg 47bd0f98dSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 57bd0f98dSmrg2006, 2007, 2008 Free Software Foundation, Inc. 67bd0f98dSmrg 77bd0f98dSmrg This file is free documentation; the Free Software Foundation gives 87bd0f98dSmrgunlimited permission to copy, distribute and modify it. 97bd0f98dSmrg 107bd0f98dSmrgBasic Installation 117bd0f98dSmrg================== 127bd0f98dSmrg 137bd0f98dSmrg Briefly, the shell commands `./configure; make; make install' should 147bd0f98dSmrgconfigure, build, and install this package. The following 157bd0f98dSmrgmore-detailed instructions are generic; see the `README' file for 167bd0f98dSmrginstructions specific to this package. 177bd0f98dSmrg 187bd0f98dSmrg The `configure' shell script attempts to guess correct values for 197bd0f98dSmrgvarious system-dependent variables used during compilation. It uses 207bd0f98dSmrgthose values to create a `Makefile' in each directory of the package. 217bd0f98dSmrgIt may also create one or more `.h' files containing system-dependent 227bd0f98dSmrgdefinitions. Finally, it creates a shell script `config.status' that 237bd0f98dSmrgyou can run in the future to recreate the current configuration, and a 247bd0f98dSmrgfile `config.log' containing compiler output (useful mainly for 257bd0f98dSmrgdebugging `configure'). 267bd0f98dSmrg 277bd0f98dSmrg It can also use an optional file (typically called `config.cache' 287bd0f98dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 297bd0f98dSmrgthe results of its tests to speed up reconfiguring. Caching is 307bd0f98dSmrgdisabled by default to prevent problems with accidental use of stale 317bd0f98dSmrgcache files. 327bd0f98dSmrg 337bd0f98dSmrg If you need to do unusual things to compile the package, please try 347bd0f98dSmrgto figure out how `configure' could check whether to do them, and mail 357bd0f98dSmrgdiffs or instructions to the address given in the `README' so they can 367bd0f98dSmrgbe considered for the next release. If you are using the cache, and at 377bd0f98dSmrgsome point `config.cache' contains results you don't want to keep, you 387bd0f98dSmrgmay remove or edit it. 397bd0f98dSmrg 407bd0f98dSmrg The file `configure.ac' (or `configure.in') is used to create 417bd0f98dSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 427bd0f98dSmrgyou want to change it or regenerate `configure' using a newer version 437bd0f98dSmrgof `autoconf'. 447bd0f98dSmrg 457bd0f98dSmrgThe simplest way to compile this package is: 467bd0f98dSmrg 477bd0f98dSmrg 1. `cd' to the directory containing the package's source code and type 487bd0f98dSmrg `./configure' to configure the package for your system. 497bd0f98dSmrg 507bd0f98dSmrg Running `configure' might take a while. While running, it prints 517bd0f98dSmrg some messages telling which features it is checking for. 527bd0f98dSmrg 537bd0f98dSmrg 2. Type `make' to compile the package. 547bd0f98dSmrg 557bd0f98dSmrg 3. Optionally, type `make check' to run any self-tests that come with 567bd0f98dSmrg the package. 577bd0f98dSmrg 587bd0f98dSmrg 4. Type `make install' to install the programs and any data files and 597bd0f98dSmrg documentation. 607bd0f98dSmrg 617bd0f98dSmrg 5. You can remove the program binaries and object files from the 627bd0f98dSmrg source code directory by typing `make clean'. To also remove the 637bd0f98dSmrg files that `configure' created (so you can compile the package for 647bd0f98dSmrg a different kind of computer), type `make distclean'. There is 657bd0f98dSmrg also a `make maintainer-clean' target, but that is intended mainly 667bd0f98dSmrg for the package's developers. If you use it, you may have to get 677bd0f98dSmrg all sorts of other programs in order to regenerate files that came 687bd0f98dSmrg with the distribution. 697bd0f98dSmrg 707bd0f98dSmrg 6. Often, you can also type `make uninstall' to remove the installed 717bd0f98dSmrg files again. 727bd0f98dSmrg 737bd0f98dSmrgCompilers and Options 747bd0f98dSmrg===================== 757bd0f98dSmrg 767bd0f98dSmrg Some systems require unusual options for compilation or linking that 777bd0f98dSmrgthe `configure' script does not know about. Run `./configure --help' 787bd0f98dSmrgfor details on some of the pertinent environment variables. 797bd0f98dSmrg 807bd0f98dSmrg You can give `configure' initial values for configuration parameters 817bd0f98dSmrgby setting variables in the command line or in the environment. Here 827bd0f98dSmrgis an example: 837bd0f98dSmrg 847bd0f98dSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 857bd0f98dSmrg 867bd0f98dSmrg *Note Defining Variables::, for more details. 877bd0f98dSmrg 887bd0f98dSmrgCompiling For Multiple Architectures 897bd0f98dSmrg==================================== 907bd0f98dSmrg 917bd0f98dSmrg You can compile the package for more than one kind of computer at the 927bd0f98dSmrgsame time, by placing the object files for each architecture in their 937bd0f98dSmrgown directory. To do this, you can use GNU `make'. `cd' to the 947bd0f98dSmrgdirectory where you want the object files and executables to go and run 957bd0f98dSmrgthe `configure' script. `configure' automatically checks for the 967bd0f98dSmrgsource code in the directory that `configure' is in and in `..'. 977bd0f98dSmrg 987bd0f98dSmrg With a non-GNU `make', it is safer to compile the package for one 997bd0f98dSmrgarchitecture at a time in the source code directory. After you have 1007bd0f98dSmrginstalled the package for one architecture, use `make distclean' before 1017bd0f98dSmrgreconfiguring for another architecture. 1027bd0f98dSmrg 1037bd0f98dSmrg On MacOS X 10.5 and later systems, you can create libraries and 1047bd0f98dSmrgexecutables that work on multiple system types--known as "fat" or 1057bd0f98dSmrg"universal" binaries--by specifying multiple `-arch' options to the 1067bd0f98dSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1077bd0f98dSmrgthis: 1087bd0f98dSmrg 1097bd0f98dSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1107bd0f98dSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1117bd0f98dSmrg CPP="gcc -E" CXXCPP="g++ -E" 1127bd0f98dSmrg 1137bd0f98dSmrg This is not guaranteed to produce working output in all cases, you 1147bd0f98dSmrgmay have to build one architecture at a time and combine the results 1157bd0f98dSmrgusing the `lipo' tool if you have problems. 1167bd0f98dSmrg 1177bd0f98dSmrgInstallation Names 1187bd0f98dSmrg================== 1197bd0f98dSmrg 1207bd0f98dSmrg By default, `make install' installs the package's commands under 1217bd0f98dSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1227bd0f98dSmrgcan specify an installation prefix other than `/usr/local' by giving 1237bd0f98dSmrg`configure' the option `--prefix=PREFIX'. 1247bd0f98dSmrg 1257bd0f98dSmrg You can specify separate installation prefixes for 1267bd0f98dSmrgarchitecture-specific files and architecture-independent files. If you 1277bd0f98dSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1287bd0f98dSmrgPREFIX as the prefix for installing programs and libraries. 1297bd0f98dSmrgDocumentation and other data files still use the regular prefix. 1307bd0f98dSmrg 1317bd0f98dSmrg In addition, if you use an unusual directory layout you can give 1327bd0f98dSmrgoptions like `--bindir=DIR' to specify different values for particular 1337bd0f98dSmrgkinds of files. Run `configure --help' for a list of the directories 1347bd0f98dSmrgyou can set and what kinds of files go in them. 1357bd0f98dSmrg 1367bd0f98dSmrg If the package supports it, you can cause programs to be installed 1377bd0f98dSmrgwith an extra prefix or suffix on their names by giving `configure' the 1387bd0f98dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1397bd0f98dSmrg 1407bd0f98dSmrgOptional Features 1417bd0f98dSmrg================= 1427bd0f98dSmrg 1437bd0f98dSmrg Some packages pay attention to `--enable-FEATURE' options to 1447bd0f98dSmrg`configure', where FEATURE indicates an optional part of the package. 1457bd0f98dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1467bd0f98dSmrgis something like `gnu-as' or `x' (for the X Window System). The 1477bd0f98dSmrg`README' should mention any `--enable-' and `--with-' options that the 1487bd0f98dSmrgpackage recognizes. 1497bd0f98dSmrg 1507bd0f98dSmrg For packages that use the X Window System, `configure' can usually 1517bd0f98dSmrgfind the X include and library files automatically, but if it doesn't, 1527bd0f98dSmrgyou can use the `configure' options `--x-includes=DIR' and 1537bd0f98dSmrg`--x-libraries=DIR' to specify their locations. 1547bd0f98dSmrg 1557bd0f98dSmrgParticular systems 1567bd0f98dSmrg================== 1577bd0f98dSmrg 1587bd0f98dSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1597bd0f98dSmrgCC is not installed, it is recommended to use the following options in 1607bd0f98dSmrgorder to use an ANSI C compiler: 1617bd0f98dSmrg 1627bd0f98dSmrg ./configure CC="cc -Ae" 1637bd0f98dSmrg 1647bd0f98dSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1657bd0f98dSmrg 1667bd0f98dSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1677bd0f98dSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1687bd0f98dSmrga workaround. If GNU CC is not installed, it is therefore recommended 1697bd0f98dSmrgto try 1707bd0f98dSmrg 1717bd0f98dSmrg ./configure CC="cc" 1727bd0f98dSmrg 1737bd0f98dSmrgand if that doesn't work, try 1747bd0f98dSmrg 1757bd0f98dSmrg ./configure CC="cc -nodtk" 1767bd0f98dSmrg 1777bd0f98dSmrgSpecifying the System Type 1787bd0f98dSmrg========================== 1797bd0f98dSmrg 1807bd0f98dSmrg There may be some features `configure' cannot figure out 1817bd0f98dSmrgautomatically, but needs to determine by the type of machine the package 1827bd0f98dSmrgwill run on. Usually, assuming the package is built to be run on the 1837bd0f98dSmrg_same_ architectures, `configure' can figure that out, but if it prints 1847bd0f98dSmrga message saying it cannot guess the machine type, give it the 1857bd0f98dSmrg`--build=TYPE' option. TYPE can either be a short name for the system 1867bd0f98dSmrgtype, such as `sun4', or a canonical name which has the form: 1877bd0f98dSmrg 1887bd0f98dSmrg CPU-COMPANY-SYSTEM 1897bd0f98dSmrg 1907bd0f98dSmrgwhere SYSTEM can have one of these forms: 1917bd0f98dSmrg 1927bd0f98dSmrg OS KERNEL-OS 1937bd0f98dSmrg 1947bd0f98dSmrg See the file `config.sub' for the possible values of each field. If 1957bd0f98dSmrg`config.sub' isn't included in this package, then this package doesn't 1967bd0f98dSmrgneed to know the machine type. 1977bd0f98dSmrg 1987bd0f98dSmrg If you are _building_ compiler tools for cross-compiling, you should 1997bd0f98dSmrguse the option `--target=TYPE' to select the type of system they will 2007bd0f98dSmrgproduce code for. 2017bd0f98dSmrg 2027bd0f98dSmrg If you want to _use_ a cross compiler, that generates code for a 2037bd0f98dSmrgplatform different from the build platform, you should specify the 2047bd0f98dSmrg"host" platform (i.e., that on which the generated programs will 2057bd0f98dSmrgeventually be run) with `--host=TYPE'. 2067bd0f98dSmrg 2077bd0f98dSmrgSharing Defaults 2087bd0f98dSmrg================ 2097bd0f98dSmrg 2107bd0f98dSmrg If you want to set default values for `configure' scripts to share, 2117bd0f98dSmrgyou can create a site shell script called `config.site' that gives 2127bd0f98dSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2137bd0f98dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2147bd0f98dSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2157bd0f98dSmrg`CONFIG_SITE' environment variable to the location of the site script. 2167bd0f98dSmrgA warning: not all `configure' scripts look for a site script. 2177bd0f98dSmrg 2187bd0f98dSmrgDefining Variables 2197bd0f98dSmrg================== 2207bd0f98dSmrg 2217bd0f98dSmrg Variables not defined in a site shell script can be set in the 2227bd0f98dSmrgenvironment passed to `configure'. However, some packages may run 2237bd0f98dSmrgconfigure again during the build, and the customized values of these 2247bd0f98dSmrgvariables may be lost. In order to avoid this problem, you should set 2257bd0f98dSmrgthem in the `configure' command line, using `VAR=value'. For example: 2267bd0f98dSmrg 2277bd0f98dSmrg ./configure CC=/usr/local2/bin/gcc 2287bd0f98dSmrg 2297bd0f98dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 2307bd0f98dSmrgoverridden in the site shell script). 2317bd0f98dSmrg 2327bd0f98dSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2337bd0f98dSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2347bd0f98dSmrg 2357bd0f98dSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2367bd0f98dSmrg 2377bd0f98dSmrg`configure' Invocation 2387bd0f98dSmrg====================== 2397bd0f98dSmrg 2407bd0f98dSmrg `configure' recognizes the following options to control how it 2417bd0f98dSmrgoperates. 2427bd0f98dSmrg 2437bd0f98dSmrg`--help' 2447bd0f98dSmrg`-h' 2457bd0f98dSmrg Print a summary of all of the options to `configure', and exit. 2467bd0f98dSmrg 2477bd0f98dSmrg`--help=short' 2487bd0f98dSmrg`--help=recursive' 2497bd0f98dSmrg Print a summary of the options unique to this package's 2507bd0f98dSmrg `configure', and exit. The `short' variant lists options used 2517bd0f98dSmrg only in the top level, while the `recursive' variant lists options 2527bd0f98dSmrg also present in any nested packages. 2537bd0f98dSmrg 2547bd0f98dSmrg`--version' 2557bd0f98dSmrg`-V' 2567bd0f98dSmrg Print the version of Autoconf used to generate the `configure' 2577bd0f98dSmrg script, and exit. 2587bd0f98dSmrg 2597bd0f98dSmrg`--cache-file=FILE' 2607bd0f98dSmrg Enable the cache: use and save the results of the tests in FILE, 2617bd0f98dSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2627bd0f98dSmrg disable caching. 2637bd0f98dSmrg 2647bd0f98dSmrg`--config-cache' 2657bd0f98dSmrg`-C' 2667bd0f98dSmrg Alias for `--cache-file=config.cache'. 2677bd0f98dSmrg 2687bd0f98dSmrg`--quiet' 2697bd0f98dSmrg`--silent' 2707bd0f98dSmrg`-q' 2717bd0f98dSmrg Do not print messages saying which checks are being made. To 2727bd0f98dSmrg suppress all normal output, redirect it to `/dev/null' (any error 2737bd0f98dSmrg messages will still be shown). 2747bd0f98dSmrg 2757bd0f98dSmrg`--srcdir=DIR' 2767bd0f98dSmrg Look for the package's source code in directory DIR. Usually 2777bd0f98dSmrg `configure' can determine that directory automatically. 2787bd0f98dSmrg 2797bd0f98dSmrg`--prefix=DIR' 2807bd0f98dSmrg Use DIR as the installation prefix. *Note Installation Names:: 2817bd0f98dSmrg for more details, including other options available for fine-tuning 2827bd0f98dSmrg the installation locations. 2837bd0f98dSmrg 2847bd0f98dSmrg`--no-create' 2857bd0f98dSmrg`-n' 2867bd0f98dSmrg Run the configure checks, but stop before creating any output 2877bd0f98dSmrg files. 2887bd0f98dSmrg 2897bd0f98dSmrg`configure' also accepts some other, not widely useful, options. Run 2907bd0f98dSmrg`configure --help' for more details. 2917bd0f98dSmrg 292