INSTALL revision 1b12faf6
11b12faf6SmrgInstallation Instructions 21b12faf6Smrg************************* 31b12faf6Smrg 41b12faf6SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 51b12faf6Smrg2006, 2007, 2008 Free Software Foundation, Inc. 61b12faf6Smrg 71b12faf6Smrg This file is free documentation; the Free Software Foundation gives 81b12faf6Smrgunlimited permission to copy, distribute and modify it. 91b12faf6Smrg 101b12faf6SmrgBasic Installation 111b12faf6Smrg================== 121b12faf6Smrg 131b12faf6Smrg Briefly, the shell commands `./configure; make; make install' should 141b12faf6Smrgconfigure, build, and install this package. The following 151b12faf6Smrgmore-detailed instructions are generic; see the `README' file for 161b12faf6Smrginstructions specific to this package. 171b12faf6Smrg 181b12faf6Smrg The `configure' shell script attempts to guess correct values for 191b12faf6Smrgvarious system-dependent variables used during compilation. It uses 201b12faf6Smrgthose values to create a `Makefile' in each directory of the package. 211b12faf6SmrgIt may also create one or more `.h' files containing system-dependent 221b12faf6Smrgdefinitions. Finally, it creates a shell script `config.status' that 231b12faf6Smrgyou can run in the future to recreate the current configuration, and a 241b12faf6Smrgfile `config.log' containing compiler output (useful mainly for 251b12faf6Smrgdebugging `configure'). 261b12faf6Smrg 271b12faf6Smrg It can also use an optional file (typically called `config.cache' 281b12faf6Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 291b12faf6Smrgthe results of its tests to speed up reconfiguring. Caching is 301b12faf6Smrgdisabled by default to prevent problems with accidental use of stale 311b12faf6Smrgcache files. 321b12faf6Smrg 331b12faf6Smrg If you need to do unusual things to compile the package, please try 341b12faf6Smrgto figure out how `configure' could check whether to do them, and mail 351b12faf6Smrgdiffs or instructions to the address given in the `README' so they can 361b12faf6Smrgbe considered for the next release. If you are using the cache, and at 371b12faf6Smrgsome point `config.cache' contains results you don't want to keep, you 381b12faf6Smrgmay remove or edit it. 391b12faf6Smrg 401b12faf6Smrg The file `configure.ac' (or `configure.in') is used to create 411b12faf6Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 421b12faf6Smrgyou want to change it or regenerate `configure' using a newer version 431b12faf6Smrgof `autoconf'. 441b12faf6Smrg 451b12faf6SmrgThe simplest way to compile this package is: 461b12faf6Smrg 471b12faf6Smrg 1. `cd' to the directory containing the package's source code and type 481b12faf6Smrg `./configure' to configure the package for your system. 491b12faf6Smrg 501b12faf6Smrg Running `configure' might take a while. While running, it prints 511b12faf6Smrg some messages telling which features it is checking for. 521b12faf6Smrg 531b12faf6Smrg 2. Type `make' to compile the package. 541b12faf6Smrg 551b12faf6Smrg 3. Optionally, type `make check' to run any self-tests that come with 561b12faf6Smrg the package. 571b12faf6Smrg 581b12faf6Smrg 4. Type `make install' to install the programs and any data files and 591b12faf6Smrg documentation. 601b12faf6Smrg 611b12faf6Smrg 5. You can remove the program binaries and object files from the 621b12faf6Smrg source code directory by typing `make clean'. To also remove the 631b12faf6Smrg files that `configure' created (so you can compile the package for 641b12faf6Smrg a different kind of computer), type `make distclean'. There is 651b12faf6Smrg also a `make maintainer-clean' target, but that is intended mainly 661b12faf6Smrg for the package's developers. If you use it, you may have to get 671b12faf6Smrg all sorts of other programs in order to regenerate files that came 681b12faf6Smrg with the distribution. 691b12faf6Smrg 701b12faf6Smrg 6. Often, you can also type `make uninstall' to remove the installed 711b12faf6Smrg files again. 721b12faf6Smrg 731b12faf6SmrgCompilers and Options 741b12faf6Smrg===================== 751b12faf6Smrg 761b12faf6Smrg Some systems require unusual options for compilation or linking that 771b12faf6Smrgthe `configure' script does not know about. Run `./configure --help' 781b12faf6Smrgfor details on some of the pertinent environment variables. 791b12faf6Smrg 801b12faf6Smrg You can give `configure' initial values for configuration parameters 811b12faf6Smrgby setting variables in the command line or in the environment. Here 821b12faf6Smrgis an example: 831b12faf6Smrg 841b12faf6Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 851b12faf6Smrg 861b12faf6Smrg *Note Defining Variables::, for more details. 871b12faf6Smrg 881b12faf6SmrgCompiling For Multiple Architectures 891b12faf6Smrg==================================== 901b12faf6Smrg 911b12faf6Smrg You can compile the package for more than one kind of computer at the 921b12faf6Smrgsame time, by placing the object files for each architecture in their 931b12faf6Smrgown directory. To do this, you can use GNU `make'. `cd' to the 941b12faf6Smrgdirectory where you want the object files and executables to go and run 951b12faf6Smrgthe `configure' script. `configure' automatically checks for the 961b12faf6Smrgsource code in the directory that `configure' is in and in `..'. 971b12faf6Smrg 981b12faf6Smrg With a non-GNU `make', it is safer to compile the package for one 991b12faf6Smrgarchitecture at a time in the source code directory. After you have 1001b12faf6Smrginstalled the package for one architecture, use `make distclean' before 1011b12faf6Smrgreconfiguring for another architecture. 1021b12faf6Smrg 1031b12faf6Smrg On MacOS X 10.5 and later systems, you can create libraries and 1041b12faf6Smrgexecutables that work on multiple system types--known as "fat" or 1051b12faf6Smrg"universal" binaries--by specifying multiple `-arch' options to the 1061b12faf6Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1071b12faf6Smrgthis: 1081b12faf6Smrg 1091b12faf6Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1101b12faf6Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1111b12faf6Smrg CPP="gcc -E" CXXCPP="g++ -E" 1121b12faf6Smrg 1131b12faf6Smrg This is not guaranteed to produce working output in all cases, you 1141b12faf6Smrgmay have to build one architecture at a time and combine the results 1151b12faf6Smrgusing the `lipo' tool if you have problems. 1161b12faf6Smrg 1171b12faf6SmrgInstallation Names 1181b12faf6Smrg================== 1191b12faf6Smrg 1201b12faf6Smrg By default, `make install' installs the package's commands under 1211b12faf6Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1221b12faf6Smrgcan specify an installation prefix other than `/usr/local' by giving 1231b12faf6Smrg`configure' the option `--prefix=PREFIX'. 1241b12faf6Smrg 1251b12faf6Smrg You can specify separate installation prefixes for 1261b12faf6Smrgarchitecture-specific files and architecture-independent files. If you 1271b12faf6Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1281b12faf6SmrgPREFIX as the prefix for installing programs and libraries. 1291b12faf6SmrgDocumentation and other data files still use the regular prefix. 1301b12faf6Smrg 1311b12faf6Smrg In addition, if you use an unusual directory layout you can give 1321b12faf6Smrgoptions like `--bindir=DIR' to specify different values for particular 1331b12faf6Smrgkinds of files. Run `configure --help' for a list of the directories 1341b12faf6Smrgyou can set and what kinds of files go in them. 1351b12faf6Smrg 1361b12faf6Smrg If the package supports it, you can cause programs to be installed 1371b12faf6Smrgwith an extra prefix or suffix on their names by giving `configure' the 1381b12faf6Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1391b12faf6Smrg 1401b12faf6SmrgOptional Features 1411b12faf6Smrg================= 1421b12faf6Smrg 1431b12faf6Smrg Some packages pay attention to `--enable-FEATURE' options to 1441b12faf6Smrg`configure', where FEATURE indicates an optional part of the package. 1451b12faf6SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1461b12faf6Smrgis something like `gnu-as' or `x' (for the X Window System). The 1471b12faf6Smrg`README' should mention any `--enable-' and `--with-' options that the 1481b12faf6Smrgpackage recognizes. 1491b12faf6Smrg 1501b12faf6Smrg For packages that use the X Window System, `configure' can usually 1511b12faf6Smrgfind the X include and library files automatically, but if it doesn't, 1521b12faf6Smrgyou can use the `configure' options `--x-includes=DIR' and 1531b12faf6Smrg`--x-libraries=DIR' to specify their locations. 1541b12faf6Smrg 1551b12faf6SmrgParticular systems 1561b12faf6Smrg================== 1571b12faf6Smrg 1581b12faf6Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1591b12faf6SmrgCC is not installed, it is recommended to use the following options in 1601b12faf6Smrgorder to use an ANSI C compiler: 1611b12faf6Smrg 1621b12faf6Smrg ./configure CC="cc -Ae" 1631b12faf6Smrg 1641b12faf6Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1651b12faf6Smrg 1661b12faf6Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1671b12faf6Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1681b12faf6Smrga workaround. If GNU CC is not installed, it is therefore recommended 1691b12faf6Smrgto try 1701b12faf6Smrg 1711b12faf6Smrg ./configure CC="cc" 1721b12faf6Smrg 1731b12faf6Smrgand if that doesn't work, try 1741b12faf6Smrg 1751b12faf6Smrg ./configure CC="cc -nodtk" 1761b12faf6Smrg 1771b12faf6SmrgSpecifying the System Type 1781b12faf6Smrg========================== 1791b12faf6Smrg 1801b12faf6Smrg There may be some features `configure' cannot figure out 1811b12faf6Smrgautomatically, but needs to determine by the type of machine the package 1821b12faf6Smrgwill run on. Usually, assuming the package is built to be run on the 1831b12faf6Smrg_same_ architectures, `configure' can figure that out, but if it prints 1841b12faf6Smrga message saying it cannot guess the machine type, give it the 1851b12faf6Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1861b12faf6Smrgtype, such as `sun4', or a canonical name which has the form: 1871b12faf6Smrg 1881b12faf6Smrg CPU-COMPANY-SYSTEM 1891b12faf6Smrg 1901b12faf6Smrgwhere SYSTEM can have one of these forms: 1911b12faf6Smrg 1921b12faf6Smrg OS KERNEL-OS 1931b12faf6Smrg 1941b12faf6Smrg See the file `config.sub' for the possible values of each field. If 1951b12faf6Smrg`config.sub' isn't included in this package, then this package doesn't 1961b12faf6Smrgneed to know the machine type. 1971b12faf6Smrg 1981b12faf6Smrg If you are _building_ compiler tools for cross-compiling, you should 1991b12faf6Smrguse the option `--target=TYPE' to select the type of system they will 2001b12faf6Smrgproduce code for. 2011b12faf6Smrg 2021b12faf6Smrg If you want to _use_ a cross compiler, that generates code for a 2031b12faf6Smrgplatform different from the build platform, you should specify the 2041b12faf6Smrg"host" platform (i.e., that on which the generated programs will 2051b12faf6Smrgeventually be run) with `--host=TYPE'. 2061b12faf6Smrg 2071b12faf6SmrgSharing Defaults 2081b12faf6Smrg================ 2091b12faf6Smrg 2101b12faf6Smrg If you want to set default values for `configure' scripts to share, 2111b12faf6Smrgyou can create a site shell script called `config.site' that gives 2121b12faf6Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2131b12faf6Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2141b12faf6Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2151b12faf6Smrg`CONFIG_SITE' environment variable to the location of the site script. 2161b12faf6SmrgA warning: not all `configure' scripts look for a site script. 2171b12faf6Smrg 2181b12faf6SmrgDefining Variables 2191b12faf6Smrg================== 2201b12faf6Smrg 2211b12faf6Smrg Variables not defined in a site shell script can be set in the 2221b12faf6Smrgenvironment passed to `configure'. However, some packages may run 2231b12faf6Smrgconfigure again during the build, and the customized values of these 2241b12faf6Smrgvariables may be lost. In order to avoid this problem, you should set 2251b12faf6Smrgthem in the `configure' command line, using `VAR=value'. For example: 2261b12faf6Smrg 2271b12faf6Smrg ./configure CC=/usr/local2/bin/gcc 2281b12faf6Smrg 2291b12faf6Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2301b12faf6Smrgoverridden in the site shell script). 2311b12faf6Smrg 2321b12faf6SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2331b12faf6Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2341b12faf6Smrg 2351b12faf6Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2361b12faf6Smrg 2371b12faf6Smrg`configure' Invocation 2381b12faf6Smrg====================== 2391b12faf6Smrg 2401b12faf6Smrg `configure' recognizes the following options to control how it 2411b12faf6Smrgoperates. 2421b12faf6Smrg 2431b12faf6Smrg`--help' 2441b12faf6Smrg`-h' 2451b12faf6Smrg Print a summary of all of the options to `configure', and exit. 2461b12faf6Smrg 2471b12faf6Smrg`--help=short' 2481b12faf6Smrg`--help=recursive' 2491b12faf6Smrg Print a summary of the options unique to this package's 2501b12faf6Smrg `configure', and exit. The `short' variant lists options used 2511b12faf6Smrg only in the top level, while the `recursive' variant lists options 2521b12faf6Smrg also present in any nested packages. 2531b12faf6Smrg 2541b12faf6Smrg`--version' 2551b12faf6Smrg`-V' 2561b12faf6Smrg Print the version of Autoconf used to generate the `configure' 2571b12faf6Smrg script, and exit. 2581b12faf6Smrg 2591b12faf6Smrg`--cache-file=FILE' 2601b12faf6Smrg Enable the cache: use and save the results of the tests in FILE, 2611b12faf6Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2621b12faf6Smrg disable caching. 2631b12faf6Smrg 2641b12faf6Smrg`--config-cache' 2651b12faf6Smrg`-C' 2661b12faf6Smrg Alias for `--cache-file=config.cache'. 2671b12faf6Smrg 2681b12faf6Smrg`--quiet' 2691b12faf6Smrg`--silent' 2701b12faf6Smrg`-q' 2711b12faf6Smrg Do not print messages saying which checks are being made. To 2721b12faf6Smrg suppress all normal output, redirect it to `/dev/null' (any error 2731b12faf6Smrg messages will still be shown). 2741b12faf6Smrg 2751b12faf6Smrg`--srcdir=DIR' 2761b12faf6Smrg Look for the package's source code in directory DIR. Usually 2771b12faf6Smrg `configure' can determine that directory automatically. 2781b12faf6Smrg 2791b12faf6Smrg`--prefix=DIR' 2801b12faf6Smrg Use DIR as the installation prefix. *Note Installation Names:: 2811b12faf6Smrg for more details, including other options available for fine-tuning 2821b12faf6Smrg the installation locations. 2831b12faf6Smrg 2841b12faf6Smrg`--no-create' 2851b12faf6Smrg`-n' 2861b12faf6Smrg Run the configure checks, but stop before creating any output 2871b12faf6Smrg files. 2881b12faf6Smrg 2891b12faf6Smrg`configure' also accepts some other, not widely useful, options. Run 2901b12faf6Smrg`configure --help' for more details. 2911b12faf6Smrg 292