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