INSTALL revision 12391620
112391620SmrgInstallation Instructions 212391620Smrg************************* 312391620Smrg 412391620SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 512391620Smrg2006, 2007, 2008 Free Software Foundation, Inc. 612391620Smrg 712391620Smrg This file is free documentation; the Free Software Foundation gives 812391620Smrgunlimited permission to copy, distribute and modify it. 912391620Smrg 1012391620SmrgBasic Installation 1112391620Smrg================== 1212391620Smrg 1312391620Smrg Briefly, the shell commands `./configure; make; make install' should 1412391620Smrgconfigure, build, and install this package. The following 1512391620Smrgmore-detailed instructions are generic; see the `README' file for 1612391620Smrginstructions specific to this package. 1712391620Smrg 1812391620Smrg The `configure' shell script attempts to guess correct values for 1912391620Smrgvarious system-dependent variables used during compilation. It uses 2012391620Smrgthose values to create a `Makefile' in each directory of the package. 2112391620SmrgIt may also create one or more `.h' files containing system-dependent 2212391620Smrgdefinitions. Finally, it creates a shell script `config.status' that 2312391620Smrgyou can run in the future to recreate the current configuration, and a 2412391620Smrgfile `config.log' containing compiler output (useful mainly for 2512391620Smrgdebugging `configure'). 2612391620Smrg 2712391620Smrg It can also use an optional file (typically called `config.cache' 2812391620Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2912391620Smrgthe results of its tests to speed up reconfiguring. Caching is 3012391620Smrgdisabled by default to prevent problems with accidental use of stale 3112391620Smrgcache files. 3212391620Smrg 3312391620Smrg If you need to do unusual things to compile the package, please try 3412391620Smrgto figure out how `configure' could check whether to do them, and mail 3512391620Smrgdiffs or instructions to the address given in the `README' so they can 3612391620Smrgbe considered for the next release. If you are using the cache, and at 3712391620Smrgsome point `config.cache' contains results you don't want to keep, you 3812391620Smrgmay remove or edit it. 3912391620Smrg 4012391620Smrg The file `configure.ac' (or `configure.in') is used to create 4112391620Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4212391620Smrgyou want to change it or regenerate `configure' using a newer version 4312391620Smrgof `autoconf'. 4412391620Smrg 4512391620SmrgThe simplest way to compile this package is: 4612391620Smrg 4712391620Smrg 1. `cd' to the directory containing the package's source code and type 4812391620Smrg `./configure' to configure the package for your system. 4912391620Smrg 5012391620Smrg Running `configure' might take a while. While running, it prints 5112391620Smrg some messages telling which features it is checking for. 5212391620Smrg 5312391620Smrg 2. Type `make' to compile the package. 5412391620Smrg 5512391620Smrg 3. Optionally, type `make check' to run any self-tests that come with 5612391620Smrg the package. 5712391620Smrg 5812391620Smrg 4. Type `make install' to install the programs and any data files and 5912391620Smrg documentation. 6012391620Smrg 6112391620Smrg 5. You can remove the program binaries and object files from the 6212391620Smrg source code directory by typing `make clean'. To also remove the 6312391620Smrg files that `configure' created (so you can compile the package for 6412391620Smrg a different kind of computer), type `make distclean'. There is 6512391620Smrg also a `make maintainer-clean' target, but that is intended mainly 6612391620Smrg for the package's developers. If you use it, you may have to get 6712391620Smrg all sorts of other programs in order to regenerate files that came 6812391620Smrg with the distribution. 6912391620Smrg 7012391620Smrg 6. Often, you can also type `make uninstall' to remove the installed 7112391620Smrg files again. 7212391620Smrg 7312391620SmrgCompilers and Options 7412391620Smrg===================== 7512391620Smrg 7612391620Smrg Some systems require unusual options for compilation or linking that 7712391620Smrgthe `configure' script does not know about. Run `./configure --help' 7812391620Smrgfor details on some of the pertinent environment variables. 7912391620Smrg 8012391620Smrg You can give `configure' initial values for configuration parameters 8112391620Smrgby setting variables in the command line or in the environment. Here 8212391620Smrgis an example: 8312391620Smrg 8412391620Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8512391620Smrg 8612391620Smrg *Note Defining Variables::, for more details. 8712391620Smrg 8812391620SmrgCompiling For Multiple Architectures 8912391620Smrg==================================== 9012391620Smrg 9112391620Smrg You can compile the package for more than one kind of computer at the 9212391620Smrgsame time, by placing the object files for each architecture in their 9312391620Smrgown directory. To do this, you can use GNU `make'. `cd' to the 9412391620Smrgdirectory where you want the object files and executables to go and run 9512391620Smrgthe `configure' script. `configure' automatically checks for the 9612391620Smrgsource code in the directory that `configure' is in and in `..'. 9712391620Smrg 9812391620Smrg With a non-GNU `make', it is safer to compile the package for one 9912391620Smrgarchitecture at a time in the source code directory. After you have 10012391620Smrginstalled the package for one architecture, use `make distclean' before 10112391620Smrgreconfiguring for another architecture. 10212391620Smrg 10312391620Smrg On MacOS X 10.5 and later systems, you can create libraries and 10412391620Smrgexecutables that work on multiple system types--known as "fat" or 10512391620Smrg"universal" binaries--by specifying multiple `-arch' options to the 10612391620Smrgcompiler but only a single `-arch' option to the preprocessor. Like 10712391620Smrgthis: 10812391620Smrg 10912391620Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11012391620Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11112391620Smrg CPP="gcc -E" CXXCPP="g++ -E" 11212391620Smrg 11312391620Smrg This is not guaranteed to produce working output in all cases, you 11412391620Smrgmay have to build one architecture at a time and combine the results 11512391620Smrgusing the `lipo' tool if you have problems. 11612391620Smrg 11712391620SmrgInstallation Names 11812391620Smrg================== 11912391620Smrg 12012391620Smrg By default, `make install' installs the package's commands under 12112391620Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12212391620Smrgcan specify an installation prefix other than `/usr/local' by giving 12312391620Smrg`configure' the option `--prefix=PREFIX'. 12412391620Smrg 12512391620Smrg You can specify separate installation prefixes for 12612391620Smrgarchitecture-specific files and architecture-independent files. If you 12712391620Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12812391620SmrgPREFIX as the prefix for installing programs and libraries. 12912391620SmrgDocumentation and other data files still use the regular prefix. 13012391620Smrg 13112391620Smrg In addition, if you use an unusual directory layout you can give 13212391620Smrgoptions like `--bindir=DIR' to specify different values for particular 13312391620Smrgkinds of files. Run `configure --help' for a list of the directories 13412391620Smrgyou can set and what kinds of files go in them. 13512391620Smrg 13612391620Smrg If the package supports it, you can cause programs to be installed 13712391620Smrgwith an extra prefix or suffix on their names by giving `configure' the 13812391620Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13912391620Smrg 14012391620SmrgOptional Features 14112391620Smrg================= 14212391620Smrg 14312391620Smrg Some packages pay attention to `--enable-FEATURE' options to 14412391620Smrg`configure', where FEATURE indicates an optional part of the package. 14512391620SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14612391620Smrgis something like `gnu-as' or `x' (for the X Window System). The 14712391620Smrg`README' should mention any `--enable-' and `--with-' options that the 14812391620Smrgpackage recognizes. 14912391620Smrg 15012391620Smrg For packages that use the X Window System, `configure' can usually 15112391620Smrgfind the X include and library files automatically, but if it doesn't, 15212391620Smrgyou can use the `configure' options `--x-includes=DIR' and 15312391620Smrg`--x-libraries=DIR' to specify their locations. 15412391620Smrg 15512391620SmrgParticular systems 15612391620Smrg================== 15712391620Smrg 15812391620Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15912391620SmrgCC is not installed, it is recommended to use the following options in 16012391620Smrgorder to use an ANSI C compiler: 16112391620Smrg 16212391620Smrg ./configure CC="cc -Ae" 16312391620Smrg 16412391620Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16512391620Smrg 16612391620Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16712391620Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16812391620Smrga workaround. If GNU CC is not installed, it is therefore recommended 16912391620Smrgto try 17012391620Smrg 17112391620Smrg ./configure CC="cc" 17212391620Smrg 17312391620Smrgand if that doesn't work, try 17412391620Smrg 17512391620Smrg ./configure CC="cc -nodtk" 17612391620Smrg 17712391620SmrgSpecifying the System Type 17812391620Smrg========================== 17912391620Smrg 18012391620Smrg There may be some features `configure' cannot figure out 18112391620Smrgautomatically, but needs to determine by the type of machine the package 18212391620Smrgwill run on. Usually, assuming the package is built to be run on the 18312391620Smrg_same_ architectures, `configure' can figure that out, but if it prints 18412391620Smrga message saying it cannot guess the machine type, give it the 18512391620Smrg`--build=TYPE' option. TYPE can either be a short name for the system 18612391620Smrgtype, such as `sun4', or a canonical name which has the form: 18712391620Smrg 18812391620Smrg CPU-COMPANY-SYSTEM 18912391620Smrg 19012391620Smrgwhere SYSTEM can have one of these forms: 19112391620Smrg 19212391620Smrg OS KERNEL-OS 19312391620Smrg 19412391620Smrg See the file `config.sub' for the possible values of each field. If 19512391620Smrg`config.sub' isn't included in this package, then this package doesn't 19612391620Smrgneed to know the machine type. 19712391620Smrg 19812391620Smrg If you are _building_ compiler tools for cross-compiling, you should 19912391620Smrguse the option `--target=TYPE' to select the type of system they will 20012391620Smrgproduce code for. 20112391620Smrg 20212391620Smrg If you want to _use_ a cross compiler, that generates code for a 20312391620Smrgplatform different from the build platform, you should specify the 20412391620Smrg"host" platform (i.e., that on which the generated programs will 20512391620Smrgeventually be run) with `--host=TYPE'. 20612391620Smrg 20712391620SmrgSharing Defaults 20812391620Smrg================ 20912391620Smrg 21012391620Smrg If you want to set default values for `configure' scripts to share, 21112391620Smrgyou can create a site shell script called `config.site' that gives 21212391620Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 21312391620Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21412391620Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21512391620Smrg`CONFIG_SITE' environment variable to the location of the site script. 21612391620SmrgA warning: not all `configure' scripts look for a site script. 21712391620Smrg 21812391620SmrgDefining Variables 21912391620Smrg================== 22012391620Smrg 22112391620Smrg Variables not defined in a site shell script can be set in the 22212391620Smrgenvironment passed to `configure'. However, some packages may run 22312391620Smrgconfigure again during the build, and the customized values of these 22412391620Smrgvariables may be lost. In order to avoid this problem, you should set 22512391620Smrgthem in the `configure' command line, using `VAR=value'. For example: 22612391620Smrg 22712391620Smrg ./configure CC=/usr/local2/bin/gcc 22812391620Smrg 22912391620Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 23012391620Smrgoverridden in the site shell script). 23112391620Smrg 23212391620SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23312391620Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23412391620Smrg 23512391620Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23612391620Smrg 23712391620Smrg`configure' Invocation 23812391620Smrg====================== 23912391620Smrg 24012391620Smrg `configure' recognizes the following options to control how it 24112391620Smrgoperates. 24212391620Smrg 24312391620Smrg`--help' 24412391620Smrg`-h' 24512391620Smrg Print a summary of all of the options to `configure', and exit. 24612391620Smrg 24712391620Smrg`--help=short' 24812391620Smrg`--help=recursive' 24912391620Smrg Print a summary of the options unique to this package's 25012391620Smrg `configure', and exit. The `short' variant lists options used 25112391620Smrg only in the top level, while the `recursive' variant lists options 25212391620Smrg also present in any nested packages. 25312391620Smrg 25412391620Smrg`--version' 25512391620Smrg`-V' 25612391620Smrg Print the version of Autoconf used to generate the `configure' 25712391620Smrg script, and exit. 25812391620Smrg 25912391620Smrg`--cache-file=FILE' 26012391620Smrg Enable the cache: use and save the results of the tests in FILE, 26112391620Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26212391620Smrg disable caching. 26312391620Smrg 26412391620Smrg`--config-cache' 26512391620Smrg`-C' 26612391620Smrg Alias for `--cache-file=config.cache'. 26712391620Smrg 26812391620Smrg`--quiet' 26912391620Smrg`--silent' 27012391620Smrg`-q' 27112391620Smrg Do not print messages saying which checks are being made. To 27212391620Smrg suppress all normal output, redirect it to `/dev/null' (any error 27312391620Smrg messages will still be shown). 27412391620Smrg 27512391620Smrg`--srcdir=DIR' 27612391620Smrg Look for the package's source code in directory DIR. Usually 27712391620Smrg `configure' can determine that directory automatically. 27812391620Smrg 27912391620Smrg`--prefix=DIR' 28012391620Smrg Use DIR as the installation prefix. *Note Installation Names:: 28112391620Smrg for more details, including other options available for fine-tuning 28212391620Smrg the installation locations. 28312391620Smrg 28412391620Smrg`--no-create' 28512391620Smrg`-n' 28612391620Smrg Run the configure checks, but stop before creating any output 28712391620Smrg files. 28812391620Smrg 28912391620Smrg`configure' also accepts some other, not widely useful, options. Run 29012391620Smrg`configure --help' for more details. 29112391620Smrg 292