1d5c3dbf1SmrgInstallation Instructions 2d5c3dbf1Smrg************************* 3d5c3dbf1Smrg 4949d0342SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5949d0342SmrgInc. 6d5c3dbf1Smrg 7949d0342Smrg Copying and distribution of this file, with or without modification, 8949d0342Smrgare permitted in any medium without royalty provided the copyright 9949d0342Smrgnotice and this notice are preserved. This file is offered as-is, 10949d0342Smrgwithout warranty of any kind. 11d5c3dbf1Smrg 12d5c3dbf1SmrgBasic Installation 13d5c3dbf1Smrg================== 14d5c3dbf1Smrg 15d5c3dbf1Smrg Briefly, the shell commands `./configure; make; make install' should 16d5c3dbf1Smrgconfigure, build, and install this package. The following 17d5c3dbf1Smrgmore-detailed instructions are generic; see the `README' file for 18949d0342Smrginstructions specific to this package. Some packages provide this 19949d0342Smrg`INSTALL' file but do not implement all of the features documented 20949d0342Smrgbelow. The lack of an optional feature in a given package is not 21949d0342Smrgnecessarily a bug. More recommendations for GNU packages can be found 22949d0342Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23d5c3dbf1Smrg 24d5c3dbf1Smrg The `configure' shell script attempts to guess correct values for 25d5c3dbf1Smrgvarious system-dependent variables used during compilation. It uses 26d5c3dbf1Smrgthose values to create a `Makefile' in each directory of the package. 27d5c3dbf1SmrgIt may also create one or more `.h' files containing system-dependent 28d5c3dbf1Smrgdefinitions. Finally, it creates a shell script `config.status' that 29d5c3dbf1Smrgyou can run in the future to recreate the current configuration, and a 30d5c3dbf1Smrgfile `config.log' containing compiler output (useful mainly for 31d5c3dbf1Smrgdebugging `configure'). 32d5c3dbf1Smrg 33d5c3dbf1Smrg It can also use an optional file (typically called `config.cache' 34d5c3dbf1Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35d5c3dbf1Smrgthe results of its tests to speed up reconfiguring. Caching is 36d5c3dbf1Smrgdisabled by default to prevent problems with accidental use of stale 37d5c3dbf1Smrgcache files. 38d5c3dbf1Smrg 39d5c3dbf1Smrg If you need to do unusual things to compile the package, please try 40d5c3dbf1Smrgto figure out how `configure' could check whether to do them, and mail 41d5c3dbf1Smrgdiffs or instructions to the address given in the `README' so they can 42d5c3dbf1Smrgbe considered for the next release. If you are using the cache, and at 43d5c3dbf1Smrgsome point `config.cache' contains results you don't want to keep, you 44d5c3dbf1Smrgmay remove or edit it. 45d5c3dbf1Smrg 46d5c3dbf1Smrg The file `configure.ac' (or `configure.in') is used to create 47d5c3dbf1Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48d5c3dbf1Smrgyou want to change it or regenerate `configure' using a newer version 49d5c3dbf1Smrgof `autoconf'. 50d5c3dbf1Smrg 51949d0342Smrg The simplest way to compile this package is: 52d5c3dbf1Smrg 53d5c3dbf1Smrg 1. `cd' to the directory containing the package's source code and type 54d5c3dbf1Smrg `./configure' to configure the package for your system. 55d5c3dbf1Smrg 56d5c3dbf1Smrg Running `configure' might take a while. While running, it prints 57d5c3dbf1Smrg some messages telling which features it is checking for. 58d5c3dbf1Smrg 59d5c3dbf1Smrg 2. Type `make' to compile the package. 60d5c3dbf1Smrg 61d5c3dbf1Smrg 3. Optionally, type `make check' to run any self-tests that come with 62949d0342Smrg the package, generally using the just-built uninstalled binaries. 63d5c3dbf1Smrg 64d5c3dbf1Smrg 4. Type `make install' to install the programs and any data files and 65949d0342Smrg documentation. When installing into a prefix owned by root, it is 66949d0342Smrg recommended that the package be configured and built as a regular 67949d0342Smrg user, and only the `make install' phase executed with root 68949d0342Smrg privileges. 69949d0342Smrg 70949d0342Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71949d0342Smrg this time using the binaries in their final installed location. 72949d0342Smrg This target does not install anything. Running this target as a 73949d0342Smrg regular user, particularly if the prior `make install' required 74949d0342Smrg root privileges, verifies that the installation completed 75949d0342Smrg correctly. 76949d0342Smrg 77949d0342Smrg 6. You can remove the program binaries and object files from the 78d5c3dbf1Smrg source code directory by typing `make clean'. To also remove the 79d5c3dbf1Smrg files that `configure' created (so you can compile the package for 80d5c3dbf1Smrg a different kind of computer), type `make distclean'. There is 81d5c3dbf1Smrg also a `make maintainer-clean' target, but that is intended mainly 82d5c3dbf1Smrg for the package's developers. If you use it, you may have to get 83d5c3dbf1Smrg all sorts of other programs in order to regenerate files that came 84d5c3dbf1Smrg with the distribution. 85d5c3dbf1Smrg 86949d0342Smrg 7. Often, you can also type `make uninstall' to remove the installed 87949d0342Smrg files again. In practice, not all packages have tested that 88949d0342Smrg uninstallation works correctly, even though it is required by the 89949d0342Smrg GNU Coding Standards. 90949d0342Smrg 91949d0342Smrg 8. Some packages, particularly those that use Automake, provide `make 92949d0342Smrg distcheck', which can by used by developers to test that all other 93949d0342Smrg targets like `make install' and `make uninstall' work correctly. 94949d0342Smrg This target is generally not run by end users. 95d5c3dbf1Smrg 96d5c3dbf1SmrgCompilers and Options 97d5c3dbf1Smrg===================== 98d5c3dbf1Smrg 99d5c3dbf1Smrg Some systems require unusual options for compilation or linking that 100d5c3dbf1Smrgthe `configure' script does not know about. Run `./configure --help' 101d5c3dbf1Smrgfor details on some of the pertinent environment variables. 102d5c3dbf1Smrg 103d5c3dbf1Smrg You can give `configure' initial values for configuration parameters 104d5c3dbf1Smrgby setting variables in the command line or in the environment. Here 105d5c3dbf1Smrgis an example: 106d5c3dbf1Smrg 107d5c3dbf1Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108d5c3dbf1Smrg 109d5c3dbf1Smrg *Note Defining Variables::, for more details. 110d5c3dbf1Smrg 111d5c3dbf1SmrgCompiling For Multiple Architectures 112d5c3dbf1Smrg==================================== 113d5c3dbf1Smrg 114d5c3dbf1Smrg You can compile the package for more than one kind of computer at the 115d5c3dbf1Smrgsame time, by placing the object files for each architecture in their 116d5c3dbf1Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117d5c3dbf1Smrgdirectory where you want the object files and executables to go and run 118d5c3dbf1Smrgthe `configure' script. `configure' automatically checks for the 119949d0342Smrgsource code in the directory that `configure' is in and in `..'. This 120949d0342Smrgis known as a "VPATH" build. 121d5c3dbf1Smrg 122d5c3dbf1Smrg With a non-GNU `make', it is safer to compile the package for one 123d5c3dbf1Smrgarchitecture at a time in the source code directory. After you have 124d5c3dbf1Smrginstalled the package for one architecture, use `make distclean' before 125d5c3dbf1Smrgreconfiguring for another architecture. 126d5c3dbf1Smrg 127d5c3dbf1Smrg On MacOS X 10.5 and later systems, you can create libraries and 128d5c3dbf1Smrgexecutables that work on multiple system types--known as "fat" or 129d5c3dbf1Smrg"universal" binaries--by specifying multiple `-arch' options to the 130d5c3dbf1Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131d5c3dbf1Smrgthis: 132d5c3dbf1Smrg 133d5c3dbf1Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134d5c3dbf1Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135d5c3dbf1Smrg CPP="gcc -E" CXXCPP="g++ -E" 136d5c3dbf1Smrg 137d5c3dbf1Smrg This is not guaranteed to produce working output in all cases, you 138d5c3dbf1Smrgmay have to build one architecture at a time and combine the results 139d5c3dbf1Smrgusing the `lipo' tool if you have problems. 140d5c3dbf1Smrg 141d5c3dbf1SmrgInstallation Names 142d5c3dbf1Smrg================== 143d5c3dbf1Smrg 144d5c3dbf1Smrg By default, `make install' installs the package's commands under 145d5c3dbf1Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146d5c3dbf1Smrgcan specify an installation prefix other than `/usr/local' by giving 147949d0342Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148949d0342Smrgabsolute file name. 149d5c3dbf1Smrg 150d5c3dbf1Smrg You can specify separate installation prefixes for 151d5c3dbf1Smrgarchitecture-specific files and architecture-independent files. If you 152d5c3dbf1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153d5c3dbf1SmrgPREFIX as the prefix for installing programs and libraries. 154d5c3dbf1SmrgDocumentation and other data files still use the regular prefix. 155d5c3dbf1Smrg 156d5c3dbf1Smrg In addition, if you use an unusual directory layout you can give 157d5c3dbf1Smrgoptions like `--bindir=DIR' to specify different values for particular 158d5c3dbf1Smrgkinds of files. Run `configure --help' for a list of the directories 159949d0342Smrgyou can set and what kinds of files go in them. In general, the 160949d0342Smrgdefault for these options is expressed in terms of `${prefix}', so that 161949d0342Smrgspecifying just `--prefix' will affect all of the other directory 162949d0342Smrgspecifications that were not explicitly provided. 163949d0342Smrg 164949d0342Smrg The most portable way to affect installation locations is to pass the 165949d0342Smrgcorrect locations to `configure'; however, many packages provide one or 166949d0342Smrgboth of the following shortcuts of passing variable assignments to the 167949d0342Smrg`make install' command line to change installation locations without 168949d0342Smrghaving to reconfigure or recompile. 169949d0342Smrg 170949d0342Smrg The first method involves providing an override variable for each 171949d0342Smrgaffected directory. For example, `make install 172949d0342Smrgprefix=/alternate/directory' will choose an alternate location for all 173949d0342Smrgdirectory configuration variables that were expressed in terms of 174949d0342Smrg`${prefix}'. Any directories that were specified during `configure', 175949d0342Smrgbut not in terms of `${prefix}', must each be overridden at install 176949d0342Smrgtime for the entire installation to be relocated. The approach of 177949d0342Smrgmakefile variable overrides for each directory variable is required by 178949d0342Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179949d0342SmrgHowever, some platforms have known limitations with the semantics of 180949d0342Smrgshared libraries that end up requiring recompilation when using this 181949d0342Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182949d0342Smrg 183949d0342Smrg The second method involves providing the `DESTDIR' variable. For 184949d0342Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185949d0342Smrg`/alternate/directory' before all installation names. The approach of 186949d0342Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187949d0342Smrgdoes not work on platforms that have drive letters. On the other hand, 188949d0342Smrgit does better at avoiding recompilation issues, and works well even 189949d0342Smrgwhen some directory options were not specified in terms of `${prefix}' 190949d0342Smrgat `configure' time. 191949d0342Smrg 192949d0342SmrgOptional Features 193949d0342Smrg================= 194d5c3dbf1Smrg 195d5c3dbf1Smrg If the package supports it, you can cause programs to be installed 196d5c3dbf1Smrgwith an extra prefix or suffix on their names by giving `configure' the 197d5c3dbf1Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198d5c3dbf1Smrg 199d5c3dbf1Smrg Some packages pay attention to `--enable-FEATURE' options to 200d5c3dbf1Smrg`configure', where FEATURE indicates an optional part of the package. 201d5c3dbf1SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202d5c3dbf1Smrgis something like `gnu-as' or `x' (for the X Window System). The 203d5c3dbf1Smrg`README' should mention any `--enable-' and `--with-' options that the 204d5c3dbf1Smrgpackage recognizes. 205d5c3dbf1Smrg 206d5c3dbf1Smrg For packages that use the X Window System, `configure' can usually 207d5c3dbf1Smrgfind the X include and library files automatically, but if it doesn't, 208d5c3dbf1Smrgyou can use the `configure' options `--x-includes=DIR' and 209d5c3dbf1Smrg`--x-libraries=DIR' to specify their locations. 210d5c3dbf1Smrg 211949d0342Smrg Some packages offer the ability to configure how verbose the 212949d0342Smrgexecution of `make' will be. For these packages, running `./configure 213949d0342Smrg--enable-silent-rules' sets the default to minimal output, which can be 214949d0342Smrgoverridden with `make V=1'; while running `./configure 215949d0342Smrg--disable-silent-rules' sets the default to verbose, which can be 216949d0342Smrgoverridden with `make V=0'. 217949d0342Smrg 218d5c3dbf1SmrgParticular systems 219d5c3dbf1Smrg================== 220d5c3dbf1Smrg 221d5c3dbf1Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222d5c3dbf1SmrgCC is not installed, it is recommended to use the following options in 223d5c3dbf1Smrgorder to use an ANSI C compiler: 224d5c3dbf1Smrg 225949d0342Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226d5c3dbf1Smrg 227d5c3dbf1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228d5c3dbf1Smrg 229949d0342Smrg HP-UX `make' updates targets which have the same time stamps as 230949d0342Smrgtheir prerequisites, which makes it generally unusable when shipped 231949d0342Smrggenerated files such as `configure' are involved. Use GNU `make' 232949d0342Smrginstead. 233949d0342Smrg 234d5c3dbf1Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235d5c3dbf1Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236d5c3dbf1Smrga workaround. If GNU CC is not installed, it is therefore recommended 237d5c3dbf1Smrgto try 238d5c3dbf1Smrg 239d5c3dbf1Smrg ./configure CC="cc" 240d5c3dbf1Smrg 241d5c3dbf1Smrgand if that doesn't work, try 242d5c3dbf1Smrg 243d5c3dbf1Smrg ./configure CC="cc -nodtk" 244d5c3dbf1Smrg 245949d0342Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246949d0342Smrgdirectory contains several dysfunctional programs; working variants of 247949d0342Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248949d0342Smrgin your `PATH', put it _after_ `/usr/bin'. 249949d0342Smrg 250949d0342Smrg On Haiku, software installed for all users goes in `/boot/common', 251949d0342Smrgnot `/usr/local'. It is recommended to use the following options: 252949d0342Smrg 253949d0342Smrg ./configure --prefix=/boot/common 254949d0342Smrg 255d5c3dbf1SmrgSpecifying the System Type 256d5c3dbf1Smrg========================== 257d5c3dbf1Smrg 258d5c3dbf1Smrg There may be some features `configure' cannot figure out 259d5c3dbf1Smrgautomatically, but needs to determine by the type of machine the package 260d5c3dbf1Smrgwill run on. Usually, assuming the package is built to be run on the 261d5c3dbf1Smrg_same_ architectures, `configure' can figure that out, but if it prints 262d5c3dbf1Smrga message saying it cannot guess the machine type, give it the 263d5c3dbf1Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264d5c3dbf1Smrgtype, such as `sun4', or a canonical name which has the form: 265d5c3dbf1Smrg 266d5c3dbf1Smrg CPU-COMPANY-SYSTEM 267d5c3dbf1Smrg 268d5c3dbf1Smrgwhere SYSTEM can have one of these forms: 269d5c3dbf1Smrg 270949d0342Smrg OS 271949d0342Smrg KERNEL-OS 272d5c3dbf1Smrg 273d5c3dbf1Smrg See the file `config.sub' for the possible values of each field. If 274d5c3dbf1Smrg`config.sub' isn't included in this package, then this package doesn't 275d5c3dbf1Smrgneed to know the machine type. 276d5c3dbf1Smrg 277d5c3dbf1Smrg If you are _building_ compiler tools for cross-compiling, you should 278d5c3dbf1Smrguse the option `--target=TYPE' to select the type of system they will 279d5c3dbf1Smrgproduce code for. 280d5c3dbf1Smrg 281d5c3dbf1Smrg If you want to _use_ a cross compiler, that generates code for a 282d5c3dbf1Smrgplatform different from the build platform, you should specify the 283d5c3dbf1Smrg"host" platform (i.e., that on which the generated programs will 284d5c3dbf1Smrgeventually be run) with `--host=TYPE'. 285d5c3dbf1Smrg 286d5c3dbf1SmrgSharing Defaults 287d5c3dbf1Smrg================ 288d5c3dbf1Smrg 289d5c3dbf1Smrg If you want to set default values for `configure' scripts to share, 290d5c3dbf1Smrgyou can create a site shell script called `config.site' that gives 291d5c3dbf1Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292d5c3dbf1Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293d5c3dbf1Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294d5c3dbf1Smrg`CONFIG_SITE' environment variable to the location of the site script. 295d5c3dbf1SmrgA warning: not all `configure' scripts look for a site script. 296d5c3dbf1Smrg 297d5c3dbf1SmrgDefining Variables 298d5c3dbf1Smrg================== 299d5c3dbf1Smrg 300d5c3dbf1Smrg Variables not defined in a site shell script can be set in the 301d5c3dbf1Smrgenvironment passed to `configure'. However, some packages may run 302d5c3dbf1Smrgconfigure again during the build, and the customized values of these 303d5c3dbf1Smrgvariables may be lost. In order to avoid this problem, you should set 304d5c3dbf1Smrgthem in the `configure' command line, using `VAR=value'. For example: 305d5c3dbf1Smrg 306d5c3dbf1Smrg ./configure CC=/usr/local2/bin/gcc 307d5c3dbf1Smrg 308d5c3dbf1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309d5c3dbf1Smrgoverridden in the site shell script). 310d5c3dbf1Smrg 311d5c3dbf1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312d5c3dbf1Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313d5c3dbf1Smrg 314d5c3dbf1Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315d5c3dbf1Smrg 316d5c3dbf1Smrg`configure' Invocation 317d5c3dbf1Smrg====================== 318d5c3dbf1Smrg 319d5c3dbf1Smrg `configure' recognizes the following options to control how it 320d5c3dbf1Smrgoperates. 321d5c3dbf1Smrg 322d5c3dbf1Smrg`--help' 323d5c3dbf1Smrg`-h' 324d5c3dbf1Smrg Print a summary of all of the options to `configure', and exit. 325d5c3dbf1Smrg 326d5c3dbf1Smrg`--help=short' 327d5c3dbf1Smrg`--help=recursive' 328d5c3dbf1Smrg Print a summary of the options unique to this package's 329d5c3dbf1Smrg `configure', and exit. The `short' variant lists options used 330d5c3dbf1Smrg only in the top level, while the `recursive' variant lists options 331d5c3dbf1Smrg also present in any nested packages. 332d5c3dbf1Smrg 333d5c3dbf1Smrg`--version' 334d5c3dbf1Smrg`-V' 335d5c3dbf1Smrg Print the version of Autoconf used to generate the `configure' 336d5c3dbf1Smrg script, and exit. 337d5c3dbf1Smrg 338d5c3dbf1Smrg`--cache-file=FILE' 339d5c3dbf1Smrg Enable the cache: use and save the results of the tests in FILE, 340d5c3dbf1Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341d5c3dbf1Smrg disable caching. 342d5c3dbf1Smrg 343d5c3dbf1Smrg`--config-cache' 344d5c3dbf1Smrg`-C' 345d5c3dbf1Smrg Alias for `--cache-file=config.cache'. 346d5c3dbf1Smrg 347d5c3dbf1Smrg`--quiet' 348d5c3dbf1Smrg`--silent' 349d5c3dbf1Smrg`-q' 350d5c3dbf1Smrg Do not print messages saying which checks are being made. To 351d5c3dbf1Smrg suppress all normal output, redirect it to `/dev/null' (any error 352d5c3dbf1Smrg messages will still be shown). 353d5c3dbf1Smrg 354d5c3dbf1Smrg`--srcdir=DIR' 355d5c3dbf1Smrg Look for the package's source code in directory DIR. Usually 356d5c3dbf1Smrg `configure' can determine that directory automatically. 357d5c3dbf1Smrg 358d5c3dbf1Smrg`--prefix=DIR' 359949d0342Smrg Use DIR as the installation prefix. *note Installation Names:: 360d5c3dbf1Smrg for more details, including other options available for fine-tuning 361d5c3dbf1Smrg the installation locations. 362d5c3dbf1Smrg 363d5c3dbf1Smrg`--no-create' 364d5c3dbf1Smrg`-n' 365d5c3dbf1Smrg Run the configure checks, but stop before creating any output 366d5c3dbf1Smrg files. 367d5c3dbf1Smrg 368d5c3dbf1Smrg`configure' also accepts some other, not widely useful, options. Run 369d5c3dbf1Smrg`configure --help' for more details. 370d5c3dbf1Smrg 371