1c05e22d7SmrgInstallation Instructions 2c05e22d7Smrg************************* 3c05e22d7Smrg 4f765521fSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5f765521fSmrgInc. 6c05e22d7Smrg 7f765521fSmrg Copying and distribution of this file, with or without modification, 8f765521fSmrgare permitted in any medium without royalty provided the copyright 9f765521fSmrgnotice and this notice are preserved. This file is offered as-is, 10f765521fSmrgwithout warranty of any kind. 11c05e22d7Smrg 12c05e22d7SmrgBasic Installation 13c05e22d7Smrg================== 14c05e22d7Smrg 15c05e22d7Smrg Briefly, the shell commands `./configure; make; make install' should 16c05e22d7Smrgconfigure, build, and install this package. The following 17c05e22d7Smrgmore-detailed instructions are generic; see the `README' file for 18f765521fSmrginstructions specific to this package. Some packages provide this 19f765521fSmrg`INSTALL' file but do not implement all of the features documented 20f765521fSmrgbelow. The lack of an optional feature in a given package is not 21f765521fSmrgnecessarily a bug. More recommendations for GNU packages can be found 22f765521fSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23c05e22d7Smrg 24c05e22d7Smrg The `configure' shell script attempts to guess correct values for 25c05e22d7Smrgvarious system-dependent variables used during compilation. It uses 26c05e22d7Smrgthose values to create a `Makefile' in each directory of the package. 27c05e22d7SmrgIt may also create one or more `.h' files containing system-dependent 28c05e22d7Smrgdefinitions. Finally, it creates a shell script `config.status' that 29c05e22d7Smrgyou can run in the future to recreate the current configuration, and a 30c05e22d7Smrgfile `config.log' containing compiler output (useful mainly for 31c05e22d7Smrgdebugging `configure'). 32c05e22d7Smrg 33c05e22d7Smrg It can also use an optional file (typically called `config.cache' 34c05e22d7Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35c05e22d7Smrgthe results of its tests to speed up reconfiguring. Caching is 36c05e22d7Smrgdisabled by default to prevent problems with accidental use of stale 37c05e22d7Smrgcache files. 38c05e22d7Smrg 39c05e22d7Smrg If you need to do unusual things to compile the package, please try 40c05e22d7Smrgto figure out how `configure' could check whether to do them, and mail 41c05e22d7Smrgdiffs or instructions to the address given in the `README' so they can 42c05e22d7Smrgbe considered for the next release. If you are using the cache, and at 43c05e22d7Smrgsome point `config.cache' contains results you don't want to keep, you 44c05e22d7Smrgmay remove or edit it. 45c05e22d7Smrg 46c05e22d7Smrg The file `configure.ac' (or `configure.in') is used to create 47c05e22d7Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48c05e22d7Smrgyou want to change it or regenerate `configure' using a newer version 49c05e22d7Smrgof `autoconf'. 50c05e22d7Smrg 51f765521fSmrg The simplest way to compile this package is: 52c05e22d7Smrg 53c05e22d7Smrg 1. `cd' to the directory containing the package's source code and type 54c05e22d7Smrg `./configure' to configure the package for your system. 55c05e22d7Smrg 56c05e22d7Smrg Running `configure' might take a while. While running, it prints 57c05e22d7Smrg some messages telling which features it is checking for. 58c05e22d7Smrg 59c05e22d7Smrg 2. Type `make' to compile the package. 60c05e22d7Smrg 61c05e22d7Smrg 3. Optionally, type `make check' to run any self-tests that come with 62f765521fSmrg the package, generally using the just-built uninstalled binaries. 63c05e22d7Smrg 64c05e22d7Smrg 4. Type `make install' to install the programs and any data files and 65f765521fSmrg documentation. When installing into a prefix owned by root, it is 66f765521fSmrg recommended that the package be configured and built as a regular 67f765521fSmrg user, and only the `make install' phase executed with root 68f765521fSmrg privileges. 69f765521fSmrg 70f765521fSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71f765521fSmrg this time using the binaries in their final installed location. 72f765521fSmrg This target does not install anything. Running this target as a 73f765521fSmrg regular user, particularly if the prior `make install' required 74f765521fSmrg root privileges, verifies that the installation completed 75f765521fSmrg correctly. 76f765521fSmrg 77f765521fSmrg 6. You can remove the program binaries and object files from the 78c05e22d7Smrg source code directory by typing `make clean'. To also remove the 79c05e22d7Smrg files that `configure' created (so you can compile the package for 80c05e22d7Smrg a different kind of computer), type `make distclean'. There is 81c05e22d7Smrg also a `make maintainer-clean' target, but that is intended mainly 82c05e22d7Smrg for the package's developers. If you use it, you may have to get 83c05e22d7Smrg all sorts of other programs in order to regenerate files that came 84c05e22d7Smrg with the distribution. 85c05e22d7Smrg 86f765521fSmrg 7. Often, you can also type `make uninstall' to remove the installed 87f765521fSmrg files again. In practice, not all packages have tested that 88f765521fSmrg uninstallation works correctly, even though it is required by the 89f765521fSmrg GNU Coding Standards. 90f765521fSmrg 91f765521fSmrg 8. Some packages, particularly those that use Automake, provide `make 92f765521fSmrg distcheck', which can by used by developers to test that all other 93f765521fSmrg targets like `make install' and `make uninstall' work correctly. 94f765521fSmrg This target is generally not run by end users. 95c05e22d7Smrg 96c05e22d7SmrgCompilers and Options 97c05e22d7Smrg===================== 98c05e22d7Smrg 99c05e22d7Smrg Some systems require unusual options for compilation or linking that 100c05e22d7Smrgthe `configure' script does not know about. Run `./configure --help' 101c05e22d7Smrgfor details on some of the pertinent environment variables. 102c05e22d7Smrg 103c05e22d7Smrg You can give `configure' initial values for configuration parameters 104c05e22d7Smrgby setting variables in the command line or in the environment. Here 105c05e22d7Smrgis an example: 106c05e22d7Smrg 107c05e22d7Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108c05e22d7Smrg 109c05e22d7Smrg *Note Defining Variables::, for more details. 110c05e22d7Smrg 111c05e22d7SmrgCompiling For Multiple Architectures 112c05e22d7Smrg==================================== 113c05e22d7Smrg 114c05e22d7Smrg You can compile the package for more than one kind of computer at the 115c05e22d7Smrgsame time, by placing the object files for each architecture in their 116c05e22d7Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117c05e22d7Smrgdirectory where you want the object files and executables to go and run 118c05e22d7Smrgthe `configure' script. `configure' automatically checks for the 119f765521fSmrgsource code in the directory that `configure' is in and in `..'. This 120f765521fSmrgis known as a "VPATH" build. 121c05e22d7Smrg 122c05e22d7Smrg With a non-GNU `make', it is safer to compile the package for one 123c05e22d7Smrgarchitecture at a time in the source code directory. After you have 124c05e22d7Smrginstalled the package for one architecture, use `make distclean' before 125c05e22d7Smrgreconfiguring for another architecture. 126c05e22d7Smrg 127c05e22d7Smrg On MacOS X 10.5 and later systems, you can create libraries and 128c05e22d7Smrgexecutables that work on multiple system types--known as "fat" or 129c05e22d7Smrg"universal" binaries--by specifying multiple `-arch' options to the 130c05e22d7Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131c05e22d7Smrgthis: 132c05e22d7Smrg 133c05e22d7Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134c05e22d7Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135c05e22d7Smrg CPP="gcc -E" CXXCPP="g++ -E" 136c05e22d7Smrg 137c05e22d7Smrg This is not guaranteed to produce working output in all cases, you 138c05e22d7Smrgmay have to build one architecture at a time and combine the results 139c05e22d7Smrgusing the `lipo' tool if you have problems. 140c05e22d7Smrg 141c05e22d7SmrgInstallation Names 142c05e22d7Smrg================== 143c05e22d7Smrg 144c05e22d7Smrg By default, `make install' installs the package's commands under 145c05e22d7Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146c05e22d7Smrgcan specify an installation prefix other than `/usr/local' by giving 147f765521fSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148f765521fSmrgabsolute file name. 149c05e22d7Smrg 150c05e22d7Smrg You can specify separate installation prefixes for 151c05e22d7Smrgarchitecture-specific files and architecture-independent files. If you 152c05e22d7Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153c05e22d7SmrgPREFIX as the prefix for installing programs and libraries. 154c05e22d7SmrgDocumentation and other data files still use the regular prefix. 155c05e22d7Smrg 156c05e22d7Smrg In addition, if you use an unusual directory layout you can give 157c05e22d7Smrgoptions like `--bindir=DIR' to specify different values for particular 158c05e22d7Smrgkinds of files. Run `configure --help' for a list of the directories 159f765521fSmrgyou can set and what kinds of files go in them. In general, the 160f765521fSmrgdefault for these options is expressed in terms of `${prefix}', so that 161f765521fSmrgspecifying just `--prefix' will affect all of the other directory 162f765521fSmrgspecifications that were not explicitly provided. 163f765521fSmrg 164f765521fSmrg The most portable way to affect installation locations is to pass the 165f765521fSmrgcorrect locations to `configure'; however, many packages provide one or 166f765521fSmrgboth of the following shortcuts of passing variable assignments to the 167f765521fSmrg`make install' command line to change installation locations without 168f765521fSmrghaving to reconfigure or recompile. 169f765521fSmrg 170f765521fSmrg The first method involves providing an override variable for each 171f765521fSmrgaffected directory. For example, `make install 172f765521fSmrgprefix=/alternate/directory' will choose an alternate location for all 173f765521fSmrgdirectory configuration variables that were expressed in terms of 174f765521fSmrg`${prefix}'. Any directories that were specified during `configure', 175f765521fSmrgbut not in terms of `${prefix}', must each be overridden at install 176f765521fSmrgtime for the entire installation to be relocated. The approach of 177f765521fSmrgmakefile variable overrides for each directory variable is required by 178f765521fSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179f765521fSmrgHowever, some platforms have known limitations with the semantics of 180f765521fSmrgshared libraries that end up requiring recompilation when using this 181f765521fSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182f765521fSmrg 183f765521fSmrg The second method involves providing the `DESTDIR' variable. For 184f765521fSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185f765521fSmrg`/alternate/directory' before all installation names. The approach of 186f765521fSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187f765521fSmrgdoes not work on platforms that have drive letters. On the other hand, 188f765521fSmrgit does better at avoiding recompilation issues, and works well even 189f765521fSmrgwhen some directory options were not specified in terms of `${prefix}' 190f765521fSmrgat `configure' time. 191f765521fSmrg 192f765521fSmrgOptional Features 193f765521fSmrg================= 194c05e22d7Smrg 195c05e22d7Smrg If the package supports it, you can cause programs to be installed 196c05e22d7Smrgwith an extra prefix or suffix on their names by giving `configure' the 197c05e22d7Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198c05e22d7Smrg 199c05e22d7Smrg Some packages pay attention to `--enable-FEATURE' options to 200c05e22d7Smrg`configure', where FEATURE indicates an optional part of the package. 201c05e22d7SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202c05e22d7Smrgis something like `gnu-as' or `x' (for the X Window System). The 203c05e22d7Smrg`README' should mention any `--enable-' and `--with-' options that the 204c05e22d7Smrgpackage recognizes. 205c05e22d7Smrg 206c05e22d7Smrg For packages that use the X Window System, `configure' can usually 207c05e22d7Smrgfind the X include and library files automatically, but if it doesn't, 208c05e22d7Smrgyou can use the `configure' options `--x-includes=DIR' and 209c05e22d7Smrg`--x-libraries=DIR' to specify their locations. 210c05e22d7Smrg 211f765521fSmrg Some packages offer the ability to configure how verbose the 212f765521fSmrgexecution of `make' will be. For these packages, running `./configure 213f765521fSmrg--enable-silent-rules' sets the default to minimal output, which can be 214f765521fSmrgoverridden with `make V=1'; while running `./configure 215f765521fSmrg--disable-silent-rules' sets the default to verbose, which can be 216f765521fSmrgoverridden with `make V=0'. 217f765521fSmrg 218c05e22d7SmrgParticular systems 219c05e22d7Smrg================== 220c05e22d7Smrg 221c05e22d7Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222c05e22d7SmrgCC is not installed, it is recommended to use the following options in 223c05e22d7Smrgorder to use an ANSI C compiler: 224c05e22d7Smrg 225f765521fSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226c05e22d7Smrg 227c05e22d7Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228c05e22d7Smrg 229f765521fSmrg HP-UX `make' updates targets which have the same time stamps as 230f765521fSmrgtheir prerequisites, which makes it generally unusable when shipped 231f765521fSmrggenerated files such as `configure' are involved. Use GNU `make' 232f765521fSmrginstead. 233f765521fSmrg 234c05e22d7Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235c05e22d7Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236c05e22d7Smrga workaround. If GNU CC is not installed, it is therefore recommended 237c05e22d7Smrgto try 238c05e22d7Smrg 239c05e22d7Smrg ./configure CC="cc" 240c05e22d7Smrg 241c05e22d7Smrgand if that doesn't work, try 242c05e22d7Smrg 243c05e22d7Smrg ./configure CC="cc -nodtk" 244c05e22d7Smrg 245f765521fSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246f765521fSmrgdirectory contains several dysfunctional programs; working variants of 247f765521fSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248f765521fSmrgin your `PATH', put it _after_ `/usr/bin'. 249f765521fSmrg 250f765521fSmrg On Haiku, software installed for all users goes in `/boot/common', 251f765521fSmrgnot `/usr/local'. It is recommended to use the following options: 252f765521fSmrg 253f765521fSmrg ./configure --prefix=/boot/common 254f765521fSmrg 255c05e22d7SmrgSpecifying the System Type 256c05e22d7Smrg========================== 257c05e22d7Smrg 258c05e22d7Smrg There may be some features `configure' cannot figure out 259c05e22d7Smrgautomatically, but needs to determine by the type of machine the package 260c05e22d7Smrgwill run on. Usually, assuming the package is built to be run on the 261c05e22d7Smrg_same_ architectures, `configure' can figure that out, but if it prints 262c05e22d7Smrga message saying it cannot guess the machine type, give it the 263c05e22d7Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264c05e22d7Smrgtype, such as `sun4', or a canonical name which has the form: 265c05e22d7Smrg 266c05e22d7Smrg CPU-COMPANY-SYSTEM 267c05e22d7Smrg 268c05e22d7Smrgwhere SYSTEM can have one of these forms: 269c05e22d7Smrg 270f765521fSmrg OS 271f765521fSmrg KERNEL-OS 272c05e22d7Smrg 273c05e22d7Smrg See the file `config.sub' for the possible values of each field. If 274c05e22d7Smrg`config.sub' isn't included in this package, then this package doesn't 275c05e22d7Smrgneed to know the machine type. 276c05e22d7Smrg 277c05e22d7Smrg If you are _building_ compiler tools for cross-compiling, you should 278c05e22d7Smrguse the option `--target=TYPE' to select the type of system they will 279c05e22d7Smrgproduce code for. 280c05e22d7Smrg 281c05e22d7Smrg If you want to _use_ a cross compiler, that generates code for a 282c05e22d7Smrgplatform different from the build platform, you should specify the 283c05e22d7Smrg"host" platform (i.e., that on which the generated programs will 284c05e22d7Smrgeventually be run) with `--host=TYPE'. 285c05e22d7Smrg 286c05e22d7SmrgSharing Defaults 287c05e22d7Smrg================ 288c05e22d7Smrg 289c05e22d7Smrg If you want to set default values for `configure' scripts to share, 290c05e22d7Smrgyou can create a site shell script called `config.site' that gives 291c05e22d7Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292c05e22d7Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293c05e22d7Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294c05e22d7Smrg`CONFIG_SITE' environment variable to the location of the site script. 295c05e22d7SmrgA warning: not all `configure' scripts look for a site script. 296c05e22d7Smrg 297c05e22d7SmrgDefining Variables 298c05e22d7Smrg================== 299c05e22d7Smrg 300c05e22d7Smrg Variables not defined in a site shell script can be set in the 301c05e22d7Smrgenvironment passed to `configure'. However, some packages may run 302c05e22d7Smrgconfigure again during the build, and the customized values of these 303c05e22d7Smrgvariables may be lost. In order to avoid this problem, you should set 304c05e22d7Smrgthem in the `configure' command line, using `VAR=value'. For example: 305c05e22d7Smrg 306c05e22d7Smrg ./configure CC=/usr/local2/bin/gcc 307c05e22d7Smrg 308c05e22d7Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309c05e22d7Smrgoverridden in the site shell script). 310c05e22d7Smrg 311c05e22d7SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312c05e22d7Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313c05e22d7Smrg 314c05e22d7Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315c05e22d7Smrg 316c05e22d7Smrg`configure' Invocation 317c05e22d7Smrg====================== 318c05e22d7Smrg 319c05e22d7Smrg `configure' recognizes the following options to control how it 320c05e22d7Smrgoperates. 321c05e22d7Smrg 322c05e22d7Smrg`--help' 323c05e22d7Smrg`-h' 324c05e22d7Smrg Print a summary of all of the options to `configure', and exit. 325c05e22d7Smrg 326c05e22d7Smrg`--help=short' 327c05e22d7Smrg`--help=recursive' 328c05e22d7Smrg Print a summary of the options unique to this package's 329c05e22d7Smrg `configure', and exit. The `short' variant lists options used 330c05e22d7Smrg only in the top level, while the `recursive' variant lists options 331c05e22d7Smrg also present in any nested packages. 332c05e22d7Smrg 333c05e22d7Smrg`--version' 334c05e22d7Smrg`-V' 335c05e22d7Smrg Print the version of Autoconf used to generate the `configure' 336c05e22d7Smrg script, and exit. 337c05e22d7Smrg 338c05e22d7Smrg`--cache-file=FILE' 339c05e22d7Smrg Enable the cache: use and save the results of the tests in FILE, 340c05e22d7Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341c05e22d7Smrg disable caching. 342c05e22d7Smrg 343c05e22d7Smrg`--config-cache' 344c05e22d7Smrg`-C' 345c05e22d7Smrg Alias for `--cache-file=config.cache'. 346c05e22d7Smrg 347c05e22d7Smrg`--quiet' 348c05e22d7Smrg`--silent' 349c05e22d7Smrg`-q' 350c05e22d7Smrg Do not print messages saying which checks are being made. To 351c05e22d7Smrg suppress all normal output, redirect it to `/dev/null' (any error 352c05e22d7Smrg messages will still be shown). 353c05e22d7Smrg 354c05e22d7Smrg`--srcdir=DIR' 355c05e22d7Smrg Look for the package's source code in directory DIR. Usually 356c05e22d7Smrg `configure' can determine that directory automatically. 357c05e22d7Smrg 358c05e22d7Smrg`--prefix=DIR' 359f765521fSmrg Use DIR as the installation prefix. *note Installation Names:: 360c05e22d7Smrg for more details, including other options available for fine-tuning 361c05e22d7Smrg the installation locations. 362c05e22d7Smrg 363c05e22d7Smrg`--no-create' 364c05e22d7Smrg`-n' 365c05e22d7Smrg Run the configure checks, but stop before creating any output 366c05e22d7Smrg files. 367c05e22d7Smrg 368c05e22d7Smrg`configure' also accepts some other, not widely useful, options. Run 369c05e22d7Smrg`configure --help' for more details. 370c05e22d7Smrg 371