INSTALL revision af23b0a6
1af23b0a6SmrgInstallation Instructions 2af23b0a6Smrg************************* 3af23b0a6Smrg 4af23b0a6SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5af23b0a6Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6af23b0a6Smrg 7af23b0a6Smrg This file is free documentation; the Free Software Foundation gives 8af23b0a6Smrgunlimited permission to copy, distribute and modify it. 9af23b0a6Smrg 10af23b0a6SmrgBasic Installation 11af23b0a6Smrg================== 12af23b0a6Smrg 13af23b0a6Smrg Briefly, the shell commands `./configure; make; make install' should 14af23b0a6Smrgconfigure, build, and install this package. The following 15af23b0a6Smrgmore-detailed instructions are generic; see the `README' file for 16af23b0a6Smrginstructions specific to this package. 17af23b0a6Smrg 18af23b0a6Smrg The `configure' shell script attempts to guess correct values for 19af23b0a6Smrgvarious system-dependent variables used during compilation. It uses 20af23b0a6Smrgthose values to create a `Makefile' in each directory of the package. 21af23b0a6SmrgIt may also create one or more `.h' files containing system-dependent 22af23b0a6Smrgdefinitions. Finally, it creates a shell script `config.status' that 23af23b0a6Smrgyou can run in the future to recreate the current configuration, and a 24af23b0a6Smrgfile `config.log' containing compiler output (useful mainly for 25af23b0a6Smrgdebugging `configure'). 26af23b0a6Smrg 27af23b0a6Smrg It can also use an optional file (typically called `config.cache' 28af23b0a6Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29af23b0a6Smrgthe results of its tests to speed up reconfiguring. Caching is 30af23b0a6Smrgdisabled by default to prevent problems with accidental use of stale 31af23b0a6Smrgcache files. 32af23b0a6Smrg 33af23b0a6Smrg If you need to do unusual things to compile the package, please try 34af23b0a6Smrgto figure out how `configure' could check whether to do them, and mail 35af23b0a6Smrgdiffs or instructions to the address given in the `README' so they can 36af23b0a6Smrgbe considered for the next release. If you are using the cache, and at 37af23b0a6Smrgsome point `config.cache' contains results you don't want to keep, you 38af23b0a6Smrgmay remove or edit it. 39af23b0a6Smrg 40af23b0a6Smrg The file `configure.ac' (or `configure.in') is used to create 41af23b0a6Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42af23b0a6Smrgyou want to change it or regenerate `configure' using a newer version 43af23b0a6Smrgof `autoconf'. 44af23b0a6Smrg 45af23b0a6SmrgThe simplest way to compile this package is: 46af23b0a6Smrg 47af23b0a6Smrg 1. `cd' to the directory containing the package's source code and type 48af23b0a6Smrg `./configure' to configure the package for your system. 49af23b0a6Smrg 50af23b0a6Smrg Running `configure' might take a while. While running, it prints 51af23b0a6Smrg some messages telling which features it is checking for. 52af23b0a6Smrg 53af23b0a6Smrg 2. Type `make' to compile the package. 54af23b0a6Smrg 55af23b0a6Smrg 3. Optionally, type `make check' to run any self-tests that come with 56af23b0a6Smrg the package. 57af23b0a6Smrg 58af23b0a6Smrg 4. Type `make install' to install the programs and any data files and 59af23b0a6Smrg documentation. 60af23b0a6Smrg 61af23b0a6Smrg 5. You can remove the program binaries and object files from the 62af23b0a6Smrg source code directory by typing `make clean'. To also remove the 63af23b0a6Smrg files that `configure' created (so you can compile the package for 64af23b0a6Smrg a different kind of computer), type `make distclean'. There is 65af23b0a6Smrg also a `make maintainer-clean' target, but that is intended mainly 66af23b0a6Smrg for the package's developers. If you use it, you may have to get 67af23b0a6Smrg all sorts of other programs in order to regenerate files that came 68af23b0a6Smrg with the distribution. 69af23b0a6Smrg 70af23b0a6Smrg 6. Often, you can also type `make uninstall' to remove the installed 71af23b0a6Smrg files again. 72af23b0a6Smrg 73af23b0a6SmrgCompilers and Options 74af23b0a6Smrg===================== 75af23b0a6Smrg 76af23b0a6Smrg Some systems require unusual options for compilation or linking that 77af23b0a6Smrgthe `configure' script does not know about. Run `./configure --help' 78af23b0a6Smrgfor details on some of the pertinent environment variables. 79af23b0a6Smrg 80af23b0a6Smrg You can give `configure' initial values for configuration parameters 81af23b0a6Smrgby setting variables in the command line or in the environment. Here 82af23b0a6Smrgis an example: 83af23b0a6Smrg 84af23b0a6Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85af23b0a6Smrg 86af23b0a6Smrg *Note Defining Variables::, for more details. 87af23b0a6Smrg 88af23b0a6SmrgCompiling For Multiple Architectures 89af23b0a6Smrg==================================== 90af23b0a6Smrg 91af23b0a6Smrg You can compile the package for more than one kind of computer at the 92af23b0a6Smrgsame time, by placing the object files for each architecture in their 93af23b0a6Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94af23b0a6Smrgdirectory where you want the object files and executables to go and run 95af23b0a6Smrgthe `configure' script. `configure' automatically checks for the 96af23b0a6Smrgsource code in the directory that `configure' is in and in `..'. 97af23b0a6Smrg 98af23b0a6Smrg With a non-GNU `make', it is safer to compile the package for one 99af23b0a6Smrgarchitecture at a time in the source code directory. After you have 100af23b0a6Smrginstalled the package for one architecture, use `make distclean' before 101af23b0a6Smrgreconfiguring for another architecture. 102af23b0a6Smrg 103af23b0a6Smrg On MacOS X 10.5 and later systems, you can create libraries and 104af23b0a6Smrgexecutables that work on multiple system types--known as "fat" or 105af23b0a6Smrg"universal" binaries--by specifying multiple `-arch' options to the 106af23b0a6Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107af23b0a6Smrgthis: 108af23b0a6Smrg 109af23b0a6Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110af23b0a6Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111af23b0a6Smrg CPP="gcc -E" CXXCPP="g++ -E" 112af23b0a6Smrg 113af23b0a6Smrg This is not guaranteed to produce working output in all cases, you 114af23b0a6Smrgmay have to build one architecture at a time and combine the results 115af23b0a6Smrgusing the `lipo' tool if you have problems. 116af23b0a6Smrg 117af23b0a6SmrgInstallation Names 118af23b0a6Smrg================== 119af23b0a6Smrg 120af23b0a6Smrg By default, `make install' installs the package's commands under 121af23b0a6Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122af23b0a6Smrgcan specify an installation prefix other than `/usr/local' by giving 123af23b0a6Smrg`configure' the option `--prefix=PREFIX'. 124af23b0a6Smrg 125af23b0a6Smrg You can specify separate installation prefixes for 126af23b0a6Smrgarchitecture-specific files and architecture-independent files. If you 127af23b0a6Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128af23b0a6SmrgPREFIX as the prefix for installing programs and libraries. 129af23b0a6SmrgDocumentation and other data files still use the regular prefix. 130af23b0a6Smrg 131af23b0a6Smrg In addition, if you use an unusual directory layout you can give 132af23b0a6Smrgoptions like `--bindir=DIR' to specify different values for particular 133af23b0a6Smrgkinds of files. Run `configure --help' for a list of the directories 134af23b0a6Smrgyou can set and what kinds of files go in them. 135af23b0a6Smrg 136af23b0a6Smrg If the package supports it, you can cause programs to be installed 137af23b0a6Smrgwith an extra prefix or suffix on their names by giving `configure' the 138af23b0a6Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139af23b0a6Smrg 140af23b0a6SmrgOptional Features 141af23b0a6Smrg================= 142af23b0a6Smrg 143af23b0a6Smrg Some packages pay attention to `--enable-FEATURE' options to 144af23b0a6Smrg`configure', where FEATURE indicates an optional part of the package. 145af23b0a6SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146af23b0a6Smrgis something like `gnu-as' or `x' (for the X Window System). The 147af23b0a6Smrg`README' should mention any `--enable-' and `--with-' options that the 148af23b0a6Smrgpackage recognizes. 149af23b0a6Smrg 150af23b0a6Smrg For packages that use the X Window System, `configure' can usually 151af23b0a6Smrgfind the X include and library files automatically, but if it doesn't, 152af23b0a6Smrgyou can use the `configure' options `--x-includes=DIR' and 153af23b0a6Smrg`--x-libraries=DIR' to specify their locations. 154af23b0a6Smrg 155af23b0a6SmrgParticular systems 156af23b0a6Smrg================== 157af23b0a6Smrg 158af23b0a6Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159af23b0a6SmrgCC is not installed, it is recommended to use the following options in 160af23b0a6Smrgorder to use an ANSI C compiler: 161af23b0a6Smrg 162af23b0a6Smrg ./configure CC="cc -Ae" 163af23b0a6Smrg 164af23b0a6Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165af23b0a6Smrg 166af23b0a6Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167af23b0a6Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168af23b0a6Smrga workaround. If GNU CC is not installed, it is therefore recommended 169af23b0a6Smrgto try 170af23b0a6Smrg 171af23b0a6Smrg ./configure CC="cc" 172af23b0a6Smrg 173af23b0a6Smrgand if that doesn't work, try 174af23b0a6Smrg 175af23b0a6Smrg ./configure CC="cc -nodtk" 176af23b0a6Smrg 177af23b0a6SmrgSpecifying the System Type 178af23b0a6Smrg========================== 179af23b0a6Smrg 180af23b0a6Smrg There may be some features `configure' cannot figure out 181af23b0a6Smrgautomatically, but needs to determine by the type of machine the package 182af23b0a6Smrgwill run on. Usually, assuming the package is built to be run on the 183af23b0a6Smrg_same_ architectures, `configure' can figure that out, but if it prints 184af23b0a6Smrga message saying it cannot guess the machine type, give it the 185af23b0a6Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186af23b0a6Smrgtype, such as `sun4', or a canonical name which has the form: 187af23b0a6Smrg 188af23b0a6Smrg CPU-COMPANY-SYSTEM 189af23b0a6Smrg 190af23b0a6Smrgwhere SYSTEM can have one of these forms: 191af23b0a6Smrg 192af23b0a6Smrg OS KERNEL-OS 193af23b0a6Smrg 194af23b0a6Smrg See the file `config.sub' for the possible values of each field. If 195af23b0a6Smrg`config.sub' isn't included in this package, then this package doesn't 196af23b0a6Smrgneed to know the machine type. 197af23b0a6Smrg 198af23b0a6Smrg If you are _building_ compiler tools for cross-compiling, you should 199af23b0a6Smrguse the option `--target=TYPE' to select the type of system they will 200af23b0a6Smrgproduce code for. 201af23b0a6Smrg 202af23b0a6Smrg If you want to _use_ a cross compiler, that generates code for a 203af23b0a6Smrgplatform different from the build platform, you should specify the 204af23b0a6Smrg"host" platform (i.e., that on which the generated programs will 205af23b0a6Smrgeventually be run) with `--host=TYPE'. 206af23b0a6Smrg 207af23b0a6SmrgSharing Defaults 208af23b0a6Smrg================ 209af23b0a6Smrg 210af23b0a6Smrg If you want to set default values for `configure' scripts to share, 211af23b0a6Smrgyou can create a site shell script called `config.site' that gives 212af23b0a6Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213af23b0a6Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214af23b0a6Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215af23b0a6Smrg`CONFIG_SITE' environment variable to the location of the site script. 216af23b0a6SmrgA warning: not all `configure' scripts look for a site script. 217af23b0a6Smrg 218af23b0a6SmrgDefining Variables 219af23b0a6Smrg================== 220af23b0a6Smrg 221af23b0a6Smrg Variables not defined in a site shell script can be set in the 222af23b0a6Smrgenvironment passed to `configure'. However, some packages may run 223af23b0a6Smrgconfigure again during the build, and the customized values of these 224af23b0a6Smrgvariables may be lost. In order to avoid this problem, you should set 225af23b0a6Smrgthem in the `configure' command line, using `VAR=value'. For example: 226af23b0a6Smrg 227af23b0a6Smrg ./configure CC=/usr/local2/bin/gcc 228af23b0a6Smrg 229af23b0a6Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230af23b0a6Smrgoverridden in the site shell script). 231af23b0a6Smrg 232af23b0a6SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233af23b0a6Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234af23b0a6Smrg 235af23b0a6Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236af23b0a6Smrg 237af23b0a6Smrg`configure' Invocation 238af23b0a6Smrg====================== 239af23b0a6Smrg 240af23b0a6Smrg `configure' recognizes the following options to control how it 241af23b0a6Smrgoperates. 242af23b0a6Smrg 243af23b0a6Smrg`--help' 244af23b0a6Smrg`-h' 245af23b0a6Smrg Print a summary of all of the options to `configure', and exit. 246af23b0a6Smrg 247af23b0a6Smrg`--help=short' 248af23b0a6Smrg`--help=recursive' 249af23b0a6Smrg Print a summary of the options unique to this package's 250af23b0a6Smrg `configure', and exit. The `short' variant lists options used 251af23b0a6Smrg only in the top level, while the `recursive' variant lists options 252af23b0a6Smrg also present in any nested packages. 253af23b0a6Smrg 254af23b0a6Smrg`--version' 255af23b0a6Smrg`-V' 256af23b0a6Smrg Print the version of Autoconf used to generate the `configure' 257af23b0a6Smrg script, and exit. 258af23b0a6Smrg 259af23b0a6Smrg`--cache-file=FILE' 260af23b0a6Smrg Enable the cache: use and save the results of the tests in FILE, 261af23b0a6Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262af23b0a6Smrg disable caching. 263af23b0a6Smrg 264af23b0a6Smrg`--config-cache' 265af23b0a6Smrg`-C' 266af23b0a6Smrg Alias for `--cache-file=config.cache'. 267af23b0a6Smrg 268af23b0a6Smrg`--quiet' 269af23b0a6Smrg`--silent' 270af23b0a6Smrg`-q' 271af23b0a6Smrg Do not print messages saying which checks are being made. To 272af23b0a6Smrg suppress all normal output, redirect it to `/dev/null' (any error 273af23b0a6Smrg messages will still be shown). 274af23b0a6Smrg 275af23b0a6Smrg`--srcdir=DIR' 276af23b0a6Smrg Look for the package's source code in directory DIR. Usually 277af23b0a6Smrg `configure' can determine that directory automatically. 278af23b0a6Smrg 279af23b0a6Smrg`--prefix=DIR' 280af23b0a6Smrg Use DIR as the installation prefix. *Note Installation Names:: 281af23b0a6Smrg for more details, including other options available for fine-tuning 282af23b0a6Smrg the installation locations. 283af23b0a6Smrg 284af23b0a6Smrg`--no-create' 285af23b0a6Smrg`-n' 286af23b0a6Smrg Run the configure checks, but stop before creating any output 287af23b0a6Smrg files. 288af23b0a6Smrg 289af23b0a6Smrg`configure' also accepts some other, not widely useful, options. Run 290af23b0a6Smrg`configure --help' for more details. 291af23b0a6Smrg 292