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