INSTALL revision 765486e8
1765486e8SmrgInstallation Instructions 2765486e8Smrg************************* 3765486e8Smrg 4765486e8SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5765486e8Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6765486e8Smrg 7765486e8Smrg This file is free documentation; the Free Software Foundation gives 8765486e8Smrgunlimited permission to copy, distribute and modify it. 9765486e8Smrg 10765486e8SmrgBasic Installation 11765486e8Smrg================== 12765486e8Smrg 13765486e8Smrg Briefly, the shell commands `./configure; make; make install' should 14765486e8Smrgconfigure, build, and install this package. The following 15765486e8Smrgmore-detailed instructions are generic; see the `README' file for 16765486e8Smrginstructions specific to this package. 17765486e8Smrg 18765486e8Smrg The `configure' shell script attempts to guess correct values for 19765486e8Smrgvarious system-dependent variables used during compilation. It uses 20765486e8Smrgthose values to create a `Makefile' in each directory of the package. 21765486e8SmrgIt may also create one or more `.h' files containing system-dependent 22765486e8Smrgdefinitions. Finally, it creates a shell script `config.status' that 23765486e8Smrgyou can run in the future to recreate the current configuration, and a 24765486e8Smrgfile `config.log' containing compiler output (useful mainly for 25765486e8Smrgdebugging `configure'). 26765486e8Smrg 27765486e8Smrg It can also use an optional file (typically called `config.cache' 28765486e8Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29765486e8Smrgthe results of its tests to speed up reconfiguring. Caching is 30765486e8Smrgdisabled by default to prevent problems with accidental use of stale 31765486e8Smrgcache files. 32765486e8Smrg 33765486e8Smrg If you need to do unusual things to compile the package, please try 34765486e8Smrgto figure out how `configure' could check whether to do them, and mail 35765486e8Smrgdiffs or instructions to the address given in the `README' so they can 36765486e8Smrgbe considered for the next release. If you are using the cache, and at 37765486e8Smrgsome point `config.cache' contains results you don't want to keep, you 38765486e8Smrgmay remove or edit it. 39765486e8Smrg 40765486e8Smrg The file `configure.ac' (or `configure.in') is used to create 41765486e8Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42765486e8Smrgyou want to change it or regenerate `configure' using a newer version 43765486e8Smrgof `autoconf'. 44765486e8Smrg 45765486e8SmrgThe simplest way to compile this package is: 46765486e8Smrg 47765486e8Smrg 1. `cd' to the directory containing the package's source code and type 48765486e8Smrg `./configure' to configure the package for your system. 49765486e8Smrg 50765486e8Smrg Running `configure' might take a while. While running, it prints 51765486e8Smrg some messages telling which features it is checking for. 52765486e8Smrg 53765486e8Smrg 2. Type `make' to compile the package. 54765486e8Smrg 55765486e8Smrg 3. Optionally, type `make check' to run any self-tests that come with 56765486e8Smrg the package. 57765486e8Smrg 58765486e8Smrg 4. Type `make install' to install the programs and any data files and 59765486e8Smrg documentation. 60765486e8Smrg 61765486e8Smrg 5. You can remove the program binaries and object files from the 62765486e8Smrg source code directory by typing `make clean'. To also remove the 63765486e8Smrg files that `configure' created (so you can compile the package for 64765486e8Smrg a different kind of computer), type `make distclean'. There is 65765486e8Smrg also a `make maintainer-clean' target, but that is intended mainly 66765486e8Smrg for the package's developers. If you use it, you may have to get 67765486e8Smrg all sorts of other programs in order to regenerate files that came 68765486e8Smrg with the distribution. 69765486e8Smrg 70765486e8Smrg 6. Often, you can also type `make uninstall' to remove the installed 71765486e8Smrg files again. 72765486e8Smrg 73765486e8SmrgCompilers and Options 74765486e8Smrg===================== 75765486e8Smrg 76765486e8Smrg Some systems require unusual options for compilation or linking that 77765486e8Smrgthe `configure' script does not know about. Run `./configure --help' 78765486e8Smrgfor details on some of the pertinent environment variables. 79765486e8Smrg 80765486e8Smrg You can give `configure' initial values for configuration parameters 81765486e8Smrgby setting variables in the command line or in the environment. Here 82765486e8Smrgis an example: 83765486e8Smrg 84765486e8Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85765486e8Smrg 86765486e8Smrg *Note Defining Variables::, for more details. 87765486e8Smrg 88765486e8SmrgCompiling For Multiple Architectures 89765486e8Smrg==================================== 90765486e8Smrg 91765486e8Smrg You can compile the package for more than one kind of computer at the 92765486e8Smrgsame time, by placing the object files for each architecture in their 93765486e8Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94765486e8Smrgdirectory where you want the object files and executables to go and run 95765486e8Smrgthe `configure' script. `configure' automatically checks for the 96765486e8Smrgsource code in the directory that `configure' is in and in `..'. 97765486e8Smrg 98765486e8Smrg With a non-GNU `make', it is safer to compile the package for one 99765486e8Smrgarchitecture at a time in the source code directory. After you have 100765486e8Smrginstalled the package for one architecture, use `make distclean' before 101765486e8Smrgreconfiguring for another architecture. 102765486e8Smrg 103765486e8Smrg On MacOS X 10.5 and later systems, you can create libraries and 104765486e8Smrgexecutables that work on multiple system types--known as "fat" or 105765486e8Smrg"universal" binaries--by specifying multiple `-arch' options to the 106765486e8Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107765486e8Smrgthis: 108765486e8Smrg 109765486e8Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110765486e8Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111765486e8Smrg CPP="gcc -E" CXXCPP="g++ -E" 112765486e8Smrg 113765486e8Smrg This is not guaranteed to produce working output in all cases, you 114765486e8Smrgmay have to build one architecture at a time and combine the results 115765486e8Smrgusing the `lipo' tool if you have problems. 116765486e8Smrg 117765486e8SmrgInstallation Names 118765486e8Smrg================== 119765486e8Smrg 120765486e8Smrg By default, `make install' installs the package's commands under 121765486e8Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122765486e8Smrgcan specify an installation prefix other than `/usr/local' by giving 123765486e8Smrg`configure' the option `--prefix=PREFIX'. 124765486e8Smrg 125765486e8Smrg You can specify separate installation prefixes for 126765486e8Smrgarchitecture-specific files and architecture-independent files. If you 127765486e8Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128765486e8SmrgPREFIX as the prefix for installing programs and libraries. 129765486e8SmrgDocumentation and other data files still use the regular prefix. 130765486e8Smrg 131765486e8Smrg In addition, if you use an unusual directory layout you can give 132765486e8Smrgoptions like `--bindir=DIR' to specify different values for particular 133765486e8Smrgkinds of files. Run `configure --help' for a list of the directories 134765486e8Smrgyou can set and what kinds of files go in them. 135765486e8Smrg 136765486e8Smrg If the package supports it, you can cause programs to be installed 137765486e8Smrgwith an extra prefix or suffix on their names by giving `configure' the 138765486e8Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139765486e8Smrg 140765486e8SmrgOptional Features 141765486e8Smrg================= 142765486e8Smrg 143765486e8Smrg Some packages pay attention to `--enable-FEATURE' options to 144765486e8Smrg`configure', where FEATURE indicates an optional part of the package. 145765486e8SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146765486e8Smrgis something like `gnu-as' or `x' (for the X Window System). The 147765486e8Smrg`README' should mention any `--enable-' and `--with-' options that the 148765486e8Smrgpackage recognizes. 149765486e8Smrg 150765486e8Smrg For packages that use the X Window System, `configure' can usually 151765486e8Smrgfind the X include and library files automatically, but if it doesn't, 152765486e8Smrgyou can use the `configure' options `--x-includes=DIR' and 153765486e8Smrg`--x-libraries=DIR' to specify their locations. 154765486e8Smrg 155765486e8SmrgParticular systems 156765486e8Smrg================== 157765486e8Smrg 158765486e8Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159765486e8SmrgCC is not installed, it is recommended to use the following options in 160765486e8Smrgorder to use an ANSI C compiler: 161765486e8Smrg 162765486e8Smrg ./configure CC="cc -Ae" 163765486e8Smrg 164765486e8Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165765486e8Smrg 166765486e8Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167765486e8Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168765486e8Smrga workaround. If GNU CC is not installed, it is therefore recommended 169765486e8Smrgto try 170765486e8Smrg 171765486e8Smrg ./configure CC="cc" 172765486e8Smrg 173765486e8Smrgand if that doesn't work, try 174765486e8Smrg 175765486e8Smrg ./configure CC="cc -nodtk" 176765486e8Smrg 177765486e8SmrgSpecifying the System Type 178765486e8Smrg========================== 179765486e8Smrg 180765486e8Smrg There may be some features `configure' cannot figure out 181765486e8Smrgautomatically, but needs to determine by the type of machine the package 182765486e8Smrgwill run on. Usually, assuming the package is built to be run on the 183765486e8Smrg_same_ architectures, `configure' can figure that out, but if it prints 184765486e8Smrga message saying it cannot guess the machine type, give it the 185765486e8Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186765486e8Smrgtype, such as `sun4', or a canonical name which has the form: 187765486e8Smrg 188765486e8Smrg CPU-COMPANY-SYSTEM 189765486e8Smrg 190765486e8Smrgwhere SYSTEM can have one of these forms: 191765486e8Smrg 192765486e8Smrg OS KERNEL-OS 193765486e8Smrg 194765486e8Smrg See the file `config.sub' for the possible values of each field. If 195765486e8Smrg`config.sub' isn't included in this package, then this package doesn't 196765486e8Smrgneed to know the machine type. 197765486e8Smrg 198765486e8Smrg If you are _building_ compiler tools for cross-compiling, you should 199765486e8Smrguse the option `--target=TYPE' to select the type of system they will 200765486e8Smrgproduce code for. 201765486e8Smrg 202765486e8Smrg If you want to _use_ a cross compiler, that generates code for a 203765486e8Smrgplatform different from the build platform, you should specify the 204765486e8Smrg"host" platform (i.e., that on which the generated programs will 205765486e8Smrgeventually be run) with `--host=TYPE'. 206765486e8Smrg 207765486e8SmrgSharing Defaults 208765486e8Smrg================ 209765486e8Smrg 210765486e8Smrg If you want to set default values for `configure' scripts to share, 211765486e8Smrgyou can create a site shell script called `config.site' that gives 212765486e8Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213765486e8Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214765486e8Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215765486e8Smrg`CONFIG_SITE' environment variable to the location of the site script. 216765486e8SmrgA warning: not all `configure' scripts look for a site script. 217765486e8Smrg 218765486e8SmrgDefining Variables 219765486e8Smrg================== 220765486e8Smrg 221765486e8Smrg Variables not defined in a site shell script can be set in the 222765486e8Smrgenvironment passed to `configure'. However, some packages may run 223765486e8Smrgconfigure again during the build, and the customized values of these 224765486e8Smrgvariables may be lost. In order to avoid this problem, you should set 225765486e8Smrgthem in the `configure' command line, using `VAR=value'. For example: 226765486e8Smrg 227765486e8Smrg ./configure CC=/usr/local2/bin/gcc 228765486e8Smrg 229765486e8Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230765486e8Smrgoverridden in the site shell script). 231765486e8Smrg 232765486e8SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233765486e8Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234765486e8Smrg 235765486e8Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236765486e8Smrg 237765486e8Smrg`configure' Invocation 238765486e8Smrg====================== 239765486e8Smrg 240765486e8Smrg `configure' recognizes the following options to control how it 241765486e8Smrgoperates. 242765486e8Smrg 243765486e8Smrg`--help' 244765486e8Smrg`-h' 245765486e8Smrg Print a summary of all of the options to `configure', and exit. 246765486e8Smrg 247765486e8Smrg`--help=short' 248765486e8Smrg`--help=recursive' 249765486e8Smrg Print a summary of the options unique to this package's 250765486e8Smrg `configure', and exit. The `short' variant lists options used 251765486e8Smrg only in the top level, while the `recursive' variant lists options 252765486e8Smrg also present in any nested packages. 253765486e8Smrg 254765486e8Smrg`--version' 255765486e8Smrg`-V' 256765486e8Smrg Print the version of Autoconf used to generate the `configure' 257765486e8Smrg script, and exit. 258765486e8Smrg 259765486e8Smrg`--cache-file=FILE' 260765486e8Smrg Enable the cache: use and save the results of the tests in FILE, 261765486e8Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262765486e8Smrg disable caching. 263765486e8Smrg 264765486e8Smrg`--config-cache' 265765486e8Smrg`-C' 266765486e8Smrg Alias for `--cache-file=config.cache'. 267765486e8Smrg 268765486e8Smrg`--quiet' 269765486e8Smrg`--silent' 270765486e8Smrg`-q' 271765486e8Smrg Do not print messages saying which checks are being made. To 272765486e8Smrg suppress all normal output, redirect it to `/dev/null' (any error 273765486e8Smrg messages will still be shown). 274765486e8Smrg 275765486e8Smrg`--srcdir=DIR' 276765486e8Smrg Look for the package's source code in directory DIR. Usually 277765486e8Smrg `configure' can determine that directory automatically. 278765486e8Smrg 279765486e8Smrg`--prefix=DIR' 280765486e8Smrg Use DIR as the installation prefix. *Note Installation Names:: 281765486e8Smrg for more details, including other options available for fine-tuning 282765486e8Smrg the installation locations. 283765486e8Smrg 284765486e8Smrg`--no-create' 285765486e8Smrg`-n' 286765486e8Smrg Run the configure checks, but stop before creating any output 287765486e8Smrg files. 288765486e8Smrg 289765486e8Smrg`configure' also accepts some other, not widely useful, options. Run 290765486e8Smrg`configure --help' for more details. 291765486e8Smrg 292