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