INSTALL revision 54b44505
154b44505SmrgInstallation Instructions 254b44505Smrg************************* 354b44505Smrg 454b44505SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 554b44505Smrg2006, 2007, 2008 Free Software Foundation, Inc. 654b44505Smrg 754b44505Smrg This file is free documentation; the Free Software Foundation gives 854b44505Smrgunlimited permission to copy, distribute and modify it. 954b44505Smrg 1054b44505SmrgBasic Installation 1154b44505Smrg================== 1254b44505Smrg 1354b44505Smrg Briefly, the shell commands `./configure; make; make install' should 1454b44505Smrgconfigure, build, and install this package. The following 1554b44505Smrgmore-detailed instructions are generic; see the `README' file for 1654b44505Smrginstructions specific to this package. 1754b44505Smrg 1854b44505Smrg The `configure' shell script attempts to guess correct values for 1954b44505Smrgvarious system-dependent variables used during compilation. It uses 2054b44505Smrgthose values to create a `Makefile' in each directory of the package. 2154b44505SmrgIt may also create one or more `.h' files containing system-dependent 2254b44505Smrgdefinitions. Finally, it creates a shell script `config.status' that 2354b44505Smrgyou can run in the future to recreate the current configuration, and a 2454b44505Smrgfile `config.log' containing compiler output (useful mainly for 2554b44505Smrgdebugging `configure'). 2654b44505Smrg 2754b44505Smrg It can also use an optional file (typically called `config.cache' 2854b44505Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2954b44505Smrgthe results of its tests to speed up reconfiguring. Caching is 3054b44505Smrgdisabled by default to prevent problems with accidental use of stale 3154b44505Smrgcache files. 3254b44505Smrg 3354b44505Smrg If you need to do unusual things to compile the package, please try 3454b44505Smrgto figure out how `configure' could check whether to do them, and mail 3554b44505Smrgdiffs or instructions to the address given in the `README' so they can 3654b44505Smrgbe considered for the next release. If you are using the cache, and at 3754b44505Smrgsome point `config.cache' contains results you don't want to keep, you 3854b44505Smrgmay remove or edit it. 3954b44505Smrg 4054b44505Smrg The file `configure.ac' (or `configure.in') is used to create 4154b44505Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4254b44505Smrgyou want to change it or regenerate `configure' using a newer version 4354b44505Smrgof `autoconf'. 4454b44505Smrg 4554b44505SmrgThe simplest way to compile this package is: 4654b44505Smrg 4754b44505Smrg 1. `cd' to the directory containing the package's source code and type 4854b44505Smrg `./configure' to configure the package for your system. 4954b44505Smrg 5054b44505Smrg Running `configure' might take a while. While running, it prints 5154b44505Smrg some messages telling which features it is checking for. 5254b44505Smrg 5354b44505Smrg 2. Type `make' to compile the package. 5454b44505Smrg 5554b44505Smrg 3. Optionally, type `make check' to run any self-tests that come with 5654b44505Smrg the package. 5754b44505Smrg 5854b44505Smrg 4. Type `make install' to install the programs and any data files and 5954b44505Smrg documentation. 6054b44505Smrg 6154b44505Smrg 5. You can remove the program binaries and object files from the 6254b44505Smrg source code directory by typing `make clean'. To also remove the 6354b44505Smrg files that `configure' created (so you can compile the package for 6454b44505Smrg a different kind of computer), type `make distclean'. There is 6554b44505Smrg also a `make maintainer-clean' target, but that is intended mainly 6654b44505Smrg for the package's developers. If you use it, you may have to get 6754b44505Smrg all sorts of other programs in order to regenerate files that came 6854b44505Smrg with the distribution. 6954b44505Smrg 7054b44505Smrg 6. Often, you can also type `make uninstall' to remove the installed 7154b44505Smrg files again. 7254b44505Smrg 7354b44505SmrgCompilers and Options 7454b44505Smrg===================== 7554b44505Smrg 7654b44505Smrg Some systems require unusual options for compilation or linking that 7754b44505Smrgthe `configure' script does not know about. Run `./configure --help' 7854b44505Smrgfor details on some of the pertinent environment variables. 7954b44505Smrg 8054b44505Smrg You can give `configure' initial values for configuration parameters 8154b44505Smrgby setting variables in the command line or in the environment. Here 8254b44505Smrgis an example: 8354b44505Smrg 8454b44505Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8554b44505Smrg 8654b44505Smrg *Note Defining Variables::, for more details. 8754b44505Smrg 8854b44505SmrgCompiling For Multiple Architectures 8954b44505Smrg==================================== 9054b44505Smrg 9154b44505Smrg You can compile the package for more than one kind of computer at the 9254b44505Smrgsame time, by placing the object files for each architecture in their 9354b44505Smrgown directory. To do this, you can use GNU `make'. `cd' to the 9454b44505Smrgdirectory where you want the object files and executables to go and run 9554b44505Smrgthe `configure' script. `configure' automatically checks for the 9654b44505Smrgsource code in the directory that `configure' is in and in `..'. 9754b44505Smrg 9854b44505Smrg With a non-GNU `make', it is safer to compile the package for one 9954b44505Smrgarchitecture at a time in the source code directory. After you have 10054b44505Smrginstalled the package for one architecture, use `make distclean' before 10154b44505Smrgreconfiguring for another architecture. 10254b44505Smrg 10354b44505Smrg On MacOS X 10.5 and later systems, you can create libraries and 10454b44505Smrgexecutables that work on multiple system types--known as "fat" or 10554b44505Smrg"universal" binaries--by specifying multiple `-arch' options to the 10654b44505Smrgcompiler but only a single `-arch' option to the preprocessor. Like 10754b44505Smrgthis: 10854b44505Smrg 10954b44505Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11054b44505Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11154b44505Smrg CPP="gcc -E" CXXCPP="g++ -E" 11254b44505Smrg 11354b44505Smrg This is not guaranteed to produce working output in all cases, you 11454b44505Smrgmay have to build one architecture at a time and combine the results 11554b44505Smrgusing the `lipo' tool if you have problems. 11654b44505Smrg 11754b44505SmrgInstallation Names 11854b44505Smrg================== 11954b44505Smrg 12054b44505Smrg By default, `make install' installs the package's commands under 12154b44505Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12254b44505Smrgcan specify an installation prefix other than `/usr/local' by giving 12354b44505Smrg`configure' the option `--prefix=PREFIX'. 12454b44505Smrg 12554b44505Smrg You can specify separate installation prefixes for 12654b44505Smrgarchitecture-specific files and architecture-independent files. If you 12754b44505Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12854b44505SmrgPREFIX as the prefix for installing programs and libraries. 12954b44505SmrgDocumentation and other data files still use the regular prefix. 13054b44505Smrg 13154b44505Smrg In addition, if you use an unusual directory layout you can give 13254b44505Smrgoptions like `--bindir=DIR' to specify different values for particular 13354b44505Smrgkinds of files. Run `configure --help' for a list of the directories 13454b44505Smrgyou can set and what kinds of files go in them. 13554b44505Smrg 13654b44505Smrg If the package supports it, you can cause programs to be installed 13754b44505Smrgwith an extra prefix or suffix on their names by giving `configure' the 13854b44505Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13954b44505Smrg 14054b44505SmrgOptional Features 14154b44505Smrg================= 14254b44505Smrg 14354b44505Smrg Some packages pay attention to `--enable-FEATURE' options to 14454b44505Smrg`configure', where FEATURE indicates an optional part of the package. 14554b44505SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14654b44505Smrgis something like `gnu-as' or `x' (for the X Window System). The 14754b44505Smrg`README' should mention any `--enable-' and `--with-' options that the 14854b44505Smrgpackage recognizes. 14954b44505Smrg 15054b44505Smrg For packages that use the X Window System, `configure' can usually 15154b44505Smrgfind the X include and library files automatically, but if it doesn't, 15254b44505Smrgyou can use the `configure' options `--x-includes=DIR' and 15354b44505Smrg`--x-libraries=DIR' to specify their locations. 15454b44505Smrg 15554b44505SmrgParticular systems 15654b44505Smrg================== 15754b44505Smrg 15854b44505Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15954b44505SmrgCC is not installed, it is recommended to use the following options in 16054b44505Smrgorder to use an ANSI C compiler: 16154b44505Smrg 16254b44505Smrg ./configure CC="cc -Ae" 16354b44505Smrg 16454b44505Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16554b44505Smrg 16654b44505Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16754b44505Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16854b44505Smrga workaround. If GNU CC is not installed, it is therefore recommended 16954b44505Smrgto try 17054b44505Smrg 17154b44505Smrg ./configure CC="cc" 17254b44505Smrg 17354b44505Smrgand if that doesn't work, try 17454b44505Smrg 17554b44505Smrg ./configure CC="cc -nodtk" 17654b44505Smrg 17754b44505SmrgSpecifying the System Type 17854b44505Smrg========================== 17954b44505Smrg 18054b44505Smrg There may be some features `configure' cannot figure out 18154b44505Smrgautomatically, but needs to determine by the type of machine the package 18254b44505Smrgwill run on. Usually, assuming the package is built to be run on the 18354b44505Smrg_same_ architectures, `configure' can figure that out, but if it prints 18454b44505Smrga message saying it cannot guess the machine type, give it the 18554b44505Smrg`--build=TYPE' option. TYPE can either be a short name for the system 18654b44505Smrgtype, such as `sun4', or a canonical name which has the form: 18754b44505Smrg 18854b44505Smrg CPU-COMPANY-SYSTEM 18954b44505Smrg 19054b44505Smrgwhere SYSTEM can have one of these forms: 19154b44505Smrg 19254b44505Smrg OS KERNEL-OS 19354b44505Smrg 19454b44505Smrg See the file `config.sub' for the possible values of each field. If 19554b44505Smrg`config.sub' isn't included in this package, then this package doesn't 19654b44505Smrgneed to know the machine type. 19754b44505Smrg 19854b44505Smrg If you are _building_ compiler tools for cross-compiling, you should 19954b44505Smrguse the option `--target=TYPE' to select the type of system they will 20054b44505Smrgproduce code for. 20154b44505Smrg 20254b44505Smrg If you want to _use_ a cross compiler, that generates code for a 20354b44505Smrgplatform different from the build platform, you should specify the 20454b44505Smrg"host" platform (i.e., that on which the generated programs will 20554b44505Smrgeventually be run) with `--host=TYPE'. 20654b44505Smrg 20754b44505SmrgSharing Defaults 20854b44505Smrg================ 20954b44505Smrg 21054b44505Smrg If you want to set default values for `configure' scripts to share, 21154b44505Smrgyou can create a site shell script called `config.site' that gives 21254b44505Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 21354b44505Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21454b44505Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21554b44505Smrg`CONFIG_SITE' environment variable to the location of the site script. 21654b44505SmrgA warning: not all `configure' scripts look for a site script. 21754b44505Smrg 21854b44505SmrgDefining Variables 21954b44505Smrg================== 22054b44505Smrg 22154b44505Smrg Variables not defined in a site shell script can be set in the 22254b44505Smrgenvironment passed to `configure'. However, some packages may run 22354b44505Smrgconfigure again during the build, and the customized values of these 22454b44505Smrgvariables may be lost. In order to avoid this problem, you should set 22554b44505Smrgthem in the `configure' command line, using `VAR=value'. For example: 22654b44505Smrg 22754b44505Smrg ./configure CC=/usr/local2/bin/gcc 22854b44505Smrg 22954b44505Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 23054b44505Smrgoverridden in the site shell script). 23154b44505Smrg 23254b44505SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23354b44505Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23454b44505Smrg 23554b44505Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23654b44505Smrg 23754b44505Smrg`configure' Invocation 23854b44505Smrg====================== 23954b44505Smrg 24054b44505Smrg `configure' recognizes the following options to control how it 24154b44505Smrgoperates. 24254b44505Smrg 24354b44505Smrg`--help' 24454b44505Smrg`-h' 24554b44505Smrg Print a summary of all of the options to `configure', and exit. 24654b44505Smrg 24754b44505Smrg`--help=short' 24854b44505Smrg`--help=recursive' 24954b44505Smrg Print a summary of the options unique to this package's 25054b44505Smrg `configure', and exit. The `short' variant lists options used 25154b44505Smrg only in the top level, while the `recursive' variant lists options 25254b44505Smrg also present in any nested packages. 25354b44505Smrg 25454b44505Smrg`--version' 25554b44505Smrg`-V' 25654b44505Smrg Print the version of Autoconf used to generate the `configure' 25754b44505Smrg script, and exit. 25854b44505Smrg 25954b44505Smrg`--cache-file=FILE' 26054b44505Smrg Enable the cache: use and save the results of the tests in FILE, 26154b44505Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26254b44505Smrg disable caching. 26354b44505Smrg 26454b44505Smrg`--config-cache' 26554b44505Smrg`-C' 26654b44505Smrg Alias for `--cache-file=config.cache'. 26754b44505Smrg 26854b44505Smrg`--quiet' 26954b44505Smrg`--silent' 27054b44505Smrg`-q' 27154b44505Smrg Do not print messages saying which checks are being made. To 27254b44505Smrg suppress all normal output, redirect it to `/dev/null' (any error 27354b44505Smrg messages will still be shown). 27454b44505Smrg 27554b44505Smrg`--srcdir=DIR' 27654b44505Smrg Look for the package's source code in directory DIR. Usually 27754b44505Smrg `configure' can determine that directory automatically. 27854b44505Smrg 27954b44505Smrg`--prefix=DIR' 28054b44505Smrg Use DIR as the installation prefix. *Note Installation Names:: 28154b44505Smrg for more details, including other options available for fine-tuning 28254b44505Smrg the installation locations. 28354b44505Smrg 28454b44505Smrg`--no-create' 28554b44505Smrg`-n' 28654b44505Smrg Run the configure checks, but stop before creating any output 28754b44505Smrg files. 28854b44505Smrg 28954b44505Smrg`configure' also accepts some other, not widely useful, options. Run 29054b44505Smrg`configure --help' for more details. 29154b44505Smrg 292