INSTALL revision 48af84fa
148af84faSmrgInstallation Instructions 248af84faSmrg************************* 348af84faSmrg 448af84faSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 548af84faSmrg2006, 2007, 2008 Free Software Foundation, Inc. 648af84faSmrg 748af84faSmrg This file is free documentation; the Free Software Foundation gives 848af84faSmrgunlimited permission to copy, distribute and modify it. 948af84faSmrg 1048af84faSmrgBasic Installation 1148af84faSmrg================== 1248af84faSmrg 1348af84faSmrg Briefly, the shell commands `./configure; make; make install' should 1448af84faSmrgconfigure, build, and install this package. The following 1548af84faSmrgmore-detailed instructions are generic; see the `README' file for 1648af84faSmrginstructions specific to this package. 1748af84faSmrg 1848af84faSmrg The `configure' shell script attempts to guess correct values for 1948af84faSmrgvarious system-dependent variables used during compilation. It uses 2048af84faSmrgthose values to create a `Makefile' in each directory of the package. 2148af84faSmrgIt may also create one or more `.h' files containing system-dependent 2248af84faSmrgdefinitions. Finally, it creates a shell script `config.status' that 2348af84faSmrgyou can run in the future to recreate the current configuration, and a 2448af84faSmrgfile `config.log' containing compiler output (useful mainly for 2548af84faSmrgdebugging `configure'). 2648af84faSmrg 2748af84faSmrg It can also use an optional file (typically called `config.cache' 2848af84faSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2948af84faSmrgthe results of its tests to speed up reconfiguring. Caching is 3048af84faSmrgdisabled by default to prevent problems with accidental use of stale 3148af84faSmrgcache files. 3248af84faSmrg 3348af84faSmrg If you need to do unusual things to compile the package, please try 3448af84faSmrgto figure out how `configure' could check whether to do them, and mail 3548af84faSmrgdiffs or instructions to the address given in the `README' so they can 3648af84faSmrgbe considered for the next release. If you are using the cache, and at 3748af84faSmrgsome point `config.cache' contains results you don't want to keep, you 3848af84faSmrgmay remove or edit it. 3948af84faSmrg 4048af84faSmrg The file `configure.ac' (or `configure.in') is used to create 4148af84faSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 4248af84faSmrgyou want to change it or regenerate `configure' using a newer version 4348af84faSmrgof `autoconf'. 4448af84faSmrg 4548af84faSmrgThe simplest way to compile this package is: 4648af84faSmrg 4748af84faSmrg 1. `cd' to the directory containing the package's source code and type 4848af84faSmrg `./configure' to configure the package for your system. 4948af84faSmrg 5048af84faSmrg Running `configure' might take a while. While running, it prints 5148af84faSmrg some messages telling which features it is checking for. 5248af84faSmrg 5348af84faSmrg 2. Type `make' to compile the package. 5448af84faSmrg 5548af84faSmrg 3. Optionally, type `make check' to run any self-tests that come with 5648af84faSmrg the package. 5748af84faSmrg 5848af84faSmrg 4. Type `make install' to install the programs and any data files and 5948af84faSmrg documentation. 6048af84faSmrg 6148af84faSmrg 5. You can remove the program binaries and object files from the 6248af84faSmrg source code directory by typing `make clean'. To also remove the 6348af84faSmrg files that `configure' created (so you can compile the package for 6448af84faSmrg a different kind of computer), type `make distclean'. There is 6548af84faSmrg also a `make maintainer-clean' target, but that is intended mainly 6648af84faSmrg for the package's developers. If you use it, you may have to get 6748af84faSmrg all sorts of other programs in order to regenerate files that came 6848af84faSmrg with the distribution. 6948af84faSmrg 7048af84faSmrg 6. Often, you can also type `make uninstall' to remove the installed 7148af84faSmrg files again. 7248af84faSmrg 7348af84faSmrgCompilers and Options 7448af84faSmrg===================== 7548af84faSmrg 7648af84faSmrg Some systems require unusual options for compilation or linking that 7748af84faSmrgthe `configure' script does not know about. Run `./configure --help' 7848af84faSmrgfor details on some of the pertinent environment variables. 7948af84faSmrg 8048af84faSmrg You can give `configure' initial values for configuration parameters 8148af84faSmrgby setting variables in the command line or in the environment. Here 8248af84faSmrgis an example: 8348af84faSmrg 8448af84faSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8548af84faSmrg 8648af84faSmrg *Note Defining Variables::, for more details. 8748af84faSmrg 8848af84faSmrgCompiling For Multiple Architectures 8948af84faSmrg==================================== 9048af84faSmrg 9148af84faSmrg You can compile the package for more than one kind of computer at the 9248af84faSmrgsame time, by placing the object files for each architecture in their 9348af84faSmrgown directory. To do this, you can use GNU `make'. `cd' to the 9448af84faSmrgdirectory where you want the object files and executables to go and run 9548af84faSmrgthe `configure' script. `configure' automatically checks for the 9648af84faSmrgsource code in the directory that `configure' is in and in `..'. 9748af84faSmrg 9848af84faSmrg With a non-GNU `make', it is safer to compile the package for one 9948af84faSmrgarchitecture at a time in the source code directory. After you have 10048af84faSmrginstalled the package for one architecture, use `make distclean' before 10148af84faSmrgreconfiguring for another architecture. 10248af84faSmrg 10348af84faSmrg On MacOS X 10.5 and later systems, you can create libraries and 10448af84faSmrgexecutables that work on multiple system types--known as "fat" or 10548af84faSmrg"universal" binaries--by specifying multiple `-arch' options to the 10648af84faSmrgcompiler but only a single `-arch' option to the preprocessor. Like 10748af84faSmrgthis: 10848af84faSmrg 10948af84faSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11048af84faSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11148af84faSmrg CPP="gcc -E" CXXCPP="g++ -E" 11248af84faSmrg 11348af84faSmrg This is not guaranteed to produce working output in all cases, you 11448af84faSmrgmay have to build one architecture at a time and combine the results 11548af84faSmrgusing the `lipo' tool if you have problems. 11648af84faSmrg 11748af84faSmrgInstallation Names 11848af84faSmrg================== 11948af84faSmrg 12048af84faSmrg By default, `make install' installs the package's commands under 12148af84faSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12248af84faSmrgcan specify an installation prefix other than `/usr/local' by giving 12348af84faSmrg`configure' the option `--prefix=PREFIX'. 12448af84faSmrg 12548af84faSmrg You can specify separate installation prefixes for 12648af84faSmrgarchitecture-specific files and architecture-independent files. If you 12748af84faSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12848af84faSmrgPREFIX as the prefix for installing programs and libraries. 12948af84faSmrgDocumentation and other data files still use the regular prefix. 13048af84faSmrg 13148af84faSmrg In addition, if you use an unusual directory layout you can give 13248af84faSmrgoptions like `--bindir=DIR' to specify different values for particular 13348af84faSmrgkinds of files. Run `configure --help' for a list of the directories 13448af84faSmrgyou can set and what kinds of files go in them. 13548af84faSmrg 13648af84faSmrg If the package supports it, you can cause programs to be installed 13748af84faSmrgwith an extra prefix or suffix on their names by giving `configure' the 13848af84faSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13948af84faSmrg 14048af84faSmrgOptional Features 14148af84faSmrg================= 14248af84faSmrg 14348af84faSmrg Some packages pay attention to `--enable-FEATURE' options to 14448af84faSmrg`configure', where FEATURE indicates an optional part of the package. 14548af84faSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14648af84faSmrgis something like `gnu-as' or `x' (for the X Window System). The 14748af84faSmrg`README' should mention any `--enable-' and `--with-' options that the 14848af84faSmrgpackage recognizes. 14948af84faSmrg 15048af84faSmrg For packages that use the X Window System, `configure' can usually 15148af84faSmrgfind the X include and library files automatically, but if it doesn't, 15248af84faSmrgyou can use the `configure' options `--x-includes=DIR' and 15348af84faSmrg`--x-libraries=DIR' to specify their locations. 15448af84faSmrg 15548af84faSmrgParticular systems 15648af84faSmrg================== 15748af84faSmrg 15848af84faSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15948af84faSmrgCC is not installed, it is recommended to use the following options in 16048af84faSmrgorder to use an ANSI C compiler: 16148af84faSmrg 16248af84faSmrg ./configure CC="cc -Ae" 16348af84faSmrg 16448af84faSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16548af84faSmrg 16648af84faSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16748af84faSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16848af84faSmrga workaround. If GNU CC is not installed, it is therefore recommended 16948af84faSmrgto try 17048af84faSmrg 17148af84faSmrg ./configure CC="cc" 17248af84faSmrg 17348af84faSmrgand if that doesn't work, try 17448af84faSmrg 17548af84faSmrg ./configure CC="cc -nodtk" 17648af84faSmrg 17748af84faSmrgSpecifying the System Type 17848af84faSmrg========================== 17948af84faSmrg 18048af84faSmrg There may be some features `configure' cannot figure out 18148af84faSmrgautomatically, but needs to determine by the type of machine the package 18248af84faSmrgwill run on. Usually, assuming the package is built to be run on the 18348af84faSmrg_same_ architectures, `configure' can figure that out, but if it prints 18448af84faSmrga message saying it cannot guess the machine type, give it the 18548af84faSmrg`--build=TYPE' option. TYPE can either be a short name for the system 18648af84faSmrgtype, such as `sun4', or a canonical name which has the form: 18748af84faSmrg 18848af84faSmrg CPU-COMPANY-SYSTEM 18948af84faSmrg 19048af84faSmrgwhere SYSTEM can have one of these forms: 19148af84faSmrg 19248af84faSmrg OS KERNEL-OS 19348af84faSmrg 19448af84faSmrg See the file `config.sub' for the possible values of each field. If 19548af84faSmrg`config.sub' isn't included in this package, then this package doesn't 19648af84faSmrgneed to know the machine type. 19748af84faSmrg 19848af84faSmrg If you are _building_ compiler tools for cross-compiling, you should 19948af84faSmrguse the option `--target=TYPE' to select the type of system they will 20048af84faSmrgproduce code for. 20148af84faSmrg 20248af84faSmrg If you want to _use_ a cross compiler, that generates code for a 20348af84faSmrgplatform different from the build platform, you should specify the 20448af84faSmrg"host" platform (i.e., that on which the generated programs will 20548af84faSmrgeventually be run) with `--host=TYPE'. 20648af84faSmrg 20748af84faSmrgSharing Defaults 20848af84faSmrg================ 20948af84faSmrg 21048af84faSmrg If you want to set default values for `configure' scripts to share, 21148af84faSmrgyou can create a site shell script called `config.site' that gives 21248af84faSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 21348af84faSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21448af84faSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21548af84faSmrg`CONFIG_SITE' environment variable to the location of the site script. 21648af84faSmrgA warning: not all `configure' scripts look for a site script. 21748af84faSmrg 21848af84faSmrgDefining Variables 21948af84faSmrg================== 22048af84faSmrg 22148af84faSmrg Variables not defined in a site shell script can be set in the 22248af84faSmrgenvironment passed to `configure'. However, some packages may run 22348af84faSmrgconfigure again during the build, and the customized values of these 22448af84faSmrgvariables may be lost. In order to avoid this problem, you should set 22548af84faSmrgthem in the `configure' command line, using `VAR=value'. For example: 22648af84faSmrg 22748af84faSmrg ./configure CC=/usr/local2/bin/gcc 22848af84faSmrg 22948af84faSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 23048af84faSmrgoverridden in the site shell script). 23148af84faSmrg 23248af84faSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23348af84faSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23448af84faSmrg 23548af84faSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23648af84faSmrg 23748af84faSmrg`configure' Invocation 23848af84faSmrg====================== 23948af84faSmrg 24048af84faSmrg `configure' recognizes the following options to control how it 24148af84faSmrgoperates. 24248af84faSmrg 24348af84faSmrg`--help' 24448af84faSmrg`-h' 24548af84faSmrg Print a summary of all of the options to `configure', and exit. 24648af84faSmrg 24748af84faSmrg`--help=short' 24848af84faSmrg`--help=recursive' 24948af84faSmrg Print a summary of the options unique to this package's 25048af84faSmrg `configure', and exit. The `short' variant lists options used 25148af84faSmrg only in the top level, while the `recursive' variant lists options 25248af84faSmrg also present in any nested packages. 25348af84faSmrg 25448af84faSmrg`--version' 25548af84faSmrg`-V' 25648af84faSmrg Print the version of Autoconf used to generate the `configure' 25748af84faSmrg script, and exit. 25848af84faSmrg 25948af84faSmrg`--cache-file=FILE' 26048af84faSmrg Enable the cache: use and save the results of the tests in FILE, 26148af84faSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26248af84faSmrg disable caching. 26348af84faSmrg 26448af84faSmrg`--config-cache' 26548af84faSmrg`-C' 26648af84faSmrg Alias for `--cache-file=config.cache'. 26748af84faSmrg 26848af84faSmrg`--quiet' 26948af84faSmrg`--silent' 27048af84faSmrg`-q' 27148af84faSmrg Do not print messages saying which checks are being made. To 27248af84faSmrg suppress all normal output, redirect it to `/dev/null' (any error 27348af84faSmrg messages will still be shown). 27448af84faSmrg 27548af84faSmrg`--srcdir=DIR' 27648af84faSmrg Look for the package's source code in directory DIR. Usually 27748af84faSmrg `configure' can determine that directory automatically. 27848af84faSmrg 27948af84faSmrg`--prefix=DIR' 28048af84faSmrg Use DIR as the installation prefix. *Note Installation Names:: 28148af84faSmrg for more details, including other options available for fine-tuning 28248af84faSmrg the installation locations. 28348af84faSmrg 28448af84faSmrg`--no-create' 28548af84faSmrg`-n' 28648af84faSmrg Run the configure checks, but stop before creating any output 28748af84faSmrg files. 28848af84faSmrg 28948af84faSmrg`configure' also accepts some other, not widely useful, options. Run 29048af84faSmrg`configure --help' for more details. 29148af84faSmrg 292