INSTALL revision 549e21da
1549e21daSmrgInstallation Instructions 2549e21daSmrg************************* 3ba6a1819Smrg 4549e21daSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5549e21daSmrg2006, 2007, 2008 Free Software Foundation, Inc. 6ba6a1819Smrg 7549e21daSmrg This file is free documentation; the Free Software Foundation gives 8549e21daSmrgunlimited permission to copy, distribute and modify it. 9549e21daSmrg 10549e21daSmrgBasic Installation 11549e21daSmrg================== 12549e21daSmrg 13549e21daSmrg Briefly, the shell commands `./configure; make; make install' should 14549e21daSmrgconfigure, build, and install this package. The following 15549e21daSmrgmore-detailed instructions are generic; see the `README' file for 16549e21daSmrginstructions specific to this package. 17549e21daSmrg 18549e21daSmrg The `configure' shell script attempts to guess correct values for 19549e21daSmrgvarious system-dependent variables used during compilation. It uses 20549e21daSmrgthose values to create a `Makefile' in each directory of the package. 21549e21daSmrgIt may also create one or more `.h' files containing system-dependent 22549e21daSmrgdefinitions. Finally, it creates a shell script `config.status' that 23549e21daSmrgyou can run in the future to recreate the current configuration, and a 24549e21daSmrgfile `config.log' containing compiler output (useful mainly for 25549e21daSmrgdebugging `configure'). 26549e21daSmrg 27549e21daSmrg It can also use an optional file (typically called `config.cache' 28549e21daSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29549e21daSmrgthe results of its tests to speed up reconfiguring. Caching is 30549e21daSmrgdisabled by default to prevent problems with accidental use of stale 31549e21daSmrgcache files. 32549e21daSmrg 33549e21daSmrg If you need to do unusual things to compile the package, please try 34549e21daSmrgto figure out how `configure' could check whether to do them, and mail 35549e21daSmrgdiffs or instructions to the address given in the `README' so they can 36549e21daSmrgbe considered for the next release. If you are using the cache, and at 37549e21daSmrgsome point `config.cache' contains results you don't want to keep, you 38549e21daSmrgmay remove or edit it. 39549e21daSmrg 40549e21daSmrg The file `configure.ac' (or `configure.in') is used to create 41549e21daSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 42549e21daSmrgyou want to change it or regenerate `configure' using a newer version 43549e21daSmrgof `autoconf'. 44549e21daSmrg 45549e21daSmrgThe simplest way to compile this package is: 46549e21daSmrg 47549e21daSmrg 1. `cd' to the directory containing the package's source code and type 48549e21daSmrg `./configure' to configure the package for your system. 49549e21daSmrg 50549e21daSmrg Running `configure' might take a while. While running, it prints 51549e21daSmrg some messages telling which features it is checking for. 52549e21daSmrg 53549e21daSmrg 2. Type `make' to compile the package. 54549e21daSmrg 55549e21daSmrg 3. Optionally, type `make check' to run any self-tests that come with 56549e21daSmrg the package. 57549e21daSmrg 58549e21daSmrg 4. Type `make install' to install the programs and any data files and 59549e21daSmrg documentation. 60549e21daSmrg 61549e21daSmrg 5. You can remove the program binaries and object files from the 62549e21daSmrg source code directory by typing `make clean'. To also remove the 63549e21daSmrg files that `configure' created (so you can compile the package for 64549e21daSmrg a different kind of computer), type `make distclean'. There is 65549e21daSmrg also a `make maintainer-clean' target, but that is intended mainly 66549e21daSmrg for the package's developers. If you use it, you may have to get 67549e21daSmrg all sorts of other programs in order to regenerate files that came 68549e21daSmrg with the distribution. 69549e21daSmrg 70549e21daSmrg 6. Often, you can also type `make uninstall' to remove the installed 71549e21daSmrg files again. 72549e21daSmrg 73549e21daSmrgCompilers and Options 74549e21daSmrg===================== 75549e21daSmrg 76549e21daSmrg Some systems require unusual options for compilation or linking that 77549e21daSmrgthe `configure' script does not know about. Run `./configure --help' 78549e21daSmrgfor details on some of the pertinent environment variables. 79549e21daSmrg 80549e21daSmrg You can give `configure' initial values for configuration parameters 81549e21daSmrgby setting variables in the command line or in the environment. Here 82549e21daSmrgis an example: 83549e21daSmrg 84549e21daSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85549e21daSmrg 86549e21daSmrg *Note Defining Variables::, for more details. 87549e21daSmrg 88549e21daSmrgCompiling For Multiple Architectures 89549e21daSmrg==================================== 90549e21daSmrg 91549e21daSmrg You can compile the package for more than one kind of computer at the 92549e21daSmrgsame time, by placing the object files for each architecture in their 93549e21daSmrgown directory. To do this, you can use GNU `make'. `cd' to the 94549e21daSmrgdirectory where you want the object files and executables to go and run 95549e21daSmrgthe `configure' script. `configure' automatically checks for the 96549e21daSmrgsource code in the directory that `configure' is in and in `..'. 97549e21daSmrg 98549e21daSmrg With a non-GNU `make', it is safer to compile the package for one 99549e21daSmrgarchitecture at a time in the source code directory. After you have 100549e21daSmrginstalled the package for one architecture, use `make distclean' before 101549e21daSmrgreconfiguring for another architecture. 102549e21daSmrg 103549e21daSmrg On MacOS X 10.5 and later systems, you can create libraries and 104549e21daSmrgexecutables that work on multiple system types--known as "fat" or 105549e21daSmrg"universal" binaries--by specifying multiple `-arch' options to the 106549e21daSmrgcompiler but only a single `-arch' option to the preprocessor. Like 107549e21daSmrgthis: 108549e21daSmrg 109549e21daSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110549e21daSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111549e21daSmrg CPP="gcc -E" CXXCPP="g++ -E" 112549e21daSmrg 113549e21daSmrg This is not guaranteed to produce working output in all cases, you 114549e21daSmrgmay have to build one architecture at a time and combine the results 115549e21daSmrgusing the `lipo' tool if you have problems. 116549e21daSmrg 117549e21daSmrgInstallation Names 118549e21daSmrg================== 119549e21daSmrg 120549e21daSmrg By default, `make install' installs the package's commands under 121549e21daSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122549e21daSmrgcan specify an installation prefix other than `/usr/local' by giving 123549e21daSmrg`configure' the option `--prefix=PREFIX'. 124549e21daSmrg 125549e21daSmrg You can specify separate installation prefixes for 126549e21daSmrgarchitecture-specific files and architecture-independent files. If you 127549e21daSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128549e21daSmrgPREFIX as the prefix for installing programs and libraries. 129549e21daSmrgDocumentation and other data files still use the regular prefix. 130549e21daSmrg 131549e21daSmrg In addition, if you use an unusual directory layout you can give 132549e21daSmrgoptions like `--bindir=DIR' to specify different values for particular 133549e21daSmrgkinds of files. Run `configure --help' for a list of the directories 134549e21daSmrgyou can set and what kinds of files go in them. 135549e21daSmrg 136549e21daSmrg If the package supports it, you can cause programs to be installed 137549e21daSmrgwith an extra prefix or suffix on their names by giving `configure' the 138549e21daSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139549e21daSmrg 140549e21daSmrgOptional Features 141549e21daSmrg================= 142549e21daSmrg 143549e21daSmrg Some packages pay attention to `--enable-FEATURE' options to 144549e21daSmrg`configure', where FEATURE indicates an optional part of the package. 145549e21daSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146549e21daSmrgis something like `gnu-as' or `x' (for the X Window System). The 147549e21daSmrg`README' should mention any `--enable-' and `--with-' options that the 148549e21daSmrgpackage recognizes. 149549e21daSmrg 150549e21daSmrg For packages that use the X Window System, `configure' can usually 151549e21daSmrgfind the X include and library files automatically, but if it doesn't, 152549e21daSmrgyou can use the `configure' options `--x-includes=DIR' and 153549e21daSmrg`--x-libraries=DIR' to specify their locations. 154549e21daSmrg 155549e21daSmrgParticular systems 156549e21daSmrg================== 157549e21daSmrg 158549e21daSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159549e21daSmrgCC is not installed, it is recommended to use the following options in 160549e21daSmrgorder to use an ANSI C compiler: 161549e21daSmrg 162549e21daSmrg ./configure CC="cc -Ae" 163549e21daSmrg 164549e21daSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165549e21daSmrg 166549e21daSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167549e21daSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168549e21daSmrga workaround. If GNU CC is not installed, it is therefore recommended 169549e21daSmrgto try 170549e21daSmrg 171549e21daSmrg ./configure CC="cc" 172549e21daSmrg 173549e21daSmrgand if that doesn't work, try 174549e21daSmrg 175549e21daSmrg ./configure CC="cc -nodtk" 176549e21daSmrg 177549e21daSmrgSpecifying the System Type 178549e21daSmrg========================== 179549e21daSmrg 180549e21daSmrg There may be some features `configure' cannot figure out 181549e21daSmrgautomatically, but needs to determine by the type of machine the package 182549e21daSmrgwill run on. Usually, assuming the package is built to be run on the 183549e21daSmrg_same_ architectures, `configure' can figure that out, but if it prints 184549e21daSmrga message saying it cannot guess the machine type, give it the 185549e21daSmrg`--build=TYPE' option. TYPE can either be a short name for the system 186549e21daSmrgtype, such as `sun4', or a canonical name which has the form: 187549e21daSmrg 188549e21daSmrg CPU-COMPANY-SYSTEM 189549e21daSmrg 190549e21daSmrgwhere SYSTEM can have one of these forms: 191549e21daSmrg 192549e21daSmrg OS KERNEL-OS 193549e21daSmrg 194549e21daSmrg See the file `config.sub' for the possible values of each field. If 195549e21daSmrg`config.sub' isn't included in this package, then this package doesn't 196549e21daSmrgneed to know the machine type. 197549e21daSmrg 198549e21daSmrg If you are _building_ compiler tools for cross-compiling, you should 199549e21daSmrguse the option `--target=TYPE' to select the type of system they will 200549e21daSmrgproduce code for. 201549e21daSmrg 202549e21daSmrg If you want to _use_ a cross compiler, that generates code for a 203549e21daSmrgplatform different from the build platform, you should specify the 204549e21daSmrg"host" platform (i.e., that on which the generated programs will 205549e21daSmrgeventually be run) with `--host=TYPE'. 206549e21daSmrg 207549e21daSmrgSharing Defaults 208549e21daSmrg================ 209549e21daSmrg 210549e21daSmrg If you want to set default values for `configure' scripts to share, 211549e21daSmrgyou can create a site shell script called `config.site' that gives 212549e21daSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 213549e21daSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214549e21daSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215549e21daSmrg`CONFIG_SITE' environment variable to the location of the site script. 216549e21daSmrgA warning: not all `configure' scripts look for a site script. 217549e21daSmrg 218549e21daSmrgDefining Variables 219549e21daSmrg================== 220549e21daSmrg 221549e21daSmrg Variables not defined in a site shell script can be set in the 222549e21daSmrgenvironment passed to `configure'. However, some packages may run 223549e21daSmrgconfigure again during the build, and the customized values of these 224549e21daSmrgvariables may be lost. In order to avoid this problem, you should set 225549e21daSmrgthem in the `configure' command line, using `VAR=value'. For example: 226549e21daSmrg 227549e21daSmrg ./configure CC=/usr/local2/bin/gcc 228549e21daSmrg 229549e21daSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 230549e21daSmrgoverridden in the site shell script). 231549e21daSmrg 232549e21daSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233549e21daSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234549e21daSmrg 235549e21daSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236549e21daSmrg 237549e21daSmrg`configure' Invocation 238549e21daSmrg====================== 239549e21daSmrg 240549e21daSmrg `configure' recognizes the following options to control how it 241549e21daSmrgoperates. 242549e21daSmrg 243549e21daSmrg`--help' 244549e21daSmrg`-h' 245549e21daSmrg Print a summary of all of the options to `configure', and exit. 246549e21daSmrg 247549e21daSmrg`--help=short' 248549e21daSmrg`--help=recursive' 249549e21daSmrg Print a summary of the options unique to this package's 250549e21daSmrg `configure', and exit. The `short' variant lists options used 251549e21daSmrg only in the top level, while the `recursive' variant lists options 252549e21daSmrg also present in any nested packages. 253549e21daSmrg 254549e21daSmrg`--version' 255549e21daSmrg`-V' 256549e21daSmrg Print the version of Autoconf used to generate the `configure' 257549e21daSmrg script, and exit. 258549e21daSmrg 259549e21daSmrg`--cache-file=FILE' 260549e21daSmrg Enable the cache: use and save the results of the tests in FILE, 261549e21daSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262549e21daSmrg disable caching. 263549e21daSmrg 264549e21daSmrg`--config-cache' 265549e21daSmrg`-C' 266549e21daSmrg Alias for `--cache-file=config.cache'. 267549e21daSmrg 268549e21daSmrg`--quiet' 269549e21daSmrg`--silent' 270549e21daSmrg`-q' 271549e21daSmrg Do not print messages saying which checks are being made. To 272549e21daSmrg suppress all normal output, redirect it to `/dev/null' (any error 273549e21daSmrg messages will still be shown). 274549e21daSmrg 275549e21daSmrg`--srcdir=DIR' 276549e21daSmrg Look for the package's source code in directory DIR. Usually 277549e21daSmrg `configure' can determine that directory automatically. 278549e21daSmrg 279549e21daSmrg`--prefix=DIR' 280549e21daSmrg Use DIR as the installation prefix. *Note Installation Names:: 281549e21daSmrg for more details, including other options available for fine-tuning 282549e21daSmrg the installation locations. 283549e21daSmrg 284549e21daSmrg`--no-create' 285549e21daSmrg`-n' 286549e21daSmrg Run the configure checks, but stop before creating any output 287549e21daSmrg files. 288549e21daSmrg 289549e21daSmrg`configure' also accepts some other, not widely useful, options. Run 290549e21daSmrg`configure --help' for more details. 291ba6a1819Smrg 292