1863f95b1SmrgInstallation Instructions 2863f95b1Smrg************************* 3863f95b1Smrg 40c91c449SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 50c91c449SmrgInc. 6863f95b1Smrg 70c91c449Smrg Copying and distribution of this file, with or without modification, 80c91c449Smrgare permitted in any medium without royalty provided the copyright 90c91c449Smrgnotice and this notice are preserved. This file is offered as-is, 100c91c449Smrgwithout warranty of any kind. 11863f95b1Smrg 12863f95b1SmrgBasic Installation 13863f95b1Smrg================== 14863f95b1Smrg 15863f95b1Smrg Briefly, the shell commands `./configure; make; make install' should 16863f95b1Smrgconfigure, build, and install this package. The following 17863f95b1Smrgmore-detailed instructions are generic; see the `README' file for 180c91c449Smrginstructions specific to this package. Some packages provide this 190c91c449Smrg`INSTALL' file but do not implement all of the features documented 200c91c449Smrgbelow. The lack of an optional feature in a given package is not 210c91c449Smrgnecessarily a bug. More recommendations for GNU packages can be found 220c91c449Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23863f95b1Smrg 24863f95b1Smrg The `configure' shell script attempts to guess correct values for 25863f95b1Smrgvarious system-dependent variables used during compilation. It uses 26863f95b1Smrgthose values to create a `Makefile' in each directory of the package. 27863f95b1SmrgIt may also create one or more `.h' files containing system-dependent 28863f95b1Smrgdefinitions. Finally, it creates a shell script `config.status' that 29863f95b1Smrgyou can run in the future to recreate the current configuration, and a 30863f95b1Smrgfile `config.log' containing compiler output (useful mainly for 31863f95b1Smrgdebugging `configure'). 32863f95b1Smrg 33863f95b1Smrg It can also use an optional file (typically called `config.cache' 34863f95b1Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35863f95b1Smrgthe results of its tests to speed up reconfiguring. Caching is 36863f95b1Smrgdisabled by default to prevent problems with accidental use of stale 37863f95b1Smrgcache files. 38863f95b1Smrg 39863f95b1Smrg If you need to do unusual things to compile the package, please try 40863f95b1Smrgto figure out how `configure' could check whether to do them, and mail 41863f95b1Smrgdiffs or instructions to the address given in the `README' so they can 42863f95b1Smrgbe considered for the next release. If you are using the cache, and at 43863f95b1Smrgsome point `config.cache' contains results you don't want to keep, you 44863f95b1Smrgmay remove or edit it. 45863f95b1Smrg 46863f95b1Smrg The file `configure.ac' (or `configure.in') is used to create 47863f95b1Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48863f95b1Smrgyou want to change it or regenerate `configure' using a newer version 49863f95b1Smrgof `autoconf'. 50863f95b1Smrg 510c91c449Smrg The simplest way to compile this package is: 52863f95b1Smrg 53863f95b1Smrg 1. `cd' to the directory containing the package's source code and type 54863f95b1Smrg `./configure' to configure the package for your system. 55863f95b1Smrg 56863f95b1Smrg Running `configure' might take a while. While running, it prints 57863f95b1Smrg some messages telling which features it is checking for. 58863f95b1Smrg 59863f95b1Smrg 2. Type `make' to compile the package. 60863f95b1Smrg 61863f95b1Smrg 3. Optionally, type `make check' to run any self-tests that come with 620c91c449Smrg the package, generally using the just-built uninstalled binaries. 63863f95b1Smrg 64863f95b1Smrg 4. Type `make install' to install the programs and any data files and 650c91c449Smrg documentation. When installing into a prefix owned by root, it is 660c91c449Smrg recommended that the package be configured and built as a regular 670c91c449Smrg user, and only the `make install' phase executed with root 680c91c449Smrg privileges. 690c91c449Smrg 700c91c449Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 710c91c449Smrg this time using the binaries in their final installed location. 720c91c449Smrg This target does not install anything. Running this target as a 730c91c449Smrg regular user, particularly if the prior `make install' required 740c91c449Smrg root privileges, verifies that the installation completed 750c91c449Smrg correctly. 760c91c449Smrg 770c91c449Smrg 6. You can remove the program binaries and object files from the 78863f95b1Smrg source code directory by typing `make clean'. To also remove the 79863f95b1Smrg files that `configure' created (so you can compile the package for 80863f95b1Smrg a different kind of computer), type `make distclean'. There is 81863f95b1Smrg also a `make maintainer-clean' target, but that is intended mainly 82863f95b1Smrg for the package's developers. If you use it, you may have to get 83863f95b1Smrg all sorts of other programs in order to regenerate files that came 84863f95b1Smrg with the distribution. 85863f95b1Smrg 860c91c449Smrg 7. Often, you can also type `make uninstall' to remove the installed 870c91c449Smrg files again. In practice, not all packages have tested that 880c91c449Smrg uninstallation works correctly, even though it is required by the 890c91c449Smrg GNU Coding Standards. 900c91c449Smrg 910c91c449Smrg 8. Some packages, particularly those that use Automake, provide `make 920c91c449Smrg distcheck', which can by used by developers to test that all other 930c91c449Smrg targets like `make install' and `make uninstall' work correctly. 940c91c449Smrg This target is generally not run by end users. 95863f95b1Smrg 96863f95b1SmrgCompilers and Options 97863f95b1Smrg===================== 98863f95b1Smrg 99863f95b1Smrg Some systems require unusual options for compilation or linking that 100863f95b1Smrgthe `configure' script does not know about. Run `./configure --help' 101863f95b1Smrgfor details on some of the pertinent environment variables. 102863f95b1Smrg 103863f95b1Smrg You can give `configure' initial values for configuration parameters 104863f95b1Smrgby setting variables in the command line or in the environment. Here 105863f95b1Smrgis an example: 106863f95b1Smrg 107863f95b1Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108863f95b1Smrg 109863f95b1Smrg *Note Defining Variables::, for more details. 110863f95b1Smrg 111863f95b1SmrgCompiling For Multiple Architectures 112863f95b1Smrg==================================== 113863f95b1Smrg 114863f95b1Smrg You can compile the package for more than one kind of computer at the 115863f95b1Smrgsame time, by placing the object files for each architecture in their 116863f95b1Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117863f95b1Smrgdirectory where you want the object files and executables to go and run 118863f95b1Smrgthe `configure' script. `configure' automatically checks for the 1190c91c449Smrgsource code in the directory that `configure' is in and in `..'. This 1200c91c449Smrgis known as a "VPATH" build. 121863f95b1Smrg 122863f95b1Smrg With a non-GNU `make', it is safer to compile the package for one 123863f95b1Smrgarchitecture at a time in the source code directory. After you have 124863f95b1Smrginstalled the package for one architecture, use `make distclean' before 125863f95b1Smrgreconfiguring for another architecture. 126863f95b1Smrg 127863f95b1Smrg On MacOS X 10.5 and later systems, you can create libraries and 128863f95b1Smrgexecutables that work on multiple system types--known as "fat" or 129863f95b1Smrg"universal" binaries--by specifying multiple `-arch' options to the 130863f95b1Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131863f95b1Smrgthis: 132863f95b1Smrg 133863f95b1Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134863f95b1Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135863f95b1Smrg CPP="gcc -E" CXXCPP="g++ -E" 136863f95b1Smrg 137863f95b1Smrg This is not guaranteed to produce working output in all cases, you 138863f95b1Smrgmay have to build one architecture at a time and combine the results 139863f95b1Smrgusing the `lipo' tool if you have problems. 140863f95b1Smrg 141863f95b1SmrgInstallation Names 142863f95b1Smrg================== 143863f95b1Smrg 144863f95b1Smrg By default, `make install' installs the package's commands under 145863f95b1Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146863f95b1Smrgcan specify an installation prefix other than `/usr/local' by giving 1470c91c449Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1480c91c449Smrgabsolute file name. 149863f95b1Smrg 150863f95b1Smrg You can specify separate installation prefixes for 151863f95b1Smrgarchitecture-specific files and architecture-independent files. If you 152863f95b1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153863f95b1SmrgPREFIX as the prefix for installing programs and libraries. 154863f95b1SmrgDocumentation and other data files still use the regular prefix. 155863f95b1Smrg 156863f95b1Smrg In addition, if you use an unusual directory layout you can give 157863f95b1Smrgoptions like `--bindir=DIR' to specify different values for particular 158863f95b1Smrgkinds of files. Run `configure --help' for a list of the directories 1590c91c449Smrgyou can set and what kinds of files go in them. In general, the 1600c91c449Smrgdefault for these options is expressed in terms of `${prefix}', so that 1610c91c449Smrgspecifying just `--prefix' will affect all of the other directory 1620c91c449Smrgspecifications that were not explicitly provided. 1630c91c449Smrg 1640c91c449Smrg The most portable way to affect installation locations is to pass the 1650c91c449Smrgcorrect locations to `configure'; however, many packages provide one or 1660c91c449Smrgboth of the following shortcuts of passing variable assignments to the 1670c91c449Smrg`make install' command line to change installation locations without 1680c91c449Smrghaving to reconfigure or recompile. 1690c91c449Smrg 1700c91c449Smrg The first method involves providing an override variable for each 1710c91c449Smrgaffected directory. For example, `make install 1720c91c449Smrgprefix=/alternate/directory' will choose an alternate location for all 1730c91c449Smrgdirectory configuration variables that were expressed in terms of 1740c91c449Smrg`${prefix}'. Any directories that were specified during `configure', 1750c91c449Smrgbut not in terms of `${prefix}', must each be overridden at install 1760c91c449Smrgtime for the entire installation to be relocated. The approach of 1770c91c449Smrgmakefile variable overrides for each directory variable is required by 1780c91c449Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1790c91c449SmrgHowever, some platforms have known limitations with the semantics of 1800c91c449Smrgshared libraries that end up requiring recompilation when using this 1810c91c449Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1820c91c449Smrg 1830c91c449Smrg The second method involves providing the `DESTDIR' variable. For 1840c91c449Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1850c91c449Smrg`/alternate/directory' before all installation names. The approach of 1860c91c449Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1870c91c449Smrgdoes not work on platforms that have drive letters. On the other hand, 1880c91c449Smrgit does better at avoiding recompilation issues, and works well even 1890c91c449Smrgwhen some directory options were not specified in terms of `${prefix}' 1900c91c449Smrgat `configure' time. 1910c91c449Smrg 1920c91c449SmrgOptional Features 1930c91c449Smrg================= 194863f95b1Smrg 195863f95b1Smrg If the package supports it, you can cause programs to be installed 196863f95b1Smrgwith an extra prefix or suffix on their names by giving `configure' the 197863f95b1Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198863f95b1Smrg 199863f95b1Smrg Some packages pay attention to `--enable-FEATURE' options to 200863f95b1Smrg`configure', where FEATURE indicates an optional part of the package. 201863f95b1SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202863f95b1Smrgis something like `gnu-as' or `x' (for the X Window System). The 203863f95b1Smrg`README' should mention any `--enable-' and `--with-' options that the 204863f95b1Smrgpackage recognizes. 205863f95b1Smrg 206863f95b1Smrg For packages that use the X Window System, `configure' can usually 207863f95b1Smrgfind the X include and library files automatically, but if it doesn't, 208863f95b1Smrgyou can use the `configure' options `--x-includes=DIR' and 209863f95b1Smrg`--x-libraries=DIR' to specify their locations. 210863f95b1Smrg 2110c91c449Smrg Some packages offer the ability to configure how verbose the 2120c91c449Smrgexecution of `make' will be. For these packages, running `./configure 2130c91c449Smrg--enable-silent-rules' sets the default to minimal output, which can be 2140c91c449Smrgoverridden with `make V=1'; while running `./configure 2150c91c449Smrg--disable-silent-rules' sets the default to verbose, which can be 2160c91c449Smrgoverridden with `make V=0'. 2170c91c449Smrg 218863f95b1SmrgParticular systems 219863f95b1Smrg================== 220863f95b1Smrg 221863f95b1Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222863f95b1SmrgCC is not installed, it is recommended to use the following options in 223863f95b1Smrgorder to use an ANSI C compiler: 224863f95b1Smrg 2250c91c449Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226863f95b1Smrg 227863f95b1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228863f95b1Smrg 2290c91c449Smrg HP-UX `make' updates targets which have the same time stamps as 2300c91c449Smrgtheir prerequisites, which makes it generally unusable when shipped 2310c91c449Smrggenerated files such as `configure' are involved. Use GNU `make' 2320c91c449Smrginstead. 2330c91c449Smrg 234863f95b1Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235863f95b1Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236863f95b1Smrga workaround. If GNU CC is not installed, it is therefore recommended 237863f95b1Smrgto try 238863f95b1Smrg 239863f95b1Smrg ./configure CC="cc" 240863f95b1Smrg 241863f95b1Smrgand if that doesn't work, try 242863f95b1Smrg 243863f95b1Smrg ./configure CC="cc -nodtk" 244863f95b1Smrg 2450c91c449Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2460c91c449Smrgdirectory contains several dysfunctional programs; working variants of 2470c91c449Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2480c91c449Smrgin your `PATH', put it _after_ `/usr/bin'. 2490c91c449Smrg 2500c91c449Smrg On Haiku, software installed for all users goes in `/boot/common', 2510c91c449Smrgnot `/usr/local'. It is recommended to use the following options: 2520c91c449Smrg 2530c91c449Smrg ./configure --prefix=/boot/common 2540c91c449Smrg 255863f95b1SmrgSpecifying the System Type 256863f95b1Smrg========================== 257863f95b1Smrg 258863f95b1Smrg There may be some features `configure' cannot figure out 259863f95b1Smrgautomatically, but needs to determine by the type of machine the package 260863f95b1Smrgwill run on. Usually, assuming the package is built to be run on the 261863f95b1Smrg_same_ architectures, `configure' can figure that out, but if it prints 262863f95b1Smrga message saying it cannot guess the machine type, give it the 263863f95b1Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264863f95b1Smrgtype, such as `sun4', or a canonical name which has the form: 265863f95b1Smrg 266863f95b1Smrg CPU-COMPANY-SYSTEM 267863f95b1Smrg 268863f95b1Smrgwhere SYSTEM can have one of these forms: 269863f95b1Smrg 2700c91c449Smrg OS 2710c91c449Smrg KERNEL-OS 272863f95b1Smrg 273863f95b1Smrg See the file `config.sub' for the possible values of each field. If 274863f95b1Smrg`config.sub' isn't included in this package, then this package doesn't 275863f95b1Smrgneed to know the machine type. 276863f95b1Smrg 277863f95b1Smrg If you are _building_ compiler tools for cross-compiling, you should 278863f95b1Smrguse the option `--target=TYPE' to select the type of system they will 279863f95b1Smrgproduce code for. 280863f95b1Smrg 281863f95b1Smrg If you want to _use_ a cross compiler, that generates code for a 282863f95b1Smrgplatform different from the build platform, you should specify the 283863f95b1Smrg"host" platform (i.e., that on which the generated programs will 284863f95b1Smrgeventually be run) with `--host=TYPE'. 285863f95b1Smrg 286863f95b1SmrgSharing Defaults 287863f95b1Smrg================ 288863f95b1Smrg 289863f95b1Smrg If you want to set default values for `configure' scripts to share, 290863f95b1Smrgyou can create a site shell script called `config.site' that gives 291863f95b1Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292863f95b1Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293863f95b1Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294863f95b1Smrg`CONFIG_SITE' environment variable to the location of the site script. 295863f95b1SmrgA warning: not all `configure' scripts look for a site script. 296863f95b1Smrg 297863f95b1SmrgDefining Variables 298863f95b1Smrg================== 299863f95b1Smrg 300863f95b1Smrg Variables not defined in a site shell script can be set in the 301863f95b1Smrgenvironment passed to `configure'. However, some packages may run 302863f95b1Smrgconfigure again during the build, and the customized values of these 303863f95b1Smrgvariables may be lost. In order to avoid this problem, you should set 304863f95b1Smrgthem in the `configure' command line, using `VAR=value'. For example: 305863f95b1Smrg 306863f95b1Smrg ./configure CC=/usr/local2/bin/gcc 307863f95b1Smrg 308863f95b1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309863f95b1Smrgoverridden in the site shell script). 310863f95b1Smrg 311863f95b1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312863f95b1Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313863f95b1Smrg 314863f95b1Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315863f95b1Smrg 316863f95b1Smrg`configure' Invocation 317863f95b1Smrg====================== 318863f95b1Smrg 319863f95b1Smrg `configure' recognizes the following options to control how it 320863f95b1Smrgoperates. 321863f95b1Smrg 322863f95b1Smrg`--help' 323863f95b1Smrg`-h' 324863f95b1Smrg Print a summary of all of the options to `configure', and exit. 325863f95b1Smrg 326863f95b1Smrg`--help=short' 327863f95b1Smrg`--help=recursive' 328863f95b1Smrg Print a summary of the options unique to this package's 329863f95b1Smrg `configure', and exit. The `short' variant lists options used 330863f95b1Smrg only in the top level, while the `recursive' variant lists options 331863f95b1Smrg also present in any nested packages. 332863f95b1Smrg 333863f95b1Smrg`--version' 334863f95b1Smrg`-V' 335863f95b1Smrg Print the version of Autoconf used to generate the `configure' 336863f95b1Smrg script, and exit. 337863f95b1Smrg 338863f95b1Smrg`--cache-file=FILE' 339863f95b1Smrg Enable the cache: use and save the results of the tests in FILE, 340863f95b1Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341863f95b1Smrg disable caching. 342863f95b1Smrg 343863f95b1Smrg`--config-cache' 344863f95b1Smrg`-C' 345863f95b1Smrg Alias for `--cache-file=config.cache'. 346863f95b1Smrg 347863f95b1Smrg`--quiet' 348863f95b1Smrg`--silent' 349863f95b1Smrg`-q' 350863f95b1Smrg Do not print messages saying which checks are being made. To 351863f95b1Smrg suppress all normal output, redirect it to `/dev/null' (any error 352863f95b1Smrg messages will still be shown). 353863f95b1Smrg 354863f95b1Smrg`--srcdir=DIR' 355863f95b1Smrg Look for the package's source code in directory DIR. Usually 356863f95b1Smrg `configure' can determine that directory automatically. 357863f95b1Smrg 358863f95b1Smrg`--prefix=DIR' 3590c91c449Smrg Use DIR as the installation prefix. *note Installation Names:: 360863f95b1Smrg for more details, including other options available for fine-tuning 361863f95b1Smrg the installation locations. 362863f95b1Smrg 363863f95b1Smrg`--no-create' 364863f95b1Smrg`-n' 365863f95b1Smrg Run the configure checks, but stop before creating any output 366863f95b1Smrg files. 367863f95b1Smrg 368863f95b1Smrg`configure' also accepts some other, not widely useful, options. Run 369863f95b1Smrg`configure --help' for more details. 370863f95b1Smrg 371