INSTALL revision 8f65982a
18f65982aSmrgInstallation Instructions 28f65982aSmrg************************* 38f65982aSmrg 48f65982aSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 58f65982aSmrg2006, 2007, 2008 Free Software Foundation, Inc. 68f65982aSmrg 78f65982aSmrg This file is free documentation; the Free Software Foundation gives 88f65982aSmrgunlimited permission to copy, distribute and modify it. 98f65982aSmrg 108f65982aSmrgBasic Installation 118f65982aSmrg================== 128f65982aSmrg 138f65982aSmrg Briefly, the shell commands `./configure; make; make install' should 148f65982aSmrgconfigure, build, and install this package. The following 158f65982aSmrgmore-detailed instructions are generic; see the `README' file for 168f65982aSmrginstructions specific to this package. 178f65982aSmrg 188f65982aSmrg The `configure' shell script attempts to guess correct values for 198f65982aSmrgvarious system-dependent variables used during compilation. It uses 208f65982aSmrgthose values to create a `Makefile' in each directory of the package. 218f65982aSmrgIt may also create one or more `.h' files containing system-dependent 228f65982aSmrgdefinitions. Finally, it creates a shell script `config.status' that 238f65982aSmrgyou can run in the future to recreate the current configuration, and a 248f65982aSmrgfile `config.log' containing compiler output (useful mainly for 258f65982aSmrgdebugging `configure'). 268f65982aSmrg 278f65982aSmrg It can also use an optional file (typically called `config.cache' 288f65982aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 298f65982aSmrgthe results of its tests to speed up reconfiguring. Caching is 308f65982aSmrgdisabled by default to prevent problems with accidental use of stale 318f65982aSmrgcache files. 328f65982aSmrg 338f65982aSmrg If you need to do unusual things to compile the package, please try 348f65982aSmrgto figure out how `configure' could check whether to do them, and mail 358f65982aSmrgdiffs or instructions to the address given in the `README' so they can 368f65982aSmrgbe considered for the next release. If you are using the cache, and at 378f65982aSmrgsome point `config.cache' contains results you don't want to keep, you 388f65982aSmrgmay remove or edit it. 398f65982aSmrg 408f65982aSmrg The file `configure.ac' (or `configure.in') is used to create 418f65982aSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 428f65982aSmrgyou want to change it or regenerate `configure' using a newer version 438f65982aSmrgof `autoconf'. 448f65982aSmrg 458f65982aSmrgThe simplest way to compile this package is: 468f65982aSmrg 478f65982aSmrg 1. `cd' to the directory containing the package's source code and type 488f65982aSmrg `./configure' to configure the package for your system. 498f65982aSmrg 508f65982aSmrg Running `configure' might take a while. While running, it prints 518f65982aSmrg some messages telling which features it is checking for. 528f65982aSmrg 538f65982aSmrg 2. Type `make' to compile the package. 548f65982aSmrg 558f65982aSmrg 3. Optionally, type `make check' to run any self-tests that come with 568f65982aSmrg the package. 578f65982aSmrg 588f65982aSmrg 4. Type `make install' to install the programs and any data files and 598f65982aSmrg documentation. 608f65982aSmrg 618f65982aSmrg 5. You can remove the program binaries and object files from the 628f65982aSmrg source code directory by typing `make clean'. To also remove the 638f65982aSmrg files that `configure' created (so you can compile the package for 648f65982aSmrg a different kind of computer), type `make distclean'. There is 658f65982aSmrg also a `make maintainer-clean' target, but that is intended mainly 668f65982aSmrg for the package's developers. If you use it, you may have to get 678f65982aSmrg all sorts of other programs in order to regenerate files that came 688f65982aSmrg with the distribution. 698f65982aSmrg 708f65982aSmrg 6. Often, you can also type `make uninstall' to remove the installed 718f65982aSmrg files again. 728f65982aSmrg 738f65982aSmrgCompilers and Options 748f65982aSmrg===================== 758f65982aSmrg 768f65982aSmrg Some systems require unusual options for compilation or linking that 778f65982aSmrgthe `configure' script does not know about. Run `./configure --help' 788f65982aSmrgfor details on some of the pertinent environment variables. 798f65982aSmrg 808f65982aSmrg You can give `configure' initial values for configuration parameters 818f65982aSmrgby setting variables in the command line or in the environment. Here 828f65982aSmrgis an example: 838f65982aSmrg 848f65982aSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 858f65982aSmrg 868f65982aSmrg *Note Defining Variables::, for more details. 878f65982aSmrg 888f65982aSmrgCompiling For Multiple Architectures 898f65982aSmrg==================================== 908f65982aSmrg 918f65982aSmrg You can compile the package for more than one kind of computer at the 928f65982aSmrgsame time, by placing the object files for each architecture in their 938f65982aSmrgown directory. To do this, you can use GNU `make'. `cd' to the 948f65982aSmrgdirectory where you want the object files and executables to go and run 958f65982aSmrgthe `configure' script. `configure' automatically checks for the 968f65982aSmrgsource code in the directory that `configure' is in and in `..'. 978f65982aSmrg 988f65982aSmrg With a non-GNU `make', it is safer to compile the package for one 998f65982aSmrgarchitecture at a time in the source code directory. After you have 1008f65982aSmrginstalled the package for one architecture, use `make distclean' before 1018f65982aSmrgreconfiguring for another architecture. 1028f65982aSmrg 1038f65982aSmrg On MacOS X 10.5 and later systems, you can create libraries and 1048f65982aSmrgexecutables that work on multiple system types--known as "fat" or 1058f65982aSmrg"universal" binaries--by specifying multiple `-arch' options to the 1068f65982aSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1078f65982aSmrgthis: 1088f65982aSmrg 1098f65982aSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1108f65982aSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1118f65982aSmrg CPP="gcc -E" CXXCPP="g++ -E" 1128f65982aSmrg 1138f65982aSmrg This is not guaranteed to produce working output in all cases, you 1148f65982aSmrgmay have to build one architecture at a time and combine the results 1158f65982aSmrgusing the `lipo' tool if you have problems. 1168f65982aSmrg 1178f65982aSmrgInstallation Names 1188f65982aSmrg================== 1198f65982aSmrg 1208f65982aSmrg By default, `make install' installs the package's commands under 1218f65982aSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1228f65982aSmrgcan specify an installation prefix other than `/usr/local' by giving 1238f65982aSmrg`configure' the option `--prefix=PREFIX'. 1248f65982aSmrg 1258f65982aSmrg You can specify separate installation prefixes for 1268f65982aSmrgarchitecture-specific files and architecture-independent files. If you 1278f65982aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1288f65982aSmrgPREFIX as the prefix for installing programs and libraries. 1298f65982aSmrgDocumentation and other data files still use the regular prefix. 1308f65982aSmrg 1318f65982aSmrg In addition, if you use an unusual directory layout you can give 1328f65982aSmrgoptions like `--bindir=DIR' to specify different values for particular 1338f65982aSmrgkinds of files. Run `configure --help' for a list of the directories 1348f65982aSmrgyou can set and what kinds of files go in them. 1358f65982aSmrg 1368f65982aSmrg If the package supports it, you can cause programs to be installed 1378f65982aSmrgwith an extra prefix or suffix on their names by giving `configure' the 1388f65982aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1398f65982aSmrg 1408f65982aSmrgOptional Features 1418f65982aSmrg================= 1428f65982aSmrg 1438f65982aSmrg Some packages pay attention to `--enable-FEATURE' options to 1448f65982aSmrg`configure', where FEATURE indicates an optional part of the package. 1458f65982aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1468f65982aSmrgis something like `gnu-as' or `x' (for the X Window System). The 1478f65982aSmrg`README' should mention any `--enable-' and `--with-' options that the 1488f65982aSmrgpackage recognizes. 1498f65982aSmrg 1508f65982aSmrg For packages that use the X Window System, `configure' can usually 1518f65982aSmrgfind the X include and library files automatically, but if it doesn't, 1528f65982aSmrgyou can use the `configure' options `--x-includes=DIR' and 1538f65982aSmrg`--x-libraries=DIR' to specify their locations. 1548f65982aSmrg 1558f65982aSmrgParticular systems 1568f65982aSmrg================== 1578f65982aSmrg 1588f65982aSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1598f65982aSmrgCC is not installed, it is recommended to use the following options in 1608f65982aSmrgorder to use an ANSI C compiler: 1618f65982aSmrg 1628f65982aSmrg ./configure CC="cc -Ae" 1638f65982aSmrg 1648f65982aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1658f65982aSmrg 1668f65982aSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1678f65982aSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1688f65982aSmrga workaround. If GNU CC is not installed, it is therefore recommended 1698f65982aSmrgto try 1708f65982aSmrg 1718f65982aSmrg ./configure CC="cc" 1728f65982aSmrg 1738f65982aSmrgand if that doesn't work, try 1748f65982aSmrg 1758f65982aSmrg ./configure CC="cc -nodtk" 1768f65982aSmrg 1778f65982aSmrgSpecifying the System Type 1788f65982aSmrg========================== 1798f65982aSmrg 1808f65982aSmrg There may be some features `configure' cannot figure out 1818f65982aSmrgautomatically, but needs to determine by the type of machine the package 1828f65982aSmrgwill run on. Usually, assuming the package is built to be run on the 1838f65982aSmrg_same_ architectures, `configure' can figure that out, but if it prints 1848f65982aSmrga message saying it cannot guess the machine type, give it the 1858f65982aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 1868f65982aSmrgtype, such as `sun4', or a canonical name which has the form: 1878f65982aSmrg 1888f65982aSmrg CPU-COMPANY-SYSTEM 1898f65982aSmrg 1908f65982aSmrgwhere SYSTEM can have one of these forms: 1918f65982aSmrg 1928f65982aSmrg OS KERNEL-OS 1938f65982aSmrg 1948f65982aSmrg See the file `config.sub' for the possible values of each field. If 1958f65982aSmrg`config.sub' isn't included in this package, then this package doesn't 1968f65982aSmrgneed to know the machine type. 1978f65982aSmrg 1988f65982aSmrg If you are _building_ compiler tools for cross-compiling, you should 1998f65982aSmrguse the option `--target=TYPE' to select the type of system they will 2008f65982aSmrgproduce code for. 2018f65982aSmrg 2028f65982aSmrg If you want to _use_ a cross compiler, that generates code for a 2038f65982aSmrgplatform different from the build platform, you should specify the 2048f65982aSmrg"host" platform (i.e., that on which the generated programs will 2058f65982aSmrgeventually be run) with `--host=TYPE'. 2068f65982aSmrg 2078f65982aSmrgSharing Defaults 2088f65982aSmrg================ 2098f65982aSmrg 2108f65982aSmrg If you want to set default values for `configure' scripts to share, 2118f65982aSmrgyou can create a site shell script called `config.site' that gives 2128f65982aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2138f65982aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2148f65982aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2158f65982aSmrg`CONFIG_SITE' environment variable to the location of the site script. 2168f65982aSmrgA warning: not all `configure' scripts look for a site script. 2178f65982aSmrg 2188f65982aSmrgDefining Variables 2198f65982aSmrg================== 2208f65982aSmrg 2218f65982aSmrg Variables not defined in a site shell script can be set in the 2228f65982aSmrgenvironment passed to `configure'. However, some packages may run 2238f65982aSmrgconfigure again during the build, and the customized values of these 2248f65982aSmrgvariables may be lost. In order to avoid this problem, you should set 2258f65982aSmrgthem in the `configure' command line, using `VAR=value'. For example: 2268f65982aSmrg 2278f65982aSmrg ./configure CC=/usr/local2/bin/gcc 2288f65982aSmrg 2298f65982aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 2308f65982aSmrgoverridden in the site shell script). 2318f65982aSmrg 2328f65982aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2338f65982aSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2348f65982aSmrg 2358f65982aSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2368f65982aSmrg 2378f65982aSmrg`configure' Invocation 2388f65982aSmrg====================== 2398f65982aSmrg 2408f65982aSmrg `configure' recognizes the following options to control how it 2418f65982aSmrgoperates. 2428f65982aSmrg 2438f65982aSmrg`--help' 2448f65982aSmrg`-h' 2458f65982aSmrg Print a summary of all of the options to `configure', and exit. 2468f65982aSmrg 2478f65982aSmrg`--help=short' 2488f65982aSmrg`--help=recursive' 2498f65982aSmrg Print a summary of the options unique to this package's 2508f65982aSmrg `configure', and exit. The `short' variant lists options used 2518f65982aSmrg only in the top level, while the `recursive' variant lists options 2528f65982aSmrg also present in any nested packages. 2538f65982aSmrg 2548f65982aSmrg`--version' 2558f65982aSmrg`-V' 2568f65982aSmrg Print the version of Autoconf used to generate the `configure' 2578f65982aSmrg script, and exit. 2588f65982aSmrg 2598f65982aSmrg`--cache-file=FILE' 2608f65982aSmrg Enable the cache: use and save the results of the tests in FILE, 2618f65982aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2628f65982aSmrg disable caching. 2638f65982aSmrg 2648f65982aSmrg`--config-cache' 2658f65982aSmrg`-C' 2668f65982aSmrg Alias for `--cache-file=config.cache'. 2678f65982aSmrg 2688f65982aSmrg`--quiet' 2698f65982aSmrg`--silent' 2708f65982aSmrg`-q' 2718f65982aSmrg Do not print messages saying which checks are being made. To 2728f65982aSmrg suppress all normal output, redirect it to `/dev/null' (any error 2738f65982aSmrg messages will still be shown). 2748f65982aSmrg 2758f65982aSmrg`--srcdir=DIR' 2768f65982aSmrg Look for the package's source code in directory DIR. Usually 2778f65982aSmrg `configure' can determine that directory automatically. 2788f65982aSmrg 2798f65982aSmrg`--prefix=DIR' 2808f65982aSmrg Use DIR as the installation prefix. *Note Installation Names:: 2818f65982aSmrg for more details, including other options available for fine-tuning 2828f65982aSmrg the installation locations. 2838f65982aSmrg 2848f65982aSmrg`--no-create' 2858f65982aSmrg`-n' 2868f65982aSmrg Run the configure checks, but stop before creating any output 2878f65982aSmrg files. 2888f65982aSmrg 2898f65982aSmrg`configure' also accepts some other, not widely useful, options. Run 2908f65982aSmrg`configure --help' for more details. 2918f65982aSmrg 292