INSTALL revision 47e89262
147e89262SmrgInstallation Instructions 247e89262Smrg************************* 347e89262Smrg 447e89262SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 547e89262Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6bd1da9d7Smrg 7bd1da9d7Smrg This file is free documentation; the Free Software Foundation gives 8bd1da9d7Smrgunlimited permission to copy, distribute and modify it. 9bd1da9d7Smrg 10bd1da9d7SmrgBasic Installation 11bd1da9d7Smrg================== 12bd1da9d7Smrg 1347e89262Smrg Briefly, the shell commands `./configure; make; make install' should 1447e89262Smrgconfigure, build, and install this package. The following 1547e89262Smrgmore-detailed instructions are generic; see the `README' file for 1647e89262Smrginstructions specific to this package. 17bd1da9d7Smrg 18bd1da9d7Smrg The `configure' shell script attempts to guess correct values for 19bd1da9d7Smrgvarious system-dependent variables used during compilation. It uses 20bd1da9d7Smrgthose values to create a `Makefile' in each directory of the package. 21bd1da9d7SmrgIt may also create one or more `.h' files containing system-dependent 22bd1da9d7Smrgdefinitions. Finally, it creates a shell script `config.status' that 23bd1da9d7Smrgyou can run in the future to recreate the current configuration, and a 24bd1da9d7Smrgfile `config.log' containing compiler output (useful mainly for 25bd1da9d7Smrgdebugging `configure'). 26bd1da9d7Smrg 27bd1da9d7Smrg It can also use an optional file (typically called `config.cache' 28bd1da9d7Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2947e89262Smrgthe results of its tests to speed up reconfiguring. Caching is 30bd1da9d7Smrgdisabled by default to prevent problems with accidental use of stale 3147e89262Smrgcache files. 32bd1da9d7Smrg 33bd1da9d7Smrg If you need to do unusual things to compile the package, please try 34bd1da9d7Smrgto figure out how `configure' could check whether to do them, and mail 35bd1da9d7Smrgdiffs or instructions to the address given in the `README' so they can 36bd1da9d7Smrgbe considered for the next release. If you are using the cache, and at 37bd1da9d7Smrgsome point `config.cache' contains results you don't want to keep, you 38bd1da9d7Smrgmay remove or edit it. 39bd1da9d7Smrg 40bd1da9d7Smrg The file `configure.ac' (or `configure.in') is used to create 4147e89262Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4247e89262Smrgyou want to change it or regenerate `configure' using a newer version 4347e89262Smrgof `autoconf'. 44bd1da9d7Smrg 45bd1da9d7SmrgThe simplest way to compile this package is: 46bd1da9d7Smrg 47bd1da9d7Smrg 1. `cd' to the directory containing the package's source code and type 4847e89262Smrg `./configure' to configure the package for your system. 49bd1da9d7Smrg 5047e89262Smrg Running `configure' might take a while. While running, it prints 5147e89262Smrg some messages telling which features it is checking for. 52bd1da9d7Smrg 53bd1da9d7Smrg 2. Type `make' to compile the package. 54bd1da9d7Smrg 55bd1da9d7Smrg 3. Optionally, type `make check' to run any self-tests that come with 56bd1da9d7Smrg the package. 57bd1da9d7Smrg 58bd1da9d7Smrg 4. Type `make install' to install the programs and any data files and 59bd1da9d7Smrg documentation. 60bd1da9d7Smrg 61bd1da9d7Smrg 5. You can remove the program binaries and object files from the 62bd1da9d7Smrg source code directory by typing `make clean'. To also remove the 63bd1da9d7Smrg files that `configure' created (so you can compile the package for 64bd1da9d7Smrg a different kind of computer), type `make distclean'. There is 65bd1da9d7Smrg also a `make maintainer-clean' target, but that is intended mainly 66bd1da9d7Smrg for the package's developers. If you use it, you may have to get 67bd1da9d7Smrg all sorts of other programs in order to regenerate files that came 68bd1da9d7Smrg with the distribution. 69bd1da9d7Smrg 7047e89262Smrg 6. Often, you can also type `make uninstall' to remove the installed 7147e89262Smrg files again. 7247e89262Smrg 73bd1da9d7SmrgCompilers and Options 74bd1da9d7Smrg===================== 75bd1da9d7Smrg 76bd1da9d7Smrg Some systems require unusual options for compilation or linking that 77bd1da9d7Smrgthe `configure' script does not know about. Run `./configure --help' 78bd1da9d7Smrgfor details on some of the pertinent environment variables. 79bd1da9d7Smrg 80bd1da9d7Smrg You can give `configure' initial values for configuration parameters 81bd1da9d7Smrgby setting variables in the command line or in the environment. Here 82bd1da9d7Smrgis an example: 83bd1da9d7Smrg 8447e89262Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85bd1da9d7Smrg 86bd1da9d7Smrg *Note Defining Variables::, for more details. 87bd1da9d7Smrg 88bd1da9d7SmrgCompiling For Multiple Architectures 89bd1da9d7Smrg==================================== 90bd1da9d7Smrg 91bd1da9d7Smrg You can compile the package for more than one kind of computer at the 92bd1da9d7Smrgsame time, by placing the object files for each architecture in their 9347e89262Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94bd1da9d7Smrgdirectory where you want the object files and executables to go and run 95bd1da9d7Smrgthe `configure' script. `configure' automatically checks for the 96bd1da9d7Smrgsource code in the directory that `configure' is in and in `..'. 97bd1da9d7Smrg 9847e89262Smrg With a non-GNU `make', it is safer to compile the package for one 9947e89262Smrgarchitecture at a time in the source code directory. After you have 10047e89262Smrginstalled the package for one architecture, use `make distclean' before 10147e89262Smrgreconfiguring for another architecture. 10247e89262Smrg 10347e89262Smrg On MacOS X 10.5 and later systems, you can create libraries and 10447e89262Smrgexecutables that work on multiple system types--known as "fat" or 10547e89262Smrg"universal" binaries--by specifying multiple `-arch' options to the 10647e89262Smrgcompiler but only a single `-arch' option to the preprocessor. Like 10747e89262Smrgthis: 10847e89262Smrg 10947e89262Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11047e89262Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11147e89262Smrg CPP="gcc -E" CXXCPP="g++ -E" 11247e89262Smrg 11347e89262Smrg This is not guaranteed to produce working output in all cases, you 11447e89262Smrgmay have to build one architecture at a time and combine the results 11547e89262Smrgusing the `lipo' tool if you have problems. 116bd1da9d7Smrg 117bd1da9d7SmrgInstallation Names 118bd1da9d7Smrg================== 119bd1da9d7Smrg 12047e89262Smrg By default, `make install' installs the package's commands under 12147e89262Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12247e89262Smrgcan specify an installation prefix other than `/usr/local' by giving 12347e89262Smrg`configure' the option `--prefix=PREFIX'. 124bd1da9d7Smrg 125bd1da9d7Smrg You can specify separate installation prefixes for 126bd1da9d7Smrgarchitecture-specific files and architecture-independent files. If you 12747e89262Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12847e89262SmrgPREFIX as the prefix for installing programs and libraries. 12947e89262SmrgDocumentation and other data files still use the regular prefix. 130bd1da9d7Smrg 131bd1da9d7Smrg In addition, if you use an unusual directory layout you can give 13247e89262Smrgoptions like `--bindir=DIR' to specify different values for particular 133bd1da9d7Smrgkinds of files. Run `configure --help' for a list of the directories 134bd1da9d7Smrgyou can set and what kinds of files go in them. 135bd1da9d7Smrg 136bd1da9d7Smrg If the package supports it, you can cause programs to be installed 137bd1da9d7Smrgwith an extra prefix or suffix on their names by giving `configure' the 138bd1da9d7Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139bd1da9d7Smrg 140bd1da9d7SmrgOptional Features 141bd1da9d7Smrg================= 142bd1da9d7Smrg 143bd1da9d7Smrg Some packages pay attention to `--enable-FEATURE' options to 144bd1da9d7Smrg`configure', where FEATURE indicates an optional part of the package. 145bd1da9d7SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146bd1da9d7Smrgis something like `gnu-as' or `x' (for the X Window System). The 147bd1da9d7Smrg`README' should mention any `--enable-' and `--with-' options that the 148bd1da9d7Smrgpackage recognizes. 149bd1da9d7Smrg 150bd1da9d7Smrg For packages that use the X Window System, `configure' can usually 151bd1da9d7Smrgfind the X include and library files automatically, but if it doesn't, 152bd1da9d7Smrgyou can use the `configure' options `--x-includes=DIR' and 153bd1da9d7Smrg`--x-libraries=DIR' to specify their locations. 154bd1da9d7Smrg 15547e89262SmrgParticular systems 15647e89262Smrg================== 15747e89262Smrg 15847e89262Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15947e89262SmrgCC is not installed, it is recommended to use the following options in 16047e89262Smrgorder to use an ANSI C compiler: 16147e89262Smrg 16247e89262Smrg ./configure CC="cc -Ae" 16347e89262Smrg 16447e89262Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16547e89262Smrg 16647e89262Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16747e89262Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16847e89262Smrga workaround. If GNU CC is not installed, it is therefore recommended 16947e89262Smrgto try 17047e89262Smrg 17147e89262Smrg ./configure CC="cc" 17247e89262Smrg 17347e89262Smrgand if that doesn't work, try 17447e89262Smrg 17547e89262Smrg ./configure CC="cc -nodtk" 17647e89262Smrg 177bd1da9d7SmrgSpecifying the System Type 178bd1da9d7Smrg========================== 179bd1da9d7Smrg 180bd1da9d7Smrg There may be some features `configure' cannot figure out 181bd1da9d7Smrgautomatically, but needs to determine by the type of machine the package 182bd1da9d7Smrgwill run on. Usually, assuming the package is built to be run on the 183bd1da9d7Smrg_same_ architectures, `configure' can figure that out, but if it prints 184bd1da9d7Smrga message saying it cannot guess the machine type, give it the 185bd1da9d7Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186bd1da9d7Smrgtype, such as `sun4', or a canonical name which has the form: 187bd1da9d7Smrg 188bd1da9d7Smrg CPU-COMPANY-SYSTEM 189bd1da9d7Smrg 190bd1da9d7Smrgwhere SYSTEM can have one of these forms: 191bd1da9d7Smrg 192bd1da9d7Smrg OS KERNEL-OS 193bd1da9d7Smrg 194bd1da9d7Smrg See the file `config.sub' for the possible values of each field. If 195bd1da9d7Smrg`config.sub' isn't included in this package, then this package doesn't 196bd1da9d7Smrgneed to know the machine type. 197bd1da9d7Smrg 198bd1da9d7Smrg If you are _building_ compiler tools for cross-compiling, you should 19947e89262Smrguse the option `--target=TYPE' to select the type of system they will 200bd1da9d7Smrgproduce code for. 201bd1da9d7Smrg 202bd1da9d7Smrg If you want to _use_ a cross compiler, that generates code for a 203bd1da9d7Smrgplatform different from the build platform, you should specify the 204bd1da9d7Smrg"host" platform (i.e., that on which the generated programs will 205bd1da9d7Smrgeventually be run) with `--host=TYPE'. 206bd1da9d7Smrg 207bd1da9d7SmrgSharing Defaults 208bd1da9d7Smrg================ 209bd1da9d7Smrg 210bd1da9d7Smrg If you want to set default values for `configure' scripts to share, 211bd1da9d7Smrgyou can create a site shell script called `config.site' that gives 212bd1da9d7Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213bd1da9d7Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214bd1da9d7Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215bd1da9d7Smrg`CONFIG_SITE' environment variable to the location of the site script. 216bd1da9d7SmrgA warning: not all `configure' scripts look for a site script. 217bd1da9d7Smrg 218bd1da9d7SmrgDefining Variables 219bd1da9d7Smrg================== 220bd1da9d7Smrg 221bd1da9d7Smrg Variables not defined in a site shell script can be set in the 222bd1da9d7Smrgenvironment passed to `configure'. However, some packages may run 223bd1da9d7Smrgconfigure again during the build, and the customized values of these 224bd1da9d7Smrgvariables may be lost. In order to avoid this problem, you should set 225bd1da9d7Smrgthem in the `configure' command line, using `VAR=value'. For example: 226bd1da9d7Smrg 227bd1da9d7Smrg ./configure CC=/usr/local2/bin/gcc 228bd1da9d7Smrg 22947e89262Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230bd1da9d7Smrgoverridden in the site shell script). 231bd1da9d7Smrg 23247e89262SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23347e89262Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23447e89262Smrg 23547e89262Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23647e89262Smrg 237bd1da9d7Smrg`configure' Invocation 238bd1da9d7Smrg====================== 239bd1da9d7Smrg 240bd1da9d7Smrg `configure' recognizes the following options to control how it 241bd1da9d7Smrgoperates. 242bd1da9d7Smrg 243bd1da9d7Smrg`--help' 244bd1da9d7Smrg`-h' 24547e89262Smrg Print a summary of all of the options to `configure', and exit. 24647e89262Smrg 24747e89262Smrg`--help=short' 24847e89262Smrg`--help=recursive' 24947e89262Smrg Print a summary of the options unique to this package's 25047e89262Smrg `configure', and exit. The `short' variant lists options used 25147e89262Smrg only in the top level, while the `recursive' variant lists options 25247e89262Smrg also present in any nested packages. 253bd1da9d7Smrg 254bd1da9d7Smrg`--version' 255bd1da9d7Smrg`-V' 256bd1da9d7Smrg Print the version of Autoconf used to generate the `configure' 257bd1da9d7Smrg script, and exit. 258bd1da9d7Smrg 259bd1da9d7Smrg`--cache-file=FILE' 260bd1da9d7Smrg Enable the cache: use and save the results of the tests in FILE, 261bd1da9d7Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262bd1da9d7Smrg disable caching. 263bd1da9d7Smrg 264bd1da9d7Smrg`--config-cache' 265bd1da9d7Smrg`-C' 266bd1da9d7Smrg Alias for `--cache-file=config.cache'. 267bd1da9d7Smrg 268bd1da9d7Smrg`--quiet' 269bd1da9d7Smrg`--silent' 270bd1da9d7Smrg`-q' 271bd1da9d7Smrg Do not print messages saying which checks are being made. To 272bd1da9d7Smrg suppress all normal output, redirect it to `/dev/null' (any error 273bd1da9d7Smrg messages will still be shown). 274bd1da9d7Smrg 275bd1da9d7Smrg`--srcdir=DIR' 276bd1da9d7Smrg Look for the package's source code in directory DIR. Usually 277bd1da9d7Smrg `configure' can determine that directory automatically. 278bd1da9d7Smrg 27947e89262Smrg`--prefix=DIR' 28047e89262Smrg Use DIR as the installation prefix. *Note Installation Names:: 28147e89262Smrg for more details, including other options available for fine-tuning 28247e89262Smrg the installation locations. 28347e89262Smrg 28447e89262Smrg`--no-create' 28547e89262Smrg`-n' 28647e89262Smrg Run the configure checks, but stop before creating any output 28747e89262Smrg files. 28847e89262Smrg 289bd1da9d7Smrg`configure' also accepts some other, not widely useful, options. Run 290bd1da9d7Smrg`configure --help' for more details. 291bd1da9d7Smrg 292