INSTALL revision 2227fc13
12227fc13SmrgInstallation Instructions 22227fc13Smrg************************* 32227fc13Smrg 42227fc13SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 52227fc13Smrg2006, 2007, 2008 Free Software Foundation, Inc. 62227fc13Smrg 72227fc13Smrg This file is free documentation; the Free Software Foundation gives 82227fc13Smrgunlimited permission to copy, distribute and modify it. 92227fc13Smrg 102227fc13SmrgBasic Installation 112227fc13Smrg================== 122227fc13Smrg 132227fc13Smrg Briefly, the shell commands `./configure; make; make install' should 142227fc13Smrgconfigure, build, and install this package. The following 152227fc13Smrgmore-detailed instructions are generic; see the `README' file for 162227fc13Smrginstructions specific to this package. 172227fc13Smrg 182227fc13Smrg The `configure' shell script attempts to guess correct values for 192227fc13Smrgvarious system-dependent variables used during compilation. It uses 202227fc13Smrgthose values to create a `Makefile' in each directory of the package. 212227fc13SmrgIt may also create one or more `.h' files containing system-dependent 222227fc13Smrgdefinitions. Finally, it creates a shell script `config.status' that 232227fc13Smrgyou can run in the future to recreate the current configuration, and a 242227fc13Smrgfile `config.log' containing compiler output (useful mainly for 252227fc13Smrgdebugging `configure'). 262227fc13Smrg 272227fc13Smrg It can also use an optional file (typically called `config.cache' 282227fc13Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 292227fc13Smrgthe results of its tests to speed up reconfiguring. Caching is 302227fc13Smrgdisabled by default to prevent problems with accidental use of stale 312227fc13Smrgcache files. 322227fc13Smrg 332227fc13Smrg If you need to do unusual things to compile the package, please try 342227fc13Smrgto figure out how `configure' could check whether to do them, and mail 352227fc13Smrgdiffs or instructions to the address given in the `README' so they can 362227fc13Smrgbe considered for the next release. If you are using the cache, and at 372227fc13Smrgsome point `config.cache' contains results you don't want to keep, you 382227fc13Smrgmay remove or edit it. 392227fc13Smrg 402227fc13Smrg The file `configure.ac' (or `configure.in') is used to create 412227fc13Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 422227fc13Smrgyou want to change it or regenerate `configure' using a newer version 432227fc13Smrgof `autoconf'. 442227fc13Smrg 452227fc13SmrgThe simplest way to compile this package is: 462227fc13Smrg 472227fc13Smrg 1. `cd' to the directory containing the package's source code and type 482227fc13Smrg `./configure' to configure the package for your system. 492227fc13Smrg 502227fc13Smrg Running `configure' might take a while. While running, it prints 512227fc13Smrg some messages telling which features it is checking for. 522227fc13Smrg 532227fc13Smrg 2. Type `make' to compile the package. 542227fc13Smrg 552227fc13Smrg 3. Optionally, type `make check' to run any self-tests that come with 562227fc13Smrg the package. 572227fc13Smrg 582227fc13Smrg 4. Type `make install' to install the programs and any data files and 592227fc13Smrg documentation. 602227fc13Smrg 612227fc13Smrg 5. You can remove the program binaries and object files from the 622227fc13Smrg source code directory by typing `make clean'. To also remove the 632227fc13Smrg files that `configure' created (so you can compile the package for 642227fc13Smrg a different kind of computer), type `make distclean'. There is 652227fc13Smrg also a `make maintainer-clean' target, but that is intended mainly 662227fc13Smrg for the package's developers. If you use it, you may have to get 672227fc13Smrg all sorts of other programs in order to regenerate files that came 682227fc13Smrg with the distribution. 692227fc13Smrg 702227fc13Smrg 6. Often, you can also type `make uninstall' to remove the installed 712227fc13Smrg files again. 722227fc13Smrg 732227fc13SmrgCompilers and Options 742227fc13Smrg===================== 752227fc13Smrg 762227fc13Smrg Some systems require unusual options for compilation or linking that 772227fc13Smrgthe `configure' script does not know about. Run `./configure --help' 782227fc13Smrgfor details on some of the pertinent environment variables. 792227fc13Smrg 802227fc13Smrg You can give `configure' initial values for configuration parameters 812227fc13Smrgby setting variables in the command line or in the environment. Here 822227fc13Smrgis an example: 832227fc13Smrg 842227fc13Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 852227fc13Smrg 862227fc13Smrg *Note Defining Variables::, for more details. 872227fc13Smrg 882227fc13SmrgCompiling For Multiple Architectures 892227fc13Smrg==================================== 902227fc13Smrg 912227fc13Smrg You can compile the package for more than one kind of computer at the 922227fc13Smrgsame time, by placing the object files for each architecture in their 932227fc13Smrgown directory. To do this, you can use GNU `make'. `cd' to the 942227fc13Smrgdirectory where you want the object files and executables to go and run 952227fc13Smrgthe `configure' script. `configure' automatically checks for the 962227fc13Smrgsource code in the directory that `configure' is in and in `..'. 972227fc13Smrg 982227fc13Smrg With a non-GNU `make', it is safer to compile the package for one 992227fc13Smrgarchitecture at a time in the source code directory. After you have 1002227fc13Smrginstalled the package for one architecture, use `make distclean' before 1012227fc13Smrgreconfiguring for another architecture. 1022227fc13Smrg 1032227fc13Smrg On MacOS X 10.5 and later systems, you can create libraries and 1042227fc13Smrgexecutables that work on multiple system types--known as "fat" or 1052227fc13Smrg"universal" binaries--by specifying multiple `-arch' options to the 1062227fc13Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1072227fc13Smrgthis: 1082227fc13Smrg 1092227fc13Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1102227fc13Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1112227fc13Smrg CPP="gcc -E" CXXCPP="g++ -E" 1122227fc13Smrg 1132227fc13Smrg This is not guaranteed to produce working output in all cases, you 1142227fc13Smrgmay have to build one architecture at a time and combine the results 1152227fc13Smrgusing the `lipo' tool if you have problems. 1162227fc13Smrg 1172227fc13SmrgInstallation Names 1182227fc13Smrg================== 1192227fc13Smrg 1202227fc13Smrg By default, `make install' installs the package's commands under 1212227fc13Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1222227fc13Smrgcan specify an installation prefix other than `/usr/local' by giving 1232227fc13Smrg`configure' the option `--prefix=PREFIX'. 1242227fc13Smrg 1252227fc13Smrg You can specify separate installation prefixes for 1262227fc13Smrgarchitecture-specific files and architecture-independent files. If you 1272227fc13Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1282227fc13SmrgPREFIX as the prefix for installing programs and libraries. 1292227fc13SmrgDocumentation and other data files still use the regular prefix. 1302227fc13Smrg 1312227fc13Smrg In addition, if you use an unusual directory layout you can give 1322227fc13Smrgoptions like `--bindir=DIR' to specify different values for particular 1332227fc13Smrgkinds of files. Run `configure --help' for a list of the directories 1342227fc13Smrgyou can set and what kinds of files go in them. 1352227fc13Smrg 1362227fc13Smrg If the package supports it, you can cause programs to be installed 1372227fc13Smrgwith an extra prefix or suffix on their names by giving `configure' the 1382227fc13Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1392227fc13Smrg 1402227fc13SmrgOptional Features 1412227fc13Smrg================= 1422227fc13Smrg 1432227fc13Smrg Some packages pay attention to `--enable-FEATURE' options to 1442227fc13Smrg`configure', where FEATURE indicates an optional part of the package. 1452227fc13SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1462227fc13Smrgis something like `gnu-as' or `x' (for the X Window System). The 1472227fc13Smrg`README' should mention any `--enable-' and `--with-' options that the 1482227fc13Smrgpackage recognizes. 1492227fc13Smrg 1502227fc13Smrg For packages that use the X Window System, `configure' can usually 1512227fc13Smrgfind the X include and library files automatically, but if it doesn't, 1522227fc13Smrgyou can use the `configure' options `--x-includes=DIR' and 1532227fc13Smrg`--x-libraries=DIR' to specify their locations. 1542227fc13Smrg 1552227fc13SmrgParticular systems 1562227fc13Smrg================== 1572227fc13Smrg 1582227fc13Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1592227fc13SmrgCC is not installed, it is recommended to use the following options in 1602227fc13Smrgorder to use an ANSI C compiler: 1612227fc13Smrg 1622227fc13Smrg ./configure CC="cc -Ae" 1632227fc13Smrg 1642227fc13Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1652227fc13Smrg 1662227fc13Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1672227fc13Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1682227fc13Smrga workaround. If GNU CC is not installed, it is therefore recommended 1692227fc13Smrgto try 1702227fc13Smrg 1712227fc13Smrg ./configure CC="cc" 1722227fc13Smrg 1732227fc13Smrgand if that doesn't work, try 1742227fc13Smrg 1752227fc13Smrg ./configure CC="cc -nodtk" 1762227fc13Smrg 1772227fc13SmrgSpecifying the System Type 1782227fc13Smrg========================== 1792227fc13Smrg 1802227fc13Smrg There may be some features `configure' cannot figure out 1812227fc13Smrgautomatically, but needs to determine by the type of machine the package 1822227fc13Smrgwill run on. Usually, assuming the package is built to be run on the 1832227fc13Smrg_same_ architectures, `configure' can figure that out, but if it prints 1842227fc13Smrga message saying it cannot guess the machine type, give it the 1852227fc13Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1862227fc13Smrgtype, such as `sun4', or a canonical name which has the form: 1872227fc13Smrg 1882227fc13Smrg CPU-COMPANY-SYSTEM 1892227fc13Smrg 1902227fc13Smrgwhere SYSTEM can have one of these forms: 1912227fc13Smrg 1922227fc13Smrg OS KERNEL-OS 1932227fc13Smrg 1942227fc13Smrg See the file `config.sub' for the possible values of each field. If 1952227fc13Smrg`config.sub' isn't included in this package, then this package doesn't 1962227fc13Smrgneed to know the machine type. 1972227fc13Smrg 1982227fc13Smrg If you are _building_ compiler tools for cross-compiling, you should 1992227fc13Smrguse the option `--target=TYPE' to select the type of system they will 2002227fc13Smrgproduce code for. 2012227fc13Smrg 2022227fc13Smrg If you want to _use_ a cross compiler, that generates code for a 2032227fc13Smrgplatform different from the build platform, you should specify the 2042227fc13Smrg"host" platform (i.e., that on which the generated programs will 2052227fc13Smrgeventually be run) with `--host=TYPE'. 2062227fc13Smrg 2072227fc13SmrgSharing Defaults 2082227fc13Smrg================ 2092227fc13Smrg 2102227fc13Smrg If you want to set default values for `configure' scripts to share, 2112227fc13Smrgyou can create a site shell script called `config.site' that gives 2122227fc13Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2132227fc13Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2142227fc13Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2152227fc13Smrg`CONFIG_SITE' environment variable to the location of the site script. 2162227fc13SmrgA warning: not all `configure' scripts look for a site script. 2172227fc13Smrg 2182227fc13SmrgDefining Variables 2192227fc13Smrg================== 2202227fc13Smrg 2212227fc13Smrg Variables not defined in a site shell script can be set in the 2222227fc13Smrgenvironment passed to `configure'. However, some packages may run 2232227fc13Smrgconfigure again during the build, and the customized values of these 2242227fc13Smrgvariables may be lost. In order to avoid this problem, you should set 2252227fc13Smrgthem in the `configure' command line, using `VAR=value'. For example: 2262227fc13Smrg 2272227fc13Smrg ./configure CC=/usr/local2/bin/gcc 2282227fc13Smrg 2292227fc13Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2302227fc13Smrgoverridden in the site shell script). 2312227fc13Smrg 2322227fc13SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2332227fc13Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2342227fc13Smrg 2352227fc13Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2362227fc13Smrg 2372227fc13Smrg`configure' Invocation 2382227fc13Smrg====================== 2392227fc13Smrg 2402227fc13Smrg `configure' recognizes the following options to control how it 2412227fc13Smrgoperates. 2422227fc13Smrg 2432227fc13Smrg`--help' 2442227fc13Smrg`-h' 2452227fc13Smrg Print a summary of all of the options to `configure', and exit. 2462227fc13Smrg 2472227fc13Smrg`--help=short' 2482227fc13Smrg`--help=recursive' 2492227fc13Smrg Print a summary of the options unique to this package's 2502227fc13Smrg `configure', and exit. The `short' variant lists options used 2512227fc13Smrg only in the top level, while the `recursive' variant lists options 2522227fc13Smrg also present in any nested packages. 2532227fc13Smrg 2542227fc13Smrg`--version' 2552227fc13Smrg`-V' 2562227fc13Smrg Print the version of Autoconf used to generate the `configure' 2572227fc13Smrg script, and exit. 2582227fc13Smrg 2592227fc13Smrg`--cache-file=FILE' 2602227fc13Smrg Enable the cache: use and save the results of the tests in FILE, 2612227fc13Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2622227fc13Smrg disable caching. 2632227fc13Smrg 2642227fc13Smrg`--config-cache' 2652227fc13Smrg`-C' 2662227fc13Smrg Alias for `--cache-file=config.cache'. 2672227fc13Smrg 2682227fc13Smrg`--quiet' 2692227fc13Smrg`--silent' 2702227fc13Smrg`-q' 2712227fc13Smrg Do not print messages saying which checks are being made. To 2722227fc13Smrg suppress all normal output, redirect it to `/dev/null' (any error 2732227fc13Smrg messages will still be shown). 2742227fc13Smrg 2752227fc13Smrg`--srcdir=DIR' 2762227fc13Smrg Look for the package's source code in directory DIR. Usually 2772227fc13Smrg `configure' can determine that directory automatically. 2782227fc13Smrg 2792227fc13Smrg`--prefix=DIR' 2802227fc13Smrg Use DIR as the installation prefix. *Note Installation Names:: 2812227fc13Smrg for more details, including other options available for fine-tuning 2822227fc13Smrg the installation locations. 2832227fc13Smrg 2842227fc13Smrg`--no-create' 2852227fc13Smrg`-n' 2862227fc13Smrg Run the configure checks, but stop before creating any output 2872227fc13Smrg files. 2882227fc13Smrg 2892227fc13Smrg`configure' also accepts some other, not widely useful, options. Run 2902227fc13Smrg`configure --help' for more details. 2912227fc13Smrg 292