1c4f7863aSmrgInstallation Instructions 2c4f7863aSmrg************************* 3c4f7863aSmrg 4084f91ccSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5084f91ccSmrgInc. 6c4f7863aSmrg 7084f91ccSmrg Copying and distribution of this file, with or without modification, 8084f91ccSmrgare permitted in any medium without royalty provided the copyright 9084f91ccSmrgnotice and this notice are preserved. This file is offered as-is, 10084f91ccSmrgwithout warranty of any kind. 11c4f7863aSmrg 12c4f7863aSmrgBasic Installation 13c4f7863aSmrg================== 14c4f7863aSmrg 15c4f7863aSmrg Briefly, the shell commands `./configure; make; make install' should 16c4f7863aSmrgconfigure, build, and install this package. The following 17c4f7863aSmrgmore-detailed instructions are generic; see the `README' file for 18084f91ccSmrginstructions specific to this package. Some packages provide this 19084f91ccSmrg`INSTALL' file but do not implement all of the features documented 20084f91ccSmrgbelow. The lack of an optional feature in a given package is not 21084f91ccSmrgnecessarily a bug. More recommendations for GNU packages can be found 22084f91ccSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23c4f7863aSmrg 24c4f7863aSmrg The `configure' shell script attempts to guess correct values for 25c4f7863aSmrgvarious system-dependent variables used during compilation. It uses 26c4f7863aSmrgthose values to create a `Makefile' in each directory of the package. 27c4f7863aSmrgIt may also create one or more `.h' files containing system-dependent 28c4f7863aSmrgdefinitions. Finally, it creates a shell script `config.status' that 29c4f7863aSmrgyou can run in the future to recreate the current configuration, and a 30c4f7863aSmrgfile `config.log' containing compiler output (useful mainly for 31c4f7863aSmrgdebugging `configure'). 32c4f7863aSmrg 33c4f7863aSmrg It can also use an optional file (typically called `config.cache' 34c4f7863aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35c4f7863aSmrgthe results of its tests to speed up reconfiguring. Caching is 36c4f7863aSmrgdisabled by default to prevent problems with accidental use of stale 37c4f7863aSmrgcache files. 38c4f7863aSmrg 39c4f7863aSmrg If you need to do unusual things to compile the package, please try 40c4f7863aSmrgto figure out how `configure' could check whether to do them, and mail 41c4f7863aSmrgdiffs or instructions to the address given in the `README' so they can 42c4f7863aSmrgbe considered for the next release. If you are using the cache, and at 43c4f7863aSmrgsome point `config.cache' contains results you don't want to keep, you 44c4f7863aSmrgmay remove or edit it. 45c4f7863aSmrg 46c4f7863aSmrg The file `configure.ac' (or `configure.in') is used to create 47c4f7863aSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 48c4f7863aSmrgyou want to change it or regenerate `configure' using a newer version 49c4f7863aSmrgof `autoconf'. 50c4f7863aSmrg 51084f91ccSmrg The simplest way to compile this package is: 52c4f7863aSmrg 53c4f7863aSmrg 1. `cd' to the directory containing the package's source code and type 54c4f7863aSmrg `./configure' to configure the package for your system. 55c4f7863aSmrg 56c4f7863aSmrg Running `configure' might take a while. While running, it prints 57c4f7863aSmrg some messages telling which features it is checking for. 58c4f7863aSmrg 59c4f7863aSmrg 2. Type `make' to compile the package. 60c4f7863aSmrg 61c4f7863aSmrg 3. Optionally, type `make check' to run any self-tests that come with 62084f91ccSmrg the package, generally using the just-built uninstalled binaries. 63c4f7863aSmrg 64c4f7863aSmrg 4. Type `make install' to install the programs and any data files and 65084f91ccSmrg documentation. When installing into a prefix owned by root, it is 66084f91ccSmrg recommended that the package be configured and built as a regular 67084f91ccSmrg user, and only the `make install' phase executed with root 68084f91ccSmrg privileges. 69084f91ccSmrg 70084f91ccSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71084f91ccSmrg this time using the binaries in their final installed location. 72084f91ccSmrg This target does not install anything. Running this target as a 73084f91ccSmrg regular user, particularly if the prior `make install' required 74084f91ccSmrg root privileges, verifies that the installation completed 75084f91ccSmrg correctly. 76084f91ccSmrg 77084f91ccSmrg 6. You can remove the program binaries and object files from the 78c4f7863aSmrg source code directory by typing `make clean'. To also remove the 79c4f7863aSmrg files that `configure' created (so you can compile the package for 80c4f7863aSmrg a different kind of computer), type `make distclean'. There is 81c4f7863aSmrg also a `make maintainer-clean' target, but that is intended mainly 82c4f7863aSmrg for the package's developers. If you use it, you may have to get 83c4f7863aSmrg all sorts of other programs in order to regenerate files that came 84c4f7863aSmrg with the distribution. 85c4f7863aSmrg 86084f91ccSmrg 7. Often, you can also type `make uninstall' to remove the installed 87084f91ccSmrg files again. In practice, not all packages have tested that 88084f91ccSmrg uninstallation works correctly, even though it is required by the 89084f91ccSmrg GNU Coding Standards. 90084f91ccSmrg 91084f91ccSmrg 8. Some packages, particularly those that use Automake, provide `make 92084f91ccSmrg distcheck', which can by used by developers to test that all other 93084f91ccSmrg targets like `make install' and `make uninstall' work correctly. 94084f91ccSmrg This target is generally not run by end users. 95c4f7863aSmrg 96c4f7863aSmrgCompilers and Options 97c4f7863aSmrg===================== 98c4f7863aSmrg 99c4f7863aSmrg Some systems require unusual options for compilation or linking that 100c4f7863aSmrgthe `configure' script does not know about. Run `./configure --help' 101c4f7863aSmrgfor details on some of the pertinent environment variables. 102c4f7863aSmrg 103c4f7863aSmrg You can give `configure' initial values for configuration parameters 104c4f7863aSmrgby setting variables in the command line or in the environment. Here 105c4f7863aSmrgis an example: 106c4f7863aSmrg 107c4f7863aSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108c4f7863aSmrg 109c4f7863aSmrg *Note Defining Variables::, for more details. 110c4f7863aSmrg 111c4f7863aSmrgCompiling For Multiple Architectures 112c4f7863aSmrg==================================== 113c4f7863aSmrg 114c4f7863aSmrg You can compile the package for more than one kind of computer at the 115c4f7863aSmrgsame time, by placing the object files for each architecture in their 116c4f7863aSmrgown directory. To do this, you can use GNU `make'. `cd' to the 117c4f7863aSmrgdirectory where you want the object files and executables to go and run 118c4f7863aSmrgthe `configure' script. `configure' automatically checks for the 119084f91ccSmrgsource code in the directory that `configure' is in and in `..'. This 120084f91ccSmrgis known as a "VPATH" build. 121c4f7863aSmrg 122c4f7863aSmrg With a non-GNU `make', it is safer to compile the package for one 123c4f7863aSmrgarchitecture at a time in the source code directory. After you have 124c4f7863aSmrginstalled the package for one architecture, use `make distclean' before 125c4f7863aSmrgreconfiguring for another architecture. 126c4f7863aSmrg 127c4f7863aSmrg On MacOS X 10.5 and later systems, you can create libraries and 128c4f7863aSmrgexecutables that work on multiple system types--known as "fat" or 129c4f7863aSmrg"universal" binaries--by specifying multiple `-arch' options to the 130c4f7863aSmrgcompiler but only a single `-arch' option to the preprocessor. Like 131c4f7863aSmrgthis: 132c4f7863aSmrg 133c4f7863aSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134c4f7863aSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135c4f7863aSmrg CPP="gcc -E" CXXCPP="g++ -E" 136c4f7863aSmrg 137c4f7863aSmrg This is not guaranteed to produce working output in all cases, you 138c4f7863aSmrgmay have to build one architecture at a time and combine the results 139c4f7863aSmrgusing the `lipo' tool if you have problems. 140c4f7863aSmrg 141c4f7863aSmrgInstallation Names 142c4f7863aSmrg================== 143c4f7863aSmrg 144c4f7863aSmrg By default, `make install' installs the package's commands under 145c4f7863aSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146c4f7863aSmrgcan specify an installation prefix other than `/usr/local' by giving 147084f91ccSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148084f91ccSmrgabsolute file name. 149c4f7863aSmrg 150c4f7863aSmrg You can specify separate installation prefixes for 151c4f7863aSmrgarchitecture-specific files and architecture-independent files. If you 152c4f7863aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153c4f7863aSmrgPREFIX as the prefix for installing programs and libraries. 154c4f7863aSmrgDocumentation and other data files still use the regular prefix. 155c4f7863aSmrg 156c4f7863aSmrg In addition, if you use an unusual directory layout you can give 157c4f7863aSmrgoptions like `--bindir=DIR' to specify different values for particular 158c4f7863aSmrgkinds of files. Run `configure --help' for a list of the directories 159084f91ccSmrgyou can set and what kinds of files go in them. In general, the 160084f91ccSmrgdefault for these options is expressed in terms of `${prefix}', so that 161084f91ccSmrgspecifying just `--prefix' will affect all of the other directory 162084f91ccSmrgspecifications that were not explicitly provided. 163084f91ccSmrg 164084f91ccSmrg The most portable way to affect installation locations is to pass the 165084f91ccSmrgcorrect locations to `configure'; however, many packages provide one or 166084f91ccSmrgboth of the following shortcuts of passing variable assignments to the 167084f91ccSmrg`make install' command line to change installation locations without 168084f91ccSmrghaving to reconfigure or recompile. 169084f91ccSmrg 170084f91ccSmrg The first method involves providing an override variable for each 171084f91ccSmrgaffected directory. For example, `make install 172084f91ccSmrgprefix=/alternate/directory' will choose an alternate location for all 173084f91ccSmrgdirectory configuration variables that were expressed in terms of 174084f91ccSmrg`${prefix}'. Any directories that were specified during `configure', 175084f91ccSmrgbut not in terms of `${prefix}', must each be overridden at install 176084f91ccSmrgtime for the entire installation to be relocated. The approach of 177084f91ccSmrgmakefile variable overrides for each directory variable is required by 178084f91ccSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179084f91ccSmrgHowever, some platforms have known limitations with the semantics of 180084f91ccSmrgshared libraries that end up requiring recompilation when using this 181084f91ccSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182084f91ccSmrg 183084f91ccSmrg The second method involves providing the `DESTDIR' variable. For 184084f91ccSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185084f91ccSmrg`/alternate/directory' before all installation names. The approach of 186084f91ccSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187084f91ccSmrgdoes not work on platforms that have drive letters. On the other hand, 188084f91ccSmrgit does better at avoiding recompilation issues, and works well even 189084f91ccSmrgwhen some directory options were not specified in terms of `${prefix}' 190084f91ccSmrgat `configure' time. 191084f91ccSmrg 192084f91ccSmrgOptional Features 193084f91ccSmrg================= 194c4f7863aSmrg 195c4f7863aSmrg If the package supports it, you can cause programs to be installed 196c4f7863aSmrgwith an extra prefix or suffix on their names by giving `configure' the 197c4f7863aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198c4f7863aSmrg 199c4f7863aSmrg Some packages pay attention to `--enable-FEATURE' options to 200c4f7863aSmrg`configure', where FEATURE indicates an optional part of the package. 201c4f7863aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202c4f7863aSmrgis something like `gnu-as' or `x' (for the X Window System). The 203c4f7863aSmrg`README' should mention any `--enable-' and `--with-' options that the 204c4f7863aSmrgpackage recognizes. 205c4f7863aSmrg 206c4f7863aSmrg For packages that use the X Window System, `configure' can usually 207c4f7863aSmrgfind the X include and library files automatically, but if it doesn't, 208c4f7863aSmrgyou can use the `configure' options `--x-includes=DIR' and 209c4f7863aSmrg`--x-libraries=DIR' to specify their locations. 210c4f7863aSmrg 211084f91ccSmrg Some packages offer the ability to configure how verbose the 212084f91ccSmrgexecution of `make' will be. For these packages, running `./configure 213084f91ccSmrg--enable-silent-rules' sets the default to minimal output, which can be 214084f91ccSmrgoverridden with `make V=1'; while running `./configure 215084f91ccSmrg--disable-silent-rules' sets the default to verbose, which can be 216084f91ccSmrgoverridden with `make V=0'. 217084f91ccSmrg 218c4f7863aSmrgParticular systems 219c4f7863aSmrg================== 220c4f7863aSmrg 221c4f7863aSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222c4f7863aSmrgCC is not installed, it is recommended to use the following options in 223c4f7863aSmrgorder to use an ANSI C compiler: 224c4f7863aSmrg 225084f91ccSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226c4f7863aSmrg 227c4f7863aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228c4f7863aSmrg 229084f91ccSmrg HP-UX `make' updates targets which have the same time stamps as 230084f91ccSmrgtheir prerequisites, which makes it generally unusable when shipped 231084f91ccSmrggenerated files such as `configure' are involved. Use GNU `make' 232084f91ccSmrginstead. 233084f91ccSmrg 234c4f7863aSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235c4f7863aSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236c4f7863aSmrga workaround. If GNU CC is not installed, it is therefore recommended 237c4f7863aSmrgto try 238c4f7863aSmrg 239c4f7863aSmrg ./configure CC="cc" 240c4f7863aSmrg 241c4f7863aSmrgand if that doesn't work, try 242c4f7863aSmrg 243c4f7863aSmrg ./configure CC="cc -nodtk" 244c4f7863aSmrg 245084f91ccSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246084f91ccSmrgdirectory contains several dysfunctional programs; working variants of 247084f91ccSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248084f91ccSmrgin your `PATH', put it _after_ `/usr/bin'. 249084f91ccSmrg 250084f91ccSmrg On Haiku, software installed for all users goes in `/boot/common', 251084f91ccSmrgnot `/usr/local'. It is recommended to use the following options: 252084f91ccSmrg 253084f91ccSmrg ./configure --prefix=/boot/common 254084f91ccSmrg 255c4f7863aSmrgSpecifying the System Type 256c4f7863aSmrg========================== 257c4f7863aSmrg 258c4f7863aSmrg There may be some features `configure' cannot figure out 259c4f7863aSmrgautomatically, but needs to determine by the type of machine the package 260c4f7863aSmrgwill run on. Usually, assuming the package is built to be run on the 261c4f7863aSmrg_same_ architectures, `configure' can figure that out, but if it prints 262c4f7863aSmrga message saying it cannot guess the machine type, give it the 263c4f7863aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264c4f7863aSmrgtype, such as `sun4', or a canonical name which has the form: 265c4f7863aSmrg 266c4f7863aSmrg CPU-COMPANY-SYSTEM 267c4f7863aSmrg 268c4f7863aSmrgwhere SYSTEM can have one of these forms: 269c4f7863aSmrg 270084f91ccSmrg OS 271084f91ccSmrg KERNEL-OS 272c4f7863aSmrg 273c4f7863aSmrg See the file `config.sub' for the possible values of each field. If 274c4f7863aSmrg`config.sub' isn't included in this package, then this package doesn't 275c4f7863aSmrgneed to know the machine type. 276c4f7863aSmrg 277c4f7863aSmrg If you are _building_ compiler tools for cross-compiling, you should 278c4f7863aSmrguse the option `--target=TYPE' to select the type of system they will 279c4f7863aSmrgproduce code for. 280c4f7863aSmrg 281c4f7863aSmrg If you want to _use_ a cross compiler, that generates code for a 282c4f7863aSmrgplatform different from the build platform, you should specify the 283c4f7863aSmrg"host" platform (i.e., that on which the generated programs will 284c4f7863aSmrgeventually be run) with `--host=TYPE'. 285c4f7863aSmrg 286c4f7863aSmrgSharing Defaults 287c4f7863aSmrg================ 288c4f7863aSmrg 289c4f7863aSmrg If you want to set default values for `configure' scripts to share, 290c4f7863aSmrgyou can create a site shell script called `config.site' that gives 291c4f7863aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 292c4f7863aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293c4f7863aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294c4f7863aSmrg`CONFIG_SITE' environment variable to the location of the site script. 295c4f7863aSmrgA warning: not all `configure' scripts look for a site script. 296c4f7863aSmrg 297c4f7863aSmrgDefining Variables 298c4f7863aSmrg================== 299c4f7863aSmrg 300c4f7863aSmrg Variables not defined in a site shell script can be set in the 301c4f7863aSmrgenvironment passed to `configure'. However, some packages may run 302c4f7863aSmrgconfigure again during the build, and the customized values of these 303c4f7863aSmrgvariables may be lost. In order to avoid this problem, you should set 304c4f7863aSmrgthem in the `configure' command line, using `VAR=value'. For example: 305c4f7863aSmrg 306c4f7863aSmrg ./configure CC=/usr/local2/bin/gcc 307c4f7863aSmrg 308c4f7863aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309c4f7863aSmrgoverridden in the site shell script). 310c4f7863aSmrg 311c4f7863aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312c4f7863aSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313c4f7863aSmrg 314c4f7863aSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315c4f7863aSmrg 316c4f7863aSmrg`configure' Invocation 317c4f7863aSmrg====================== 318c4f7863aSmrg 319c4f7863aSmrg `configure' recognizes the following options to control how it 320c4f7863aSmrgoperates. 321c4f7863aSmrg 322c4f7863aSmrg`--help' 323c4f7863aSmrg`-h' 324c4f7863aSmrg Print a summary of all of the options to `configure', and exit. 325c4f7863aSmrg 326c4f7863aSmrg`--help=short' 327c4f7863aSmrg`--help=recursive' 328c4f7863aSmrg Print a summary of the options unique to this package's 329c4f7863aSmrg `configure', and exit. The `short' variant lists options used 330c4f7863aSmrg only in the top level, while the `recursive' variant lists options 331c4f7863aSmrg also present in any nested packages. 332c4f7863aSmrg 333c4f7863aSmrg`--version' 334c4f7863aSmrg`-V' 335c4f7863aSmrg Print the version of Autoconf used to generate the `configure' 336c4f7863aSmrg script, and exit. 337c4f7863aSmrg 338c4f7863aSmrg`--cache-file=FILE' 339c4f7863aSmrg Enable the cache: use and save the results of the tests in FILE, 340c4f7863aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341c4f7863aSmrg disable caching. 342c4f7863aSmrg 343c4f7863aSmrg`--config-cache' 344c4f7863aSmrg`-C' 345c4f7863aSmrg Alias for `--cache-file=config.cache'. 346c4f7863aSmrg 347c4f7863aSmrg`--quiet' 348c4f7863aSmrg`--silent' 349c4f7863aSmrg`-q' 350c4f7863aSmrg Do not print messages saying which checks are being made. To 351c4f7863aSmrg suppress all normal output, redirect it to `/dev/null' (any error 352c4f7863aSmrg messages will still be shown). 353c4f7863aSmrg 354c4f7863aSmrg`--srcdir=DIR' 355c4f7863aSmrg Look for the package's source code in directory DIR. Usually 356c4f7863aSmrg `configure' can determine that directory automatically. 357c4f7863aSmrg 358c4f7863aSmrg`--prefix=DIR' 359084f91ccSmrg Use DIR as the installation prefix. *note Installation Names:: 360c4f7863aSmrg for more details, including other options available for fine-tuning 361c4f7863aSmrg the installation locations. 362c4f7863aSmrg 363c4f7863aSmrg`--no-create' 364c4f7863aSmrg`-n' 365c4f7863aSmrg Run the configure checks, but stop before creating any output 366c4f7863aSmrg files. 367c4f7863aSmrg 368c4f7863aSmrg`configure' also accepts some other, not widely useful, options. Run 369c4f7863aSmrg`configure --help' for more details. 370c4f7863aSmrg 371