1b4ee4795SmrgInstallation Instructions 2b4ee4795Smrg************************* 3b4ee4795Smrg 4862bcd1aSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5862bcd1aSmrgInc. 61ab64890Smrg 7862bcd1aSmrg Copying and distribution of this file, with or without modification, 8862bcd1aSmrgare permitted in any medium without royalty provided the copyright 9862bcd1aSmrgnotice and this notice are preserved. This file is offered as-is, 10862bcd1aSmrgwithout warranty of any kind. 111ab64890Smrg 121ab64890SmrgBasic Installation 131ab64890Smrg================== 141ab64890Smrg 15b4ee4795Smrg Briefly, the shell commands `./configure; make; make install' should 16b4ee4795Smrgconfigure, build, and install this package. The following 17b4ee4795Smrgmore-detailed instructions are generic; see the `README' file for 18862bcd1aSmrginstructions specific to this package. Some packages provide this 19862bcd1aSmrg`INSTALL' file but do not implement all of the features documented 20862bcd1aSmrgbelow. The lack of an optional feature in a given package is not 21862bcd1aSmrgnecessarily a bug. More recommendations for GNU packages can be found 22862bcd1aSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 231ab64890Smrg 241ab64890Smrg The `configure' shell script attempts to guess correct values for 251ab64890Smrgvarious system-dependent variables used during compilation. It uses 261ab64890Smrgthose values to create a `Makefile' in each directory of the package. 271ab64890SmrgIt may also create one or more `.h' files containing system-dependent 281ab64890Smrgdefinitions. Finally, it creates a shell script `config.status' that 291ab64890Smrgyou can run in the future to recreate the current configuration, and a 301ab64890Smrgfile `config.log' containing compiler output (useful mainly for 311ab64890Smrgdebugging `configure'). 321ab64890Smrg 331ab64890Smrg It can also use an optional file (typically called `config.cache' 341ab64890Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35b4ee4795Smrgthe results of its tests to speed up reconfiguring. Caching is 361ab64890Smrgdisabled by default to prevent problems with accidental use of stale 37b4ee4795Smrgcache files. 381ab64890Smrg 391ab64890Smrg If you need to do unusual things to compile the package, please try 401ab64890Smrgto figure out how `configure' could check whether to do them, and mail 411ab64890Smrgdiffs or instructions to the address given in the `README' so they can 421ab64890Smrgbe considered for the next release. If you are using the cache, and at 431ab64890Smrgsome point `config.cache' contains results you don't want to keep, you 441ab64890Smrgmay remove or edit it. 451ab64890Smrg 461ab64890Smrg The file `configure.ac' (or `configure.in') is used to create 47b4ee4795Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48b4ee4795Smrgyou want to change it or regenerate `configure' using a newer version 49b4ee4795Smrgof `autoconf'. 501ab64890Smrg 51862bcd1aSmrg The simplest way to compile this package is: 521ab64890Smrg 531ab64890Smrg 1. `cd' to the directory containing the package's source code and type 54b4ee4795Smrg `./configure' to configure the package for your system. 551ab64890Smrg 56b4ee4795Smrg Running `configure' might take a while. While running, it prints 57b4ee4795Smrg some messages telling which features it is checking for. 581ab64890Smrg 591ab64890Smrg 2. Type `make' to compile the package. 601ab64890Smrg 611ab64890Smrg 3. Optionally, type `make check' to run any self-tests that come with 62862bcd1aSmrg the package, generally using the just-built uninstalled binaries. 631ab64890Smrg 641ab64890Smrg 4. Type `make install' to install the programs and any data files and 65862bcd1aSmrg documentation. When installing into a prefix owned by root, it is 66862bcd1aSmrg recommended that the package be configured and built as a regular 67862bcd1aSmrg user, and only the `make install' phase executed with root 68862bcd1aSmrg privileges. 69862bcd1aSmrg 70862bcd1aSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71862bcd1aSmrg this time using the binaries in their final installed location. 72862bcd1aSmrg This target does not install anything. Running this target as a 73862bcd1aSmrg regular user, particularly if the prior `make install' required 74862bcd1aSmrg root privileges, verifies that the installation completed 75862bcd1aSmrg correctly. 76862bcd1aSmrg 77862bcd1aSmrg 6. You can remove the program binaries and object files from the 781ab64890Smrg source code directory by typing `make clean'. To also remove the 791ab64890Smrg files that `configure' created (so you can compile the package for 801ab64890Smrg a different kind of computer), type `make distclean'. There is 811ab64890Smrg also a `make maintainer-clean' target, but that is intended mainly 821ab64890Smrg for the package's developers. If you use it, you may have to get 831ab64890Smrg all sorts of other programs in order to regenerate files that came 841ab64890Smrg with the distribution. 851ab64890Smrg 86862bcd1aSmrg 7. Often, you can also type `make uninstall' to remove the installed 87862bcd1aSmrg files again. In practice, not all packages have tested that 88862bcd1aSmrg uninstallation works correctly, even though it is required by the 89862bcd1aSmrg GNU Coding Standards. 90862bcd1aSmrg 91862bcd1aSmrg 8. Some packages, particularly those that use Automake, provide `make 92862bcd1aSmrg distcheck', which can by used by developers to test that all other 93862bcd1aSmrg targets like `make install' and `make uninstall' work correctly. 94862bcd1aSmrg This target is generally not run by end users. 95b4ee4795Smrg 961ab64890SmrgCompilers and Options 971ab64890Smrg===================== 981ab64890Smrg 991ab64890Smrg Some systems require unusual options for compilation or linking that 1001ab64890Smrgthe `configure' script does not know about. Run `./configure --help' 1011ab64890Smrgfor details on some of the pertinent environment variables. 1021ab64890Smrg 1031ab64890Smrg You can give `configure' initial values for configuration parameters 1041ab64890Smrgby setting variables in the command line or in the environment. Here 1051ab64890Smrgis an example: 1061ab64890Smrg 107b4ee4795Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1081ab64890Smrg 1091ab64890Smrg *Note Defining Variables::, for more details. 1101ab64890Smrg 1111ab64890SmrgCompiling For Multiple Architectures 1121ab64890Smrg==================================== 1131ab64890Smrg 1141ab64890Smrg You can compile the package for more than one kind of computer at the 1151ab64890Smrgsame time, by placing the object files for each architecture in their 116b4ee4795Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1171ab64890Smrgdirectory where you want the object files and executables to go and run 1181ab64890Smrgthe `configure' script. `configure' automatically checks for the 119862bcd1aSmrgsource code in the directory that `configure' is in and in `..'. This 120862bcd1aSmrgis known as a "VPATH" build. 1211ab64890Smrg 122b4ee4795Smrg With a non-GNU `make', it is safer to compile the package for one 123b4ee4795Smrgarchitecture at a time in the source code directory. After you have 124b4ee4795Smrginstalled the package for one architecture, use `make distclean' before 125b4ee4795Smrgreconfiguring for another architecture. 126b4ee4795Smrg 127b4ee4795Smrg On MacOS X 10.5 and later systems, you can create libraries and 128b4ee4795Smrgexecutables that work on multiple system types--known as "fat" or 129b4ee4795Smrg"universal" binaries--by specifying multiple `-arch' options to the 130b4ee4795Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131b4ee4795Smrgthis: 132b4ee4795Smrg 133b4ee4795Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134b4ee4795Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135b4ee4795Smrg CPP="gcc -E" CXXCPP="g++ -E" 136b4ee4795Smrg 137b4ee4795Smrg This is not guaranteed to produce working output in all cases, you 138b4ee4795Smrgmay have to build one architecture at a time and combine the results 139b4ee4795Smrgusing the `lipo' tool if you have problems. 1401ab64890Smrg 1411ab64890SmrgInstallation Names 1421ab64890Smrg================== 1431ab64890Smrg 144b4ee4795Smrg By default, `make install' installs the package's commands under 145b4ee4795Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146b4ee4795Smrgcan specify an installation prefix other than `/usr/local' by giving 147862bcd1aSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148862bcd1aSmrgabsolute file name. 1491ab64890Smrg 1501ab64890Smrg You can specify separate installation prefixes for 1511ab64890Smrgarchitecture-specific files and architecture-independent files. If you 152b4ee4795Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153b4ee4795SmrgPREFIX as the prefix for installing programs and libraries. 154b4ee4795SmrgDocumentation and other data files still use the regular prefix. 1551ab64890Smrg 1561ab64890Smrg In addition, if you use an unusual directory layout you can give 157b4ee4795Smrgoptions like `--bindir=DIR' to specify different values for particular 1581ab64890Smrgkinds of files. Run `configure --help' for a list of the directories 159862bcd1aSmrgyou can set and what kinds of files go in them. In general, the 160862bcd1aSmrgdefault for these options is expressed in terms of `${prefix}', so that 161862bcd1aSmrgspecifying just `--prefix' will affect all of the other directory 162862bcd1aSmrgspecifications that were not explicitly provided. 163862bcd1aSmrg 164862bcd1aSmrg The most portable way to affect installation locations is to pass the 165862bcd1aSmrgcorrect locations to `configure'; however, many packages provide one or 166862bcd1aSmrgboth of the following shortcuts of passing variable assignments to the 167862bcd1aSmrg`make install' command line to change installation locations without 168862bcd1aSmrghaving to reconfigure or recompile. 169862bcd1aSmrg 170862bcd1aSmrg The first method involves providing an override variable for each 171862bcd1aSmrgaffected directory. For example, `make install 172862bcd1aSmrgprefix=/alternate/directory' will choose an alternate location for all 173862bcd1aSmrgdirectory configuration variables that were expressed in terms of 174862bcd1aSmrg`${prefix}'. Any directories that were specified during `configure', 175862bcd1aSmrgbut not in terms of `${prefix}', must each be overridden at install 176862bcd1aSmrgtime for the entire installation to be relocated. The approach of 177862bcd1aSmrgmakefile variable overrides for each directory variable is required by 178862bcd1aSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179862bcd1aSmrgHowever, some platforms have known limitations with the semantics of 180862bcd1aSmrgshared libraries that end up requiring recompilation when using this 181862bcd1aSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182862bcd1aSmrg 183862bcd1aSmrg The second method involves providing the `DESTDIR' variable. For 184862bcd1aSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185862bcd1aSmrg`/alternate/directory' before all installation names. The approach of 186862bcd1aSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187862bcd1aSmrgdoes not work on platforms that have drive letters. On the other hand, 188862bcd1aSmrgit does better at avoiding recompilation issues, and works well even 189862bcd1aSmrgwhen some directory options were not specified in terms of `${prefix}' 190862bcd1aSmrgat `configure' time. 191862bcd1aSmrg 192862bcd1aSmrgOptional Features 193862bcd1aSmrg================= 1941ab64890Smrg 1951ab64890Smrg If the package supports it, you can cause programs to be installed 1961ab64890Smrgwith an extra prefix or suffix on their names by giving `configure' the 1971ab64890Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1981ab64890Smrg 1991ab64890Smrg Some packages pay attention to `--enable-FEATURE' options to 2001ab64890Smrg`configure', where FEATURE indicates an optional part of the package. 2011ab64890SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2021ab64890Smrgis something like `gnu-as' or `x' (for the X Window System). The 2031ab64890Smrg`README' should mention any `--enable-' and `--with-' options that the 2041ab64890Smrgpackage recognizes. 2051ab64890Smrg 2061ab64890Smrg For packages that use the X Window System, `configure' can usually 2071ab64890Smrgfind the X include and library files automatically, but if it doesn't, 2081ab64890Smrgyou can use the `configure' options `--x-includes=DIR' and 2091ab64890Smrg`--x-libraries=DIR' to specify their locations. 2101ab64890Smrg 211862bcd1aSmrg Some packages offer the ability to configure how verbose the 212862bcd1aSmrgexecution of `make' will be. For these packages, running `./configure 213862bcd1aSmrg--enable-silent-rules' sets the default to minimal output, which can be 214862bcd1aSmrgoverridden with `make V=1'; while running `./configure 215862bcd1aSmrg--disable-silent-rules' sets the default to verbose, which can be 216862bcd1aSmrgoverridden with `make V=0'. 217862bcd1aSmrg 218b4ee4795SmrgParticular systems 219b4ee4795Smrg================== 220b4ee4795Smrg 221b4ee4795Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222b4ee4795SmrgCC is not installed, it is recommended to use the following options in 223b4ee4795Smrgorder to use an ANSI C compiler: 224b4ee4795Smrg 225862bcd1aSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226b4ee4795Smrg 227b4ee4795Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228b4ee4795Smrg 229862bcd1aSmrg HP-UX `make' updates targets which have the same time stamps as 230862bcd1aSmrgtheir prerequisites, which makes it generally unusable when shipped 231862bcd1aSmrggenerated files such as `configure' are involved. Use GNU `make' 232862bcd1aSmrginstead. 233862bcd1aSmrg 234b4ee4795Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235b4ee4795Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236b4ee4795Smrga workaround. If GNU CC is not installed, it is therefore recommended 237b4ee4795Smrgto try 238b4ee4795Smrg 239b4ee4795Smrg ./configure CC="cc" 240b4ee4795Smrg 241b4ee4795Smrgand if that doesn't work, try 242b4ee4795Smrg 243b4ee4795Smrg ./configure CC="cc -nodtk" 244b4ee4795Smrg 245862bcd1aSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246862bcd1aSmrgdirectory contains several dysfunctional programs; working variants of 247862bcd1aSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248862bcd1aSmrgin your `PATH', put it _after_ `/usr/bin'. 249862bcd1aSmrg 250862bcd1aSmrg On Haiku, software installed for all users goes in `/boot/common', 251862bcd1aSmrgnot `/usr/local'. It is recommended to use the following options: 252862bcd1aSmrg 253862bcd1aSmrg ./configure --prefix=/boot/common 254862bcd1aSmrg 2551ab64890SmrgSpecifying the System Type 2561ab64890Smrg========================== 2571ab64890Smrg 2581ab64890Smrg There may be some features `configure' cannot figure out 2591ab64890Smrgautomatically, but needs to determine by the type of machine the package 2601ab64890Smrgwill run on. Usually, assuming the package is built to be run on the 2611ab64890Smrg_same_ architectures, `configure' can figure that out, but if it prints 2621ab64890Smrga message saying it cannot guess the machine type, give it the 2631ab64890Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2641ab64890Smrgtype, such as `sun4', or a canonical name which has the form: 2651ab64890Smrg 2661ab64890Smrg CPU-COMPANY-SYSTEM 2671ab64890Smrg 2681ab64890Smrgwhere SYSTEM can have one of these forms: 2691ab64890Smrg 270862bcd1aSmrg OS 271862bcd1aSmrg KERNEL-OS 2721ab64890Smrg 2731ab64890Smrg See the file `config.sub' for the possible values of each field. If 2741ab64890Smrg`config.sub' isn't included in this package, then this package doesn't 2751ab64890Smrgneed to know the machine type. 2761ab64890Smrg 2771ab64890Smrg If you are _building_ compiler tools for cross-compiling, you should 278b4ee4795Smrguse the option `--target=TYPE' to select the type of system they will 2791ab64890Smrgproduce code for. 2801ab64890Smrg 2811ab64890Smrg If you want to _use_ a cross compiler, that generates code for a 2821ab64890Smrgplatform different from the build platform, you should specify the 2831ab64890Smrg"host" platform (i.e., that on which the generated programs will 2841ab64890Smrgeventually be run) with `--host=TYPE'. 2851ab64890Smrg 2861ab64890SmrgSharing Defaults 2871ab64890Smrg================ 2881ab64890Smrg 2891ab64890Smrg If you want to set default values for `configure' scripts to share, 2901ab64890Smrgyou can create a site shell script called `config.site' that gives 2911ab64890Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2921ab64890Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2931ab64890Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2941ab64890Smrg`CONFIG_SITE' environment variable to the location of the site script. 2951ab64890SmrgA warning: not all `configure' scripts look for a site script. 2961ab64890Smrg 2971ab64890SmrgDefining Variables 2981ab64890Smrg================== 2991ab64890Smrg 3001ab64890Smrg Variables not defined in a site shell script can be set in the 3011ab64890Smrgenvironment passed to `configure'. However, some packages may run 3021ab64890Smrgconfigure again during the build, and the customized values of these 3031ab64890Smrgvariables may be lost. In order to avoid this problem, you should set 3041ab64890Smrgthem in the `configure' command line, using `VAR=value'. For example: 3051ab64890Smrg 3061ab64890Smrg ./configure CC=/usr/local2/bin/gcc 3071ab64890Smrg 308b4ee4795Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3091ab64890Smrgoverridden in the site shell script). 3101ab64890Smrg 311b4ee4795SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312b4ee4795Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313b4ee4795Smrg 314b4ee4795Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315b4ee4795Smrg 3161ab64890Smrg`configure' Invocation 3171ab64890Smrg====================== 3181ab64890Smrg 3191ab64890Smrg `configure' recognizes the following options to control how it 3201ab64890Smrgoperates. 3211ab64890Smrg 3221ab64890Smrg`--help' 3231ab64890Smrg`-h' 324b4ee4795Smrg Print a summary of all of the options to `configure', and exit. 325b4ee4795Smrg 326b4ee4795Smrg`--help=short' 327b4ee4795Smrg`--help=recursive' 328b4ee4795Smrg Print a summary of the options unique to this package's 329b4ee4795Smrg `configure', and exit. The `short' variant lists options used 330b4ee4795Smrg only in the top level, while the `recursive' variant lists options 331b4ee4795Smrg also present in any nested packages. 3321ab64890Smrg 3331ab64890Smrg`--version' 3341ab64890Smrg`-V' 3351ab64890Smrg Print the version of Autoconf used to generate the `configure' 3361ab64890Smrg script, and exit. 3371ab64890Smrg 3381ab64890Smrg`--cache-file=FILE' 3391ab64890Smrg Enable the cache: use and save the results of the tests in FILE, 3401ab64890Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3411ab64890Smrg disable caching. 3421ab64890Smrg 3431ab64890Smrg`--config-cache' 3441ab64890Smrg`-C' 3451ab64890Smrg Alias for `--cache-file=config.cache'. 3461ab64890Smrg 3471ab64890Smrg`--quiet' 3481ab64890Smrg`--silent' 3491ab64890Smrg`-q' 3501ab64890Smrg Do not print messages saying which checks are being made. To 3511ab64890Smrg suppress all normal output, redirect it to `/dev/null' (any error 3521ab64890Smrg messages will still be shown). 3531ab64890Smrg 3541ab64890Smrg`--srcdir=DIR' 3551ab64890Smrg Look for the package's source code in directory DIR. Usually 3561ab64890Smrg `configure' can determine that directory automatically. 3571ab64890Smrg 358b4ee4795Smrg`--prefix=DIR' 359862bcd1aSmrg Use DIR as the installation prefix. *note Installation Names:: 360b4ee4795Smrg for more details, including other options available for fine-tuning 361b4ee4795Smrg the installation locations. 362b4ee4795Smrg 363b4ee4795Smrg`--no-create' 364b4ee4795Smrg`-n' 365b4ee4795Smrg Run the configure checks, but stop before creating any output 366b4ee4795Smrg files. 367b4ee4795Smrg 3681ab64890Smrg`configure' also accepts some other, not widely useful, options. Run 3691ab64890Smrg`configure --help' for more details. 3701ab64890Smrg 371