INSTALL revision 4b9470b1
14b9470b1SmrgInstallation Instructions 24b9470b1Smrg************************* 34b9470b1Smrg 44b9470b1SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 54b9470b1Smrg2006, 2007, 2008 Free Software Foundation, Inc. 64b9470b1Smrg 74b9470b1Smrg This file is free documentation; the Free Software Foundation gives 84b9470b1Smrgunlimited permission to copy, distribute and modify it. 94b9470b1Smrg 104b9470b1SmrgBasic Installation 114b9470b1Smrg================== 124b9470b1Smrg 134b9470b1Smrg Briefly, the shell commands `./configure; make; make install' should 144b9470b1Smrgconfigure, build, and install this package. The following 154b9470b1Smrgmore-detailed instructions are generic; see the `README' file for 164b9470b1Smrginstructions specific to this package. 174b9470b1Smrg 184b9470b1Smrg The `configure' shell script attempts to guess correct values for 194b9470b1Smrgvarious system-dependent variables used during compilation. It uses 204b9470b1Smrgthose values to create a `Makefile' in each directory of the package. 214b9470b1SmrgIt may also create one or more `.h' files containing system-dependent 224b9470b1Smrgdefinitions. Finally, it creates a shell script `config.status' that 234b9470b1Smrgyou can run in the future to recreate the current configuration, and a 244b9470b1Smrgfile `config.log' containing compiler output (useful mainly for 254b9470b1Smrgdebugging `configure'). 264b9470b1Smrg 274b9470b1Smrg It can also use an optional file (typically called `config.cache' 284b9470b1Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 294b9470b1Smrgthe results of its tests to speed up reconfiguring. Caching is 304b9470b1Smrgdisabled by default to prevent problems with accidental use of stale 314b9470b1Smrgcache files. 324b9470b1Smrg 334b9470b1Smrg If you need to do unusual things to compile the package, please try 344b9470b1Smrgto figure out how `configure' could check whether to do them, and mail 354b9470b1Smrgdiffs or instructions to the address given in the `README' so they can 364b9470b1Smrgbe considered for the next release. If you are using the cache, and at 374b9470b1Smrgsome point `config.cache' contains results you don't want to keep, you 384b9470b1Smrgmay remove or edit it. 394b9470b1Smrg 404b9470b1Smrg The file `configure.ac' (or `configure.in') is used to create 414b9470b1Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 424b9470b1Smrgyou want to change it or regenerate `configure' using a newer version 434b9470b1Smrgof `autoconf'. 444b9470b1Smrg 454b9470b1SmrgThe simplest way to compile this package is: 464b9470b1Smrg 474b9470b1Smrg 1. `cd' to the directory containing the package's source code and type 484b9470b1Smrg `./configure' to configure the package for your system. 494b9470b1Smrg 504b9470b1Smrg Running `configure' might take a while. While running, it prints 514b9470b1Smrg some messages telling which features it is checking for. 524b9470b1Smrg 534b9470b1Smrg 2. Type `make' to compile the package. 544b9470b1Smrg 554b9470b1Smrg 3. Optionally, type `make check' to run any self-tests that come with 564b9470b1Smrg the package. 574b9470b1Smrg 584b9470b1Smrg 4. Type `make install' to install the programs and any data files and 594b9470b1Smrg documentation. 604b9470b1Smrg 614b9470b1Smrg 5. You can remove the program binaries and object files from the 624b9470b1Smrg source code directory by typing `make clean'. To also remove the 634b9470b1Smrg files that `configure' created (so you can compile the package for 644b9470b1Smrg a different kind of computer), type `make distclean'. There is 654b9470b1Smrg also a `make maintainer-clean' target, but that is intended mainly 664b9470b1Smrg for the package's developers. If you use it, you may have to get 674b9470b1Smrg all sorts of other programs in order to regenerate files that came 684b9470b1Smrg with the distribution. 694b9470b1Smrg 704b9470b1Smrg 6. Often, you can also type `make uninstall' to remove the installed 714b9470b1Smrg files again. 724b9470b1Smrg 734b9470b1SmrgCompilers and Options 744b9470b1Smrg===================== 754b9470b1Smrg 764b9470b1Smrg Some systems require unusual options for compilation or linking that 774b9470b1Smrgthe `configure' script does not know about. Run `./configure --help' 784b9470b1Smrgfor details on some of the pertinent environment variables. 794b9470b1Smrg 804b9470b1Smrg You can give `configure' initial values for configuration parameters 814b9470b1Smrgby setting variables in the command line or in the environment. Here 824b9470b1Smrgis an example: 834b9470b1Smrg 844b9470b1Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 854b9470b1Smrg 864b9470b1Smrg *Note Defining Variables::, for more details. 874b9470b1Smrg 884b9470b1SmrgCompiling For Multiple Architectures 894b9470b1Smrg==================================== 904b9470b1Smrg 914b9470b1Smrg You can compile the package for more than one kind of computer at the 924b9470b1Smrgsame time, by placing the object files for each architecture in their 934b9470b1Smrgown directory. To do this, you can use GNU `make'. `cd' to the 944b9470b1Smrgdirectory where you want the object files and executables to go and run 954b9470b1Smrgthe `configure' script. `configure' automatically checks for the 964b9470b1Smrgsource code in the directory that `configure' is in and in `..'. 974b9470b1Smrg 984b9470b1Smrg With a non-GNU `make', it is safer to compile the package for one 994b9470b1Smrgarchitecture at a time in the source code directory. After you have 1004b9470b1Smrginstalled the package for one architecture, use `make distclean' before 1014b9470b1Smrgreconfiguring for another architecture. 1024b9470b1Smrg 1034b9470b1Smrg On MacOS X 10.5 and later systems, you can create libraries and 1044b9470b1Smrgexecutables that work on multiple system types--known as "fat" or 1054b9470b1Smrg"universal" binaries--by specifying multiple `-arch' options to the 1064b9470b1Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1074b9470b1Smrgthis: 1084b9470b1Smrg 1094b9470b1Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1104b9470b1Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1114b9470b1Smrg CPP="gcc -E" CXXCPP="g++ -E" 1124b9470b1Smrg 1134b9470b1Smrg This is not guaranteed to produce working output in all cases, you 1144b9470b1Smrgmay have to build one architecture at a time and combine the results 1154b9470b1Smrgusing the `lipo' tool if you have problems. 1164b9470b1Smrg 1174b9470b1SmrgInstallation Names 1184b9470b1Smrg================== 1194b9470b1Smrg 1204b9470b1Smrg By default, `make install' installs the package's commands under 1214b9470b1Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1224b9470b1Smrgcan specify an installation prefix other than `/usr/local' by giving 1234b9470b1Smrg`configure' the option `--prefix=PREFIX'. 1244b9470b1Smrg 1254b9470b1Smrg You can specify separate installation prefixes for 1264b9470b1Smrgarchitecture-specific files and architecture-independent files. If you 1274b9470b1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1284b9470b1SmrgPREFIX as the prefix for installing programs and libraries. 1294b9470b1SmrgDocumentation and other data files still use the regular prefix. 1304b9470b1Smrg 1314b9470b1Smrg In addition, if you use an unusual directory layout you can give 1324b9470b1Smrgoptions like `--bindir=DIR' to specify different values for particular 1334b9470b1Smrgkinds of files. Run `configure --help' for a list of the directories 1344b9470b1Smrgyou can set and what kinds of files go in them. 1354b9470b1Smrg 1364b9470b1Smrg If the package supports it, you can cause programs to be installed 1374b9470b1Smrgwith an extra prefix or suffix on their names by giving `configure' the 1384b9470b1Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1394b9470b1Smrg 1404b9470b1SmrgOptional Features 1414b9470b1Smrg================= 1424b9470b1Smrg 1434b9470b1Smrg Some packages pay attention to `--enable-FEATURE' options to 1444b9470b1Smrg`configure', where FEATURE indicates an optional part of the package. 1454b9470b1SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1464b9470b1Smrgis something like `gnu-as' or `x' (for the X Window System). The 1474b9470b1Smrg`README' should mention any `--enable-' and `--with-' options that the 1484b9470b1Smrgpackage recognizes. 1494b9470b1Smrg 1504b9470b1Smrg For packages that use the X Window System, `configure' can usually 1514b9470b1Smrgfind the X include and library files automatically, but if it doesn't, 1524b9470b1Smrgyou can use the `configure' options `--x-includes=DIR' and 1534b9470b1Smrg`--x-libraries=DIR' to specify their locations. 1544b9470b1Smrg 1554b9470b1SmrgParticular systems 1564b9470b1Smrg================== 1574b9470b1Smrg 1584b9470b1Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1594b9470b1SmrgCC is not installed, it is recommended to use the following options in 1604b9470b1Smrgorder to use an ANSI C compiler: 1614b9470b1Smrg 1624b9470b1Smrg ./configure CC="cc -Ae" 1634b9470b1Smrg 1644b9470b1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1654b9470b1Smrg 1664b9470b1Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1674b9470b1Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1684b9470b1Smrga workaround. If GNU CC is not installed, it is therefore recommended 1694b9470b1Smrgto try 1704b9470b1Smrg 1714b9470b1Smrg ./configure CC="cc" 1724b9470b1Smrg 1734b9470b1Smrgand if that doesn't work, try 1744b9470b1Smrg 1754b9470b1Smrg ./configure CC="cc -nodtk" 1764b9470b1Smrg 1774b9470b1SmrgSpecifying the System Type 1784b9470b1Smrg========================== 1794b9470b1Smrg 1804b9470b1Smrg There may be some features `configure' cannot figure out 1814b9470b1Smrgautomatically, but needs to determine by the type of machine the package 1824b9470b1Smrgwill run on. Usually, assuming the package is built to be run on the 1834b9470b1Smrg_same_ architectures, `configure' can figure that out, but if it prints 1844b9470b1Smrga message saying it cannot guess the machine type, give it the 1854b9470b1Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1864b9470b1Smrgtype, such as `sun4', or a canonical name which has the form: 1874b9470b1Smrg 1884b9470b1Smrg CPU-COMPANY-SYSTEM 1894b9470b1Smrg 1904b9470b1Smrgwhere SYSTEM can have one of these forms: 1914b9470b1Smrg 1924b9470b1Smrg OS KERNEL-OS 1934b9470b1Smrg 1944b9470b1Smrg See the file `config.sub' for the possible values of each field. If 1954b9470b1Smrg`config.sub' isn't included in this package, then this package doesn't 1964b9470b1Smrgneed to know the machine type. 1974b9470b1Smrg 1984b9470b1Smrg If you are _building_ compiler tools for cross-compiling, you should 1994b9470b1Smrguse the option `--target=TYPE' to select the type of system they will 2004b9470b1Smrgproduce code for. 2014b9470b1Smrg 2024b9470b1Smrg If you want to _use_ a cross compiler, that generates code for a 2034b9470b1Smrgplatform different from the build platform, you should specify the 2044b9470b1Smrg"host" platform (i.e., that on which the generated programs will 2054b9470b1Smrgeventually be run) with `--host=TYPE'. 2064b9470b1Smrg 2074b9470b1SmrgSharing Defaults 2084b9470b1Smrg================ 2094b9470b1Smrg 2104b9470b1Smrg If you want to set default values for `configure' scripts to share, 2114b9470b1Smrgyou can create a site shell script called `config.site' that gives 2124b9470b1Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2134b9470b1Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2144b9470b1Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2154b9470b1Smrg`CONFIG_SITE' environment variable to the location of the site script. 2164b9470b1SmrgA warning: not all `configure' scripts look for a site script. 2174b9470b1Smrg 2184b9470b1SmrgDefining Variables 2194b9470b1Smrg================== 2204b9470b1Smrg 2214b9470b1Smrg Variables not defined in a site shell script can be set in the 2224b9470b1Smrgenvironment passed to `configure'. However, some packages may run 2234b9470b1Smrgconfigure again during the build, and the customized values of these 2244b9470b1Smrgvariables may be lost. In order to avoid this problem, you should set 2254b9470b1Smrgthem in the `configure' command line, using `VAR=value'. For example: 2264b9470b1Smrg 2274b9470b1Smrg ./configure CC=/usr/local2/bin/gcc 2284b9470b1Smrg 2294b9470b1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2304b9470b1Smrgoverridden in the site shell script). 2314b9470b1Smrg 2324b9470b1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2334b9470b1Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2344b9470b1Smrg 2354b9470b1Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2364b9470b1Smrg 2374b9470b1Smrg`configure' Invocation 2384b9470b1Smrg====================== 2394b9470b1Smrg 2404b9470b1Smrg `configure' recognizes the following options to control how it 2414b9470b1Smrgoperates. 2424b9470b1Smrg 2434b9470b1Smrg`--help' 2444b9470b1Smrg`-h' 2454b9470b1Smrg Print a summary of all of the options to `configure', and exit. 2464b9470b1Smrg 2474b9470b1Smrg`--help=short' 2484b9470b1Smrg`--help=recursive' 2494b9470b1Smrg Print a summary of the options unique to this package's 2504b9470b1Smrg `configure', and exit. The `short' variant lists options used 2514b9470b1Smrg only in the top level, while the `recursive' variant lists options 2524b9470b1Smrg also present in any nested packages. 2534b9470b1Smrg 2544b9470b1Smrg`--version' 2554b9470b1Smrg`-V' 2564b9470b1Smrg Print the version of Autoconf used to generate the `configure' 2574b9470b1Smrg script, and exit. 2584b9470b1Smrg 2594b9470b1Smrg`--cache-file=FILE' 2604b9470b1Smrg Enable the cache: use and save the results of the tests in FILE, 2614b9470b1Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2624b9470b1Smrg disable caching. 2634b9470b1Smrg 2644b9470b1Smrg`--config-cache' 2654b9470b1Smrg`-C' 2664b9470b1Smrg Alias for `--cache-file=config.cache'. 2674b9470b1Smrg 2684b9470b1Smrg`--quiet' 2694b9470b1Smrg`--silent' 2704b9470b1Smrg`-q' 2714b9470b1Smrg Do not print messages saying which checks are being made. To 2724b9470b1Smrg suppress all normal output, redirect it to `/dev/null' (any error 2734b9470b1Smrg messages will still be shown). 2744b9470b1Smrg 2754b9470b1Smrg`--srcdir=DIR' 2764b9470b1Smrg Look for the package's source code in directory DIR. Usually 2774b9470b1Smrg `configure' can determine that directory automatically. 2784b9470b1Smrg 2794b9470b1Smrg`--prefix=DIR' 2804b9470b1Smrg Use DIR as the installation prefix. *Note Installation Names:: 2814b9470b1Smrg for more details, including other options available for fine-tuning 2824b9470b1Smrg the installation locations. 2834b9470b1Smrg 2844b9470b1Smrg`--no-create' 2854b9470b1Smrg`-n' 2864b9470b1Smrg Run the configure checks, but stop before creating any output 2874b9470b1Smrg files. 2884b9470b1Smrg 2894b9470b1Smrg`configure' also accepts some other, not widely useful, options. Run 2904b9470b1Smrg`configure --help' for more details. 2914b9470b1Smrg 292