1706b6b52SmrgInstallation Instructions 2706b6b52Smrg************************* 3b042e37fSmrg 43169be4bSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 53169be4bSmrgInc. 6b042e37fSmrg 73169be4bSmrg Copying and distribution of this file, with or without modification, 83169be4bSmrgare permitted in any medium without royalty provided the copyright 93169be4bSmrgnotice and this notice are preserved. This file is offered as-is, 103169be4bSmrgwithout warranty of any kind. 11706b6b52Smrg 12706b6b52SmrgBasic Installation 13706b6b52Smrg================== 14706b6b52Smrg 15706b6b52Smrg Briefly, the shell commands `./configure; make; make install' should 16706b6b52Smrgconfigure, build, and install this package. The following 17706b6b52Smrgmore-detailed instructions are generic; see the `README' file for 183169be4bSmrginstructions specific to this package. Some packages provide this 193169be4bSmrg`INSTALL' file but do not implement all of the features documented 203169be4bSmrgbelow. The lack of an optional feature in a given package is not 213169be4bSmrgnecessarily a bug. More recommendations for GNU packages can be found 223169be4bSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23706b6b52Smrg 24706b6b52Smrg The `configure' shell script attempts to guess correct values for 25706b6b52Smrgvarious system-dependent variables used during compilation. It uses 26706b6b52Smrgthose values to create a `Makefile' in each directory of the package. 27706b6b52SmrgIt may also create one or more `.h' files containing system-dependent 28706b6b52Smrgdefinitions. Finally, it creates a shell script `config.status' that 29706b6b52Smrgyou can run in the future to recreate the current configuration, and a 30706b6b52Smrgfile `config.log' containing compiler output (useful mainly for 31706b6b52Smrgdebugging `configure'). 32706b6b52Smrg 33706b6b52Smrg It can also use an optional file (typically called `config.cache' 34706b6b52Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35706b6b52Smrgthe results of its tests to speed up reconfiguring. Caching is 36706b6b52Smrgdisabled by default to prevent problems with accidental use of stale 37706b6b52Smrgcache files. 38706b6b52Smrg 39706b6b52Smrg If you need to do unusual things to compile the package, please try 40706b6b52Smrgto figure out how `configure' could check whether to do them, and mail 41706b6b52Smrgdiffs or instructions to the address given in the `README' so they can 42706b6b52Smrgbe considered for the next release. If you are using the cache, and at 43706b6b52Smrgsome point `config.cache' contains results you don't want to keep, you 44706b6b52Smrgmay remove or edit it. 45706b6b52Smrg 46706b6b52Smrg The file `configure.ac' (or `configure.in') is used to create 47706b6b52Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48706b6b52Smrgyou want to change it or regenerate `configure' using a newer version 49706b6b52Smrgof `autoconf'. 50706b6b52Smrg 513169be4bSmrg The simplest way to compile this package is: 52706b6b52Smrg 53706b6b52Smrg 1. `cd' to the directory containing the package's source code and type 54706b6b52Smrg `./configure' to configure the package for your system. 55706b6b52Smrg 56706b6b52Smrg Running `configure' might take a while. While running, it prints 57706b6b52Smrg some messages telling which features it is checking for. 58706b6b52Smrg 59706b6b52Smrg 2. Type `make' to compile the package. 60706b6b52Smrg 61706b6b52Smrg 3. Optionally, type `make check' to run any self-tests that come with 623169be4bSmrg the package, generally using the just-built uninstalled binaries. 63706b6b52Smrg 64706b6b52Smrg 4. Type `make install' to install the programs and any data files and 653169be4bSmrg documentation. When installing into a prefix owned by root, it is 663169be4bSmrg recommended that the package be configured and built as a regular 673169be4bSmrg user, and only the `make install' phase executed with root 683169be4bSmrg privileges. 693169be4bSmrg 703169be4bSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 713169be4bSmrg this time using the binaries in their final installed location. 723169be4bSmrg This target does not install anything. Running this target as a 733169be4bSmrg regular user, particularly if the prior `make install' required 743169be4bSmrg root privileges, verifies that the installation completed 753169be4bSmrg correctly. 763169be4bSmrg 773169be4bSmrg 6. You can remove the program binaries and object files from the 78706b6b52Smrg source code directory by typing `make clean'. To also remove the 79706b6b52Smrg files that `configure' created (so you can compile the package for 80706b6b52Smrg a different kind of computer), type `make distclean'. There is 81706b6b52Smrg also a `make maintainer-clean' target, but that is intended mainly 82706b6b52Smrg for the package's developers. If you use it, you may have to get 83706b6b52Smrg all sorts of other programs in order to regenerate files that came 84706b6b52Smrg with the distribution. 85706b6b52Smrg 863169be4bSmrg 7. Often, you can also type `make uninstall' to remove the installed 873169be4bSmrg files again. In practice, not all packages have tested that 883169be4bSmrg uninstallation works correctly, even though it is required by the 893169be4bSmrg GNU Coding Standards. 903169be4bSmrg 913169be4bSmrg 8. Some packages, particularly those that use Automake, provide `make 923169be4bSmrg distcheck', which can by used by developers to test that all other 933169be4bSmrg targets like `make install' and `make uninstall' work correctly. 943169be4bSmrg This target is generally not run by end users. 95706b6b52Smrg 96706b6b52SmrgCompilers and Options 97706b6b52Smrg===================== 98706b6b52Smrg 99706b6b52Smrg Some systems require unusual options for compilation or linking that 100706b6b52Smrgthe `configure' script does not know about. Run `./configure --help' 101706b6b52Smrgfor details on some of the pertinent environment variables. 102706b6b52Smrg 103706b6b52Smrg You can give `configure' initial values for configuration parameters 104706b6b52Smrgby setting variables in the command line or in the environment. Here 105706b6b52Smrgis an example: 106706b6b52Smrg 107706b6b52Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108706b6b52Smrg 109706b6b52Smrg *Note Defining Variables::, for more details. 110706b6b52Smrg 111706b6b52SmrgCompiling For Multiple Architectures 112706b6b52Smrg==================================== 113706b6b52Smrg 114706b6b52Smrg You can compile the package for more than one kind of computer at the 115706b6b52Smrgsame time, by placing the object files for each architecture in their 116706b6b52Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117706b6b52Smrgdirectory where you want the object files and executables to go and run 118706b6b52Smrgthe `configure' script. `configure' automatically checks for the 1193169be4bSmrgsource code in the directory that `configure' is in and in `..'. This 1203169be4bSmrgis known as a "VPATH" build. 121706b6b52Smrg 122706b6b52Smrg With a non-GNU `make', it is safer to compile the package for one 123706b6b52Smrgarchitecture at a time in the source code directory. After you have 124706b6b52Smrginstalled the package for one architecture, use `make distclean' before 125706b6b52Smrgreconfiguring for another architecture. 126706b6b52Smrg 127706b6b52Smrg On MacOS X 10.5 and later systems, you can create libraries and 128706b6b52Smrgexecutables that work on multiple system types--known as "fat" or 129706b6b52Smrg"universal" binaries--by specifying multiple `-arch' options to the 130706b6b52Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131706b6b52Smrgthis: 132706b6b52Smrg 133706b6b52Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134706b6b52Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135706b6b52Smrg CPP="gcc -E" CXXCPP="g++ -E" 136706b6b52Smrg 137706b6b52Smrg This is not guaranteed to produce working output in all cases, you 138706b6b52Smrgmay have to build one architecture at a time and combine the results 139706b6b52Smrgusing the `lipo' tool if you have problems. 140706b6b52Smrg 141706b6b52SmrgInstallation Names 142706b6b52Smrg================== 143706b6b52Smrg 144706b6b52Smrg By default, `make install' installs the package's commands under 145706b6b52Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146706b6b52Smrgcan specify an installation prefix other than `/usr/local' by giving 1473169be4bSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1483169be4bSmrgabsolute file name. 149706b6b52Smrg 150706b6b52Smrg You can specify separate installation prefixes for 151706b6b52Smrgarchitecture-specific files and architecture-independent files. If you 152706b6b52Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153706b6b52SmrgPREFIX as the prefix for installing programs and libraries. 154706b6b52SmrgDocumentation and other data files still use the regular prefix. 155706b6b52Smrg 156706b6b52Smrg In addition, if you use an unusual directory layout you can give 157706b6b52Smrgoptions like `--bindir=DIR' to specify different values for particular 158706b6b52Smrgkinds of files. Run `configure --help' for a list of the directories 1593169be4bSmrgyou can set and what kinds of files go in them. In general, the 1603169be4bSmrgdefault for these options is expressed in terms of `${prefix}', so that 1613169be4bSmrgspecifying just `--prefix' will affect all of the other directory 1623169be4bSmrgspecifications that were not explicitly provided. 1633169be4bSmrg 1643169be4bSmrg The most portable way to affect installation locations is to pass the 1653169be4bSmrgcorrect locations to `configure'; however, many packages provide one or 1663169be4bSmrgboth of the following shortcuts of passing variable assignments to the 1673169be4bSmrg`make install' command line to change installation locations without 1683169be4bSmrghaving to reconfigure or recompile. 1693169be4bSmrg 1703169be4bSmrg The first method involves providing an override variable for each 1713169be4bSmrgaffected directory. For example, `make install 1723169be4bSmrgprefix=/alternate/directory' will choose an alternate location for all 1733169be4bSmrgdirectory configuration variables that were expressed in terms of 1743169be4bSmrg`${prefix}'. Any directories that were specified during `configure', 1753169be4bSmrgbut not in terms of `${prefix}', must each be overridden at install 1763169be4bSmrgtime for the entire installation to be relocated. The approach of 1773169be4bSmrgmakefile variable overrides for each directory variable is required by 1783169be4bSmrgthe GNU Coding Standards, and ideally causes no recompilation. 1793169be4bSmrgHowever, some platforms have known limitations with the semantics of 1803169be4bSmrgshared libraries that end up requiring recompilation when using this 1813169be4bSmrgmethod, particularly noticeable in packages that use GNU Libtool. 1823169be4bSmrg 1833169be4bSmrg The second method involves providing the `DESTDIR' variable. For 1843169be4bSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 1853169be4bSmrg`/alternate/directory' before all installation names. The approach of 1863169be4bSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1873169be4bSmrgdoes not work on platforms that have drive letters. On the other hand, 1883169be4bSmrgit does better at avoiding recompilation issues, and works well even 1893169be4bSmrgwhen some directory options were not specified in terms of `${prefix}' 1903169be4bSmrgat `configure' time. 1913169be4bSmrg 1923169be4bSmrgOptional Features 1933169be4bSmrg================= 194706b6b52Smrg 195706b6b52Smrg If the package supports it, you can cause programs to be installed 196706b6b52Smrgwith an extra prefix or suffix on their names by giving `configure' the 197706b6b52Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198706b6b52Smrg 199706b6b52Smrg Some packages pay attention to `--enable-FEATURE' options to 200706b6b52Smrg`configure', where FEATURE indicates an optional part of the package. 201706b6b52SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202706b6b52Smrgis something like `gnu-as' or `x' (for the X Window System). The 203706b6b52Smrg`README' should mention any `--enable-' and `--with-' options that the 204706b6b52Smrgpackage recognizes. 205706b6b52Smrg 206706b6b52Smrg For packages that use the X Window System, `configure' can usually 207706b6b52Smrgfind the X include and library files automatically, but if it doesn't, 208706b6b52Smrgyou can use the `configure' options `--x-includes=DIR' and 209706b6b52Smrg`--x-libraries=DIR' to specify their locations. 210706b6b52Smrg 2113169be4bSmrg Some packages offer the ability to configure how verbose the 2123169be4bSmrgexecution of `make' will be. For these packages, running `./configure 2133169be4bSmrg--enable-silent-rules' sets the default to minimal output, which can be 2143169be4bSmrgoverridden with `make V=1'; while running `./configure 2153169be4bSmrg--disable-silent-rules' sets the default to verbose, which can be 2163169be4bSmrgoverridden with `make V=0'. 2173169be4bSmrg 218706b6b52SmrgParticular systems 219706b6b52Smrg================== 220706b6b52Smrg 221706b6b52Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222706b6b52SmrgCC is not installed, it is recommended to use the following options in 223706b6b52Smrgorder to use an ANSI C compiler: 224706b6b52Smrg 2253169be4bSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226706b6b52Smrg 227706b6b52Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228706b6b52Smrg 2293169be4bSmrg HP-UX `make' updates targets which have the same time stamps as 2303169be4bSmrgtheir prerequisites, which makes it generally unusable when shipped 2313169be4bSmrggenerated files such as `configure' are involved. Use GNU `make' 2323169be4bSmrginstead. 2333169be4bSmrg 234706b6b52Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235706b6b52Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236706b6b52Smrga workaround. If GNU CC is not installed, it is therefore recommended 237706b6b52Smrgto try 238706b6b52Smrg 239706b6b52Smrg ./configure CC="cc" 240706b6b52Smrg 241706b6b52Smrgand if that doesn't work, try 242706b6b52Smrg 243706b6b52Smrg ./configure CC="cc -nodtk" 244706b6b52Smrg 2453169be4bSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2463169be4bSmrgdirectory contains several dysfunctional programs; working variants of 2473169be4bSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2483169be4bSmrgin your `PATH', put it _after_ `/usr/bin'. 2493169be4bSmrg 2503169be4bSmrg On Haiku, software installed for all users goes in `/boot/common', 2513169be4bSmrgnot `/usr/local'. It is recommended to use the following options: 2523169be4bSmrg 2533169be4bSmrg ./configure --prefix=/boot/common 2543169be4bSmrg 255706b6b52SmrgSpecifying the System Type 256706b6b52Smrg========================== 257706b6b52Smrg 258706b6b52Smrg There may be some features `configure' cannot figure out 259706b6b52Smrgautomatically, but needs to determine by the type of machine the package 260706b6b52Smrgwill run on. Usually, assuming the package is built to be run on the 261706b6b52Smrg_same_ architectures, `configure' can figure that out, but if it prints 262706b6b52Smrga message saying it cannot guess the machine type, give it the 263706b6b52Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264706b6b52Smrgtype, such as `sun4', or a canonical name which has the form: 265706b6b52Smrg 266706b6b52Smrg CPU-COMPANY-SYSTEM 267706b6b52Smrg 268706b6b52Smrgwhere SYSTEM can have one of these forms: 269706b6b52Smrg 2703169be4bSmrg OS 2713169be4bSmrg KERNEL-OS 272706b6b52Smrg 273706b6b52Smrg See the file `config.sub' for the possible values of each field. If 274706b6b52Smrg`config.sub' isn't included in this package, then this package doesn't 275706b6b52Smrgneed to know the machine type. 276706b6b52Smrg 277706b6b52Smrg If you are _building_ compiler tools for cross-compiling, you should 278706b6b52Smrguse the option `--target=TYPE' to select the type of system they will 279706b6b52Smrgproduce code for. 280706b6b52Smrg 281706b6b52Smrg If you want to _use_ a cross compiler, that generates code for a 282706b6b52Smrgplatform different from the build platform, you should specify the 283706b6b52Smrg"host" platform (i.e., that on which the generated programs will 284706b6b52Smrgeventually be run) with `--host=TYPE'. 285706b6b52Smrg 286706b6b52SmrgSharing Defaults 287706b6b52Smrg================ 288706b6b52Smrg 289706b6b52Smrg If you want to set default values for `configure' scripts to share, 290706b6b52Smrgyou can create a site shell script called `config.site' that gives 291706b6b52Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292706b6b52Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293706b6b52Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294706b6b52Smrg`CONFIG_SITE' environment variable to the location of the site script. 295706b6b52SmrgA warning: not all `configure' scripts look for a site script. 296706b6b52Smrg 297706b6b52SmrgDefining Variables 298706b6b52Smrg================== 299706b6b52Smrg 300706b6b52Smrg Variables not defined in a site shell script can be set in the 301706b6b52Smrgenvironment passed to `configure'. However, some packages may run 302706b6b52Smrgconfigure again during the build, and the customized values of these 303706b6b52Smrgvariables may be lost. In order to avoid this problem, you should set 304706b6b52Smrgthem in the `configure' command line, using `VAR=value'. For example: 305706b6b52Smrg 306706b6b52Smrg ./configure CC=/usr/local2/bin/gcc 307706b6b52Smrg 308706b6b52Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309706b6b52Smrgoverridden in the site shell script). 310706b6b52Smrg 311706b6b52SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312706b6b52Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313706b6b52Smrg 314706b6b52Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315706b6b52Smrg 316706b6b52Smrg`configure' Invocation 317706b6b52Smrg====================== 318706b6b52Smrg 319706b6b52Smrg `configure' recognizes the following options to control how it 320706b6b52Smrgoperates. 321706b6b52Smrg 322706b6b52Smrg`--help' 323706b6b52Smrg`-h' 324706b6b52Smrg Print a summary of all of the options to `configure', and exit. 325706b6b52Smrg 326706b6b52Smrg`--help=short' 327706b6b52Smrg`--help=recursive' 328706b6b52Smrg Print a summary of the options unique to this package's 329706b6b52Smrg `configure', and exit. The `short' variant lists options used 330706b6b52Smrg only in the top level, while the `recursive' variant lists options 331706b6b52Smrg also present in any nested packages. 332706b6b52Smrg 333706b6b52Smrg`--version' 334706b6b52Smrg`-V' 335706b6b52Smrg Print the version of Autoconf used to generate the `configure' 336706b6b52Smrg script, and exit. 337706b6b52Smrg 338706b6b52Smrg`--cache-file=FILE' 339706b6b52Smrg Enable the cache: use and save the results of the tests in FILE, 340706b6b52Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341706b6b52Smrg disable caching. 342706b6b52Smrg 343706b6b52Smrg`--config-cache' 344706b6b52Smrg`-C' 345706b6b52Smrg Alias for `--cache-file=config.cache'. 346706b6b52Smrg 347706b6b52Smrg`--quiet' 348706b6b52Smrg`--silent' 349706b6b52Smrg`-q' 350706b6b52Smrg Do not print messages saying which checks are being made. To 351706b6b52Smrg suppress all normal output, redirect it to `/dev/null' (any error 352706b6b52Smrg messages will still be shown). 353706b6b52Smrg 354706b6b52Smrg`--srcdir=DIR' 355706b6b52Smrg Look for the package's source code in directory DIR. Usually 356706b6b52Smrg `configure' can determine that directory automatically. 357706b6b52Smrg 358706b6b52Smrg`--prefix=DIR' 3593169be4bSmrg Use DIR as the installation prefix. *note Installation Names:: 360706b6b52Smrg for more details, including other options available for fine-tuning 361706b6b52Smrg the installation locations. 362706b6b52Smrg 363706b6b52Smrg`--no-create' 364706b6b52Smrg`-n' 365706b6b52Smrg Run the configure checks, but stop before creating any output 366706b6b52Smrg files. 367706b6b52Smrg 368706b6b52Smrg`configure' also accepts some other, not widely useful, options. Run 369706b6b52Smrg`configure --help' for more details. 370b042e37fSmrg 371