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