INSTALL revision 55074dd0
155074dd0SmrgInstallation Instructions 255074dd0Smrg************************* 355074dd0Smrg 455074dd0SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 555074dd0Smrg2006, 2007, 2008 Free Software Foundation, Inc. 655074dd0Smrg 755074dd0Smrg This file is free documentation; the Free Software Foundation gives 855074dd0Smrgunlimited permission to copy, distribute and modify it. 955074dd0Smrg 1055074dd0SmrgBasic Installation 1155074dd0Smrg================== 1255074dd0Smrg 1355074dd0Smrg Briefly, the shell commands `./configure; make; make install' should 1455074dd0Smrgconfigure, build, and install this package. The following 1555074dd0Smrgmore-detailed instructions are generic; see the `README' file for 1655074dd0Smrginstructions specific to this package. 1755074dd0Smrg 1855074dd0Smrg The `configure' shell script attempts to guess correct values for 1955074dd0Smrgvarious system-dependent variables used during compilation. It uses 2055074dd0Smrgthose values to create a `Makefile' in each directory of the package. 2155074dd0SmrgIt may also create one or more `.h' files containing system-dependent 2255074dd0Smrgdefinitions. Finally, it creates a shell script `config.status' that 2355074dd0Smrgyou can run in the future to recreate the current configuration, and a 2455074dd0Smrgfile `config.log' containing compiler output (useful mainly for 2555074dd0Smrgdebugging `configure'). 2655074dd0Smrg 2755074dd0Smrg It can also use an optional file (typically called `config.cache' 2855074dd0Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2955074dd0Smrgthe results of its tests to speed up reconfiguring. Caching is 3055074dd0Smrgdisabled by default to prevent problems with accidental use of stale 3155074dd0Smrgcache files. 3255074dd0Smrg 3355074dd0Smrg If you need to do unusual things to compile the package, please try 3455074dd0Smrgto figure out how `configure' could check whether to do them, and mail 3555074dd0Smrgdiffs or instructions to the address given in the `README' so they can 3655074dd0Smrgbe considered for the next release. If you are using the cache, and at 3755074dd0Smrgsome point `config.cache' contains results you don't want to keep, you 3855074dd0Smrgmay remove or edit it. 3955074dd0Smrg 4055074dd0Smrg The file `configure.ac' (or `configure.in') is used to create 4155074dd0Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4255074dd0Smrgyou want to change it or regenerate `configure' using a newer version 4355074dd0Smrgof `autoconf'. 4455074dd0Smrg 4555074dd0SmrgThe simplest way to compile this package is: 4655074dd0Smrg 4755074dd0Smrg 1. `cd' to the directory containing the package's source code and type 4855074dd0Smrg `./configure' to configure the package for your system. 4955074dd0Smrg 5055074dd0Smrg Running `configure' might take a while. While running, it prints 5155074dd0Smrg some messages telling which features it is checking for. 5255074dd0Smrg 5355074dd0Smrg 2. Type `make' to compile the package. 5455074dd0Smrg 5555074dd0Smrg 3. Optionally, type `make check' to run any self-tests that come with 5655074dd0Smrg the package. 5755074dd0Smrg 5855074dd0Smrg 4. Type `make install' to install the programs and any data files and 5955074dd0Smrg documentation. 6055074dd0Smrg 6155074dd0Smrg 5. You can remove the program binaries and object files from the 6255074dd0Smrg source code directory by typing `make clean'. To also remove the 6355074dd0Smrg files that `configure' created (so you can compile the package for 6455074dd0Smrg a different kind of computer), type `make distclean'. There is 6555074dd0Smrg also a `make maintainer-clean' target, but that is intended mainly 6655074dd0Smrg for the package's developers. If you use it, you may have to get 6755074dd0Smrg all sorts of other programs in order to regenerate files that came 6855074dd0Smrg with the distribution. 6955074dd0Smrg 7055074dd0Smrg 6. Often, you can also type `make uninstall' to remove the installed 7155074dd0Smrg files again. 7255074dd0Smrg 7355074dd0SmrgCompilers and Options 7455074dd0Smrg===================== 7555074dd0Smrg 7655074dd0Smrg Some systems require unusual options for compilation or linking that 7755074dd0Smrgthe `configure' script does not know about. Run `./configure --help' 7855074dd0Smrgfor details on some of the pertinent environment variables. 7955074dd0Smrg 8055074dd0Smrg You can give `configure' initial values for configuration parameters 8155074dd0Smrgby setting variables in the command line or in the environment. Here 8255074dd0Smrgis an example: 8355074dd0Smrg 8455074dd0Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8555074dd0Smrg 8655074dd0Smrg *Note Defining Variables::, for more details. 8755074dd0Smrg 8855074dd0SmrgCompiling For Multiple Architectures 8955074dd0Smrg==================================== 9055074dd0Smrg 9155074dd0Smrg You can compile the package for more than one kind of computer at the 9255074dd0Smrgsame time, by placing the object files for each architecture in their 9355074dd0Smrgown directory. To do this, you can use GNU `make'. `cd' to the 9455074dd0Smrgdirectory where you want the object files and executables to go and run 9555074dd0Smrgthe `configure' script. `configure' automatically checks for the 9655074dd0Smrgsource code in the directory that `configure' is in and in `..'. 9755074dd0Smrg 9855074dd0Smrg With a non-GNU `make', it is safer to compile the package for one 9955074dd0Smrgarchitecture at a time in the source code directory. After you have 10055074dd0Smrginstalled the package for one architecture, use `make distclean' before 10155074dd0Smrgreconfiguring for another architecture. 10255074dd0Smrg 10355074dd0Smrg On MacOS X 10.5 and later systems, you can create libraries and 10455074dd0Smrgexecutables that work on multiple system types--known as "fat" or 10555074dd0Smrg"universal" binaries--by specifying multiple `-arch' options to the 10655074dd0Smrgcompiler but only a single `-arch' option to the preprocessor. Like 10755074dd0Smrgthis: 10855074dd0Smrg 10955074dd0Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11055074dd0Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11155074dd0Smrg CPP="gcc -E" CXXCPP="g++ -E" 11255074dd0Smrg 11355074dd0Smrg This is not guaranteed to produce working output in all cases, you 11455074dd0Smrgmay have to build one architecture at a time and combine the results 11555074dd0Smrgusing the `lipo' tool if you have problems. 11655074dd0Smrg 11755074dd0SmrgInstallation Names 11855074dd0Smrg================== 11955074dd0Smrg 12055074dd0Smrg By default, `make install' installs the package's commands under 12155074dd0Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12255074dd0Smrgcan specify an installation prefix other than `/usr/local' by giving 12355074dd0Smrg`configure' the option `--prefix=PREFIX'. 12455074dd0Smrg 12555074dd0Smrg You can specify separate installation prefixes for 12655074dd0Smrgarchitecture-specific files and architecture-independent files. If you 12755074dd0Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12855074dd0SmrgPREFIX as the prefix for installing programs and libraries. 12955074dd0SmrgDocumentation and other data files still use the regular prefix. 13055074dd0Smrg 13155074dd0Smrg In addition, if you use an unusual directory layout you can give 13255074dd0Smrgoptions like `--bindir=DIR' to specify different values for particular 13355074dd0Smrgkinds of files. Run `configure --help' for a list of the directories 13455074dd0Smrgyou can set and what kinds of files go in them. 13555074dd0Smrg 13655074dd0Smrg If the package supports it, you can cause programs to be installed 13755074dd0Smrgwith an extra prefix or suffix on their names by giving `configure' the 13855074dd0Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13955074dd0Smrg 14055074dd0SmrgOptional Features 14155074dd0Smrg================= 14255074dd0Smrg 14355074dd0Smrg Some packages pay attention to `--enable-FEATURE' options to 14455074dd0Smrg`configure', where FEATURE indicates an optional part of the package. 14555074dd0SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14655074dd0Smrgis something like `gnu-as' or `x' (for the X Window System). The 14755074dd0Smrg`README' should mention any `--enable-' and `--with-' options that the 14855074dd0Smrgpackage recognizes. 14955074dd0Smrg 15055074dd0Smrg For packages that use the X Window System, `configure' can usually 15155074dd0Smrgfind the X include and library files automatically, but if it doesn't, 15255074dd0Smrgyou can use the `configure' options `--x-includes=DIR' and 15355074dd0Smrg`--x-libraries=DIR' to specify their locations. 15455074dd0Smrg 15555074dd0SmrgParticular systems 15655074dd0Smrg================== 15755074dd0Smrg 15855074dd0Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15955074dd0SmrgCC is not installed, it is recommended to use the following options in 16055074dd0Smrgorder to use an ANSI C compiler: 16155074dd0Smrg 16255074dd0Smrg ./configure CC="cc -Ae" 16355074dd0Smrg 16455074dd0Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16555074dd0Smrg 16655074dd0Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16755074dd0Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16855074dd0Smrga workaround. If GNU CC is not installed, it is therefore recommended 16955074dd0Smrgto try 17055074dd0Smrg 17155074dd0Smrg ./configure CC="cc" 17255074dd0Smrg 17355074dd0Smrgand if that doesn't work, try 17455074dd0Smrg 17555074dd0Smrg ./configure CC="cc -nodtk" 17655074dd0Smrg 17755074dd0SmrgSpecifying the System Type 17855074dd0Smrg========================== 17955074dd0Smrg 18055074dd0Smrg There may be some features `configure' cannot figure out 18155074dd0Smrgautomatically, but needs to determine by the type of machine the package 18255074dd0Smrgwill run on. Usually, assuming the package is built to be run on the 18355074dd0Smrg_same_ architectures, `configure' can figure that out, but if it prints 18455074dd0Smrga message saying it cannot guess the machine type, give it the 18555074dd0Smrg`--build=TYPE' option. TYPE can either be a short name for the system 18655074dd0Smrgtype, such as `sun4', or a canonical name which has the form: 18755074dd0Smrg 18855074dd0Smrg CPU-COMPANY-SYSTEM 18955074dd0Smrg 19055074dd0Smrgwhere SYSTEM can have one of these forms: 19155074dd0Smrg 19255074dd0Smrg OS KERNEL-OS 19355074dd0Smrg 19455074dd0Smrg See the file `config.sub' for the possible values of each field. If 19555074dd0Smrg`config.sub' isn't included in this package, then this package doesn't 19655074dd0Smrgneed to know the machine type. 19755074dd0Smrg 19855074dd0Smrg If you are _building_ compiler tools for cross-compiling, you should 19955074dd0Smrguse the option `--target=TYPE' to select the type of system they will 20055074dd0Smrgproduce code for. 20155074dd0Smrg 20255074dd0Smrg If you want to _use_ a cross compiler, that generates code for a 20355074dd0Smrgplatform different from the build platform, you should specify the 20455074dd0Smrg"host" platform (i.e., that on which the generated programs will 20555074dd0Smrgeventually be run) with `--host=TYPE'. 20655074dd0Smrg 20755074dd0SmrgSharing Defaults 20855074dd0Smrg================ 20955074dd0Smrg 21055074dd0Smrg If you want to set default values for `configure' scripts to share, 21155074dd0Smrgyou can create a site shell script called `config.site' that gives 21255074dd0Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 21355074dd0Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21455074dd0Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21555074dd0Smrg`CONFIG_SITE' environment variable to the location of the site script. 21655074dd0SmrgA warning: not all `configure' scripts look for a site script. 21755074dd0Smrg 21855074dd0SmrgDefining Variables 21955074dd0Smrg================== 22055074dd0Smrg 22155074dd0Smrg Variables not defined in a site shell script can be set in the 22255074dd0Smrgenvironment passed to `configure'. However, some packages may run 22355074dd0Smrgconfigure again during the build, and the customized values of these 22455074dd0Smrgvariables may be lost. In order to avoid this problem, you should set 22555074dd0Smrgthem in the `configure' command line, using `VAR=value'. For example: 22655074dd0Smrg 22755074dd0Smrg ./configure CC=/usr/local2/bin/gcc 22855074dd0Smrg 22955074dd0Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 23055074dd0Smrgoverridden in the site shell script). 23155074dd0Smrg 23255074dd0SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23355074dd0Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23455074dd0Smrg 23555074dd0Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23655074dd0Smrg 23755074dd0Smrg`configure' Invocation 23855074dd0Smrg====================== 23955074dd0Smrg 24055074dd0Smrg `configure' recognizes the following options to control how it 24155074dd0Smrgoperates. 24255074dd0Smrg 24355074dd0Smrg`--help' 24455074dd0Smrg`-h' 24555074dd0Smrg Print a summary of all of the options to `configure', and exit. 24655074dd0Smrg 24755074dd0Smrg`--help=short' 24855074dd0Smrg`--help=recursive' 24955074dd0Smrg Print a summary of the options unique to this package's 25055074dd0Smrg `configure', and exit. The `short' variant lists options used 25155074dd0Smrg only in the top level, while the `recursive' variant lists options 25255074dd0Smrg also present in any nested packages. 25355074dd0Smrg 25455074dd0Smrg`--version' 25555074dd0Smrg`-V' 25655074dd0Smrg Print the version of Autoconf used to generate the `configure' 25755074dd0Smrg script, and exit. 25855074dd0Smrg 25955074dd0Smrg`--cache-file=FILE' 26055074dd0Smrg Enable the cache: use and save the results of the tests in FILE, 26155074dd0Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26255074dd0Smrg disable caching. 26355074dd0Smrg 26455074dd0Smrg`--config-cache' 26555074dd0Smrg`-C' 26655074dd0Smrg Alias for `--cache-file=config.cache'. 26755074dd0Smrg 26855074dd0Smrg`--quiet' 26955074dd0Smrg`--silent' 27055074dd0Smrg`-q' 27155074dd0Smrg Do not print messages saying which checks are being made. To 27255074dd0Smrg suppress all normal output, redirect it to `/dev/null' (any error 27355074dd0Smrg messages will still be shown). 27455074dd0Smrg 27555074dd0Smrg`--srcdir=DIR' 27655074dd0Smrg Look for the package's source code in directory DIR. Usually 27755074dd0Smrg `configure' can determine that directory automatically. 27855074dd0Smrg 27955074dd0Smrg`--prefix=DIR' 28055074dd0Smrg Use DIR as the installation prefix. *Note Installation Names:: 28155074dd0Smrg for more details, including other options available for fine-tuning 28255074dd0Smrg the installation locations. 28355074dd0Smrg 28455074dd0Smrg`--no-create' 28555074dd0Smrg`-n' 28655074dd0Smrg Run the configure checks, but stop before creating any output 28755074dd0Smrg files. 28855074dd0Smrg 28955074dd0Smrg`configure' also accepts some other, not widely useful, options. Run 29055074dd0Smrg`configure --help' for more details. 29155074dd0Smrg 292