17dff02feSmrgInstallation Instructions 27dff02feSmrg************************* 37dff02feSmrg 4c44a0236SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5c44a0236SmrgInc. 67dff02feSmrg 7c44a0236Smrg Copying and distribution of this file, with or without modification, 8c44a0236Smrgare permitted in any medium without royalty provided the copyright 9c44a0236Smrgnotice and this notice are preserved. This file is offered as-is, 10c44a0236Smrgwithout warranty of any kind. 117dff02feSmrg 127dff02feSmrgBasic Installation 137dff02feSmrg================== 147dff02feSmrg 157dff02feSmrg Briefly, the shell commands `./configure; make; make install' should 167dff02feSmrgconfigure, build, and install this package. The following 177dff02feSmrgmore-detailed instructions are generic; see the `README' file for 18c44a0236Smrginstructions specific to this package. Some packages provide this 19c44a0236Smrg`INSTALL' file but do not implement all of the features documented 20c44a0236Smrgbelow. The lack of an optional feature in a given package is not 21c44a0236Smrgnecessarily a bug. More recommendations for GNU packages can be found 22c44a0236Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 237dff02feSmrg 247dff02feSmrg The `configure' shell script attempts to guess correct values for 257dff02feSmrgvarious system-dependent variables used during compilation. It uses 267dff02feSmrgthose values to create a `Makefile' in each directory of the package. 277dff02feSmrgIt may also create one or more `.h' files containing system-dependent 287dff02feSmrgdefinitions. Finally, it creates a shell script `config.status' that 297dff02feSmrgyou can run in the future to recreate the current configuration, and a 307dff02feSmrgfile `config.log' containing compiler output (useful mainly for 317dff02feSmrgdebugging `configure'). 327dff02feSmrg 337dff02feSmrg It can also use an optional file (typically called `config.cache' 347dff02feSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 357dff02feSmrgthe results of its tests to speed up reconfiguring. Caching is 367dff02feSmrgdisabled by default to prevent problems with accidental use of stale 377dff02feSmrgcache files. 387dff02feSmrg 397dff02feSmrg If you need to do unusual things to compile the package, please try 407dff02feSmrgto figure out how `configure' could check whether to do them, and mail 417dff02feSmrgdiffs or instructions to the address given in the `README' so they can 427dff02feSmrgbe considered for the next release. If you are using the cache, and at 437dff02feSmrgsome point `config.cache' contains results you don't want to keep, you 447dff02feSmrgmay remove or edit it. 457dff02feSmrg 467dff02feSmrg The file `configure.ac' (or `configure.in') is used to create 477dff02feSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 487dff02feSmrgyou want to change it or regenerate `configure' using a newer version 497dff02feSmrgof `autoconf'. 507dff02feSmrg 51c44a0236Smrg The simplest way to compile this package is: 527dff02feSmrg 537dff02feSmrg 1. `cd' to the directory containing the package's source code and type 547dff02feSmrg `./configure' to configure the package for your system. 557dff02feSmrg 567dff02feSmrg Running `configure' might take a while. While running, it prints 577dff02feSmrg some messages telling which features it is checking for. 587dff02feSmrg 597dff02feSmrg 2. Type `make' to compile the package. 607dff02feSmrg 617dff02feSmrg 3. Optionally, type `make check' to run any self-tests that come with 62c44a0236Smrg the package, generally using the just-built uninstalled binaries. 637dff02feSmrg 647dff02feSmrg 4. Type `make install' to install the programs and any data files and 65c44a0236Smrg documentation. When installing into a prefix owned by root, it is 66c44a0236Smrg recommended that the package be configured and built as a regular 67c44a0236Smrg user, and only the `make install' phase executed with root 68c44a0236Smrg privileges. 69c44a0236Smrg 70c44a0236Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71c44a0236Smrg this time using the binaries in their final installed location. 72c44a0236Smrg This target does not install anything. Running this target as a 73c44a0236Smrg regular user, particularly if the prior `make install' required 74c44a0236Smrg root privileges, verifies that the installation completed 75c44a0236Smrg correctly. 76c44a0236Smrg 77c44a0236Smrg 6. You can remove the program binaries and object files from the 787dff02feSmrg source code directory by typing `make clean'. To also remove the 797dff02feSmrg files that `configure' created (so you can compile the package for 807dff02feSmrg a different kind of computer), type `make distclean'. There is 817dff02feSmrg also a `make maintainer-clean' target, but that is intended mainly 827dff02feSmrg for the package's developers. If you use it, you may have to get 837dff02feSmrg all sorts of other programs in order to regenerate files that came 847dff02feSmrg with the distribution. 857dff02feSmrg 86c44a0236Smrg 7. Often, you can also type `make uninstall' to remove the installed 87c44a0236Smrg files again. In practice, not all packages have tested that 88c44a0236Smrg uninstallation works correctly, even though it is required by the 89c44a0236Smrg GNU Coding Standards. 90c44a0236Smrg 91c44a0236Smrg 8. Some packages, particularly those that use Automake, provide `make 92c44a0236Smrg distcheck', which can by used by developers to test that all other 93c44a0236Smrg targets like `make install' and `make uninstall' work correctly. 94c44a0236Smrg This target is generally not run by end users. 957dff02feSmrg 967dff02feSmrgCompilers and Options 977dff02feSmrg===================== 987dff02feSmrg 997dff02feSmrg Some systems require unusual options for compilation or linking that 1007dff02feSmrgthe `configure' script does not know about. Run `./configure --help' 1017dff02feSmrgfor details on some of the pertinent environment variables. 1027dff02feSmrg 1037dff02feSmrg You can give `configure' initial values for configuration parameters 1047dff02feSmrgby setting variables in the command line or in the environment. Here 1057dff02feSmrgis an example: 1067dff02feSmrg 1077dff02feSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1087dff02feSmrg 1097dff02feSmrg *Note Defining Variables::, for more details. 1107dff02feSmrg 1117dff02feSmrgCompiling For Multiple Architectures 1127dff02feSmrg==================================== 1137dff02feSmrg 1147dff02feSmrg You can compile the package for more than one kind of computer at the 1157dff02feSmrgsame time, by placing the object files for each architecture in their 1167dff02feSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1177dff02feSmrgdirectory where you want the object files and executables to go and run 1187dff02feSmrgthe `configure' script. `configure' automatically checks for the 119c44a0236Smrgsource code in the directory that `configure' is in and in `..'. This 120c44a0236Smrgis known as a "VPATH" build. 1217dff02feSmrg 1227dff02feSmrg With a non-GNU `make', it is safer to compile the package for one 1237dff02feSmrgarchitecture at a time in the source code directory. After you have 1247dff02feSmrginstalled the package for one architecture, use `make distclean' before 1257dff02feSmrgreconfiguring for another architecture. 1267dff02feSmrg 1277dff02feSmrg On MacOS X 10.5 and later systems, you can create libraries and 1287dff02feSmrgexecutables that work on multiple system types--known as "fat" or 1297dff02feSmrg"universal" binaries--by specifying multiple `-arch' options to the 1307dff02feSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1317dff02feSmrgthis: 1327dff02feSmrg 1337dff02feSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1347dff02feSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1357dff02feSmrg CPP="gcc -E" CXXCPP="g++ -E" 1367dff02feSmrg 1377dff02feSmrg This is not guaranteed to produce working output in all cases, you 1387dff02feSmrgmay have to build one architecture at a time and combine the results 1397dff02feSmrgusing the `lipo' tool if you have problems. 1407dff02feSmrg 1417dff02feSmrgInstallation Names 1427dff02feSmrg================== 1437dff02feSmrg 1447dff02feSmrg By default, `make install' installs the package's commands under 1457dff02feSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1467dff02feSmrgcan specify an installation prefix other than `/usr/local' by giving 147c44a0236Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148c44a0236Smrgabsolute file name. 1497dff02feSmrg 1507dff02feSmrg You can specify separate installation prefixes for 1517dff02feSmrgarchitecture-specific files and architecture-independent files. If you 1527dff02feSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1537dff02feSmrgPREFIX as the prefix for installing programs and libraries. 1547dff02feSmrgDocumentation and other data files still use the regular prefix. 1557dff02feSmrg 1567dff02feSmrg In addition, if you use an unusual directory layout you can give 1577dff02feSmrgoptions like `--bindir=DIR' to specify different values for particular 1587dff02feSmrgkinds of files. Run `configure --help' for a list of the directories 159c44a0236Smrgyou can set and what kinds of files go in them. In general, the 160c44a0236Smrgdefault for these options is expressed in terms of `${prefix}', so that 161c44a0236Smrgspecifying just `--prefix' will affect all of the other directory 162c44a0236Smrgspecifications that were not explicitly provided. 163c44a0236Smrg 164c44a0236Smrg The most portable way to affect installation locations is to pass the 165c44a0236Smrgcorrect locations to `configure'; however, many packages provide one or 166c44a0236Smrgboth of the following shortcuts of passing variable assignments to the 167c44a0236Smrg`make install' command line to change installation locations without 168c44a0236Smrghaving to reconfigure or recompile. 169c44a0236Smrg 170c44a0236Smrg The first method involves providing an override variable for each 171c44a0236Smrgaffected directory. For example, `make install 172c44a0236Smrgprefix=/alternate/directory' will choose an alternate location for all 173c44a0236Smrgdirectory configuration variables that were expressed in terms of 174c44a0236Smrg`${prefix}'. Any directories that were specified during `configure', 175c44a0236Smrgbut not in terms of `${prefix}', must each be overridden at install 176c44a0236Smrgtime for the entire installation to be relocated. The approach of 177c44a0236Smrgmakefile variable overrides for each directory variable is required by 178c44a0236Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179c44a0236SmrgHowever, some platforms have known limitations with the semantics of 180c44a0236Smrgshared libraries that end up requiring recompilation when using this 181c44a0236Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182c44a0236Smrg 183c44a0236Smrg The second method involves providing the `DESTDIR' variable. For 184c44a0236Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185c44a0236Smrg`/alternate/directory' before all installation names. The approach of 186c44a0236Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187c44a0236Smrgdoes not work on platforms that have drive letters. On the other hand, 188c44a0236Smrgit does better at avoiding recompilation issues, and works well even 189c44a0236Smrgwhen some directory options were not specified in terms of `${prefix}' 190c44a0236Smrgat `configure' time. 191c44a0236Smrg 192c44a0236SmrgOptional Features 193c44a0236Smrg================= 1947dff02feSmrg 1957dff02feSmrg If the package supports it, you can cause programs to be installed 1967dff02feSmrgwith an extra prefix or suffix on their names by giving `configure' the 1977dff02feSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1987dff02feSmrg 1997dff02feSmrg Some packages pay attention to `--enable-FEATURE' options to 2007dff02feSmrg`configure', where FEATURE indicates an optional part of the package. 2017dff02feSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2027dff02feSmrgis something like `gnu-as' or `x' (for the X Window System). The 2037dff02feSmrg`README' should mention any `--enable-' and `--with-' options that the 2047dff02feSmrgpackage recognizes. 2057dff02feSmrg 2067dff02feSmrg For packages that use the X Window System, `configure' can usually 2077dff02feSmrgfind the X include and library files automatically, but if it doesn't, 2087dff02feSmrgyou can use the `configure' options `--x-includes=DIR' and 2097dff02feSmrg`--x-libraries=DIR' to specify their locations. 2107dff02feSmrg 211c44a0236Smrg Some packages offer the ability to configure how verbose the 212c44a0236Smrgexecution of `make' will be. For these packages, running `./configure 213c44a0236Smrg--enable-silent-rules' sets the default to minimal output, which can be 214c44a0236Smrgoverridden with `make V=1'; while running `./configure 215c44a0236Smrg--disable-silent-rules' sets the default to verbose, which can be 216c44a0236Smrgoverridden with `make V=0'. 217c44a0236Smrg 2187dff02feSmrgParticular systems 2197dff02feSmrg================== 2207dff02feSmrg 2217dff02feSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2227dff02feSmrgCC is not installed, it is recommended to use the following options in 2237dff02feSmrgorder to use an ANSI C compiler: 2247dff02feSmrg 225c44a0236Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2267dff02feSmrg 2277dff02feSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2287dff02feSmrg 229c44a0236Smrg HP-UX `make' updates targets which have the same time stamps as 230c44a0236Smrgtheir prerequisites, which makes it generally unusable when shipped 231c44a0236Smrggenerated files such as `configure' are involved. Use GNU `make' 232c44a0236Smrginstead. 233c44a0236Smrg 2347dff02feSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2357dff02feSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2367dff02feSmrga workaround. If GNU CC is not installed, it is therefore recommended 2377dff02feSmrgto try 2387dff02feSmrg 2397dff02feSmrg ./configure CC="cc" 2407dff02feSmrg 2417dff02feSmrgand if that doesn't work, try 2427dff02feSmrg 2437dff02feSmrg ./configure CC="cc -nodtk" 2447dff02feSmrg 245c44a0236Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246c44a0236Smrgdirectory contains several dysfunctional programs; working variants of 247c44a0236Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248c44a0236Smrgin your `PATH', put it _after_ `/usr/bin'. 249c44a0236Smrg 250c44a0236Smrg On Haiku, software installed for all users goes in `/boot/common', 251c44a0236Smrgnot `/usr/local'. It is recommended to use the following options: 252c44a0236Smrg 253c44a0236Smrg ./configure --prefix=/boot/common 254c44a0236Smrg 2557dff02feSmrgSpecifying the System Type 2567dff02feSmrg========================== 2577dff02feSmrg 2587dff02feSmrg There may be some features `configure' cannot figure out 2597dff02feSmrgautomatically, but needs to determine by the type of machine the package 2607dff02feSmrgwill run on. Usually, assuming the package is built to be run on the 2617dff02feSmrg_same_ architectures, `configure' can figure that out, but if it prints 2627dff02feSmrga message saying it cannot guess the machine type, give it the 2637dff02feSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2647dff02feSmrgtype, such as `sun4', or a canonical name which has the form: 2657dff02feSmrg 2667dff02feSmrg CPU-COMPANY-SYSTEM 2677dff02feSmrg 2687dff02feSmrgwhere SYSTEM can have one of these forms: 2697dff02feSmrg 270c44a0236Smrg OS 271c44a0236Smrg KERNEL-OS 2727dff02feSmrg 2737dff02feSmrg See the file `config.sub' for the possible values of each field. If 2747dff02feSmrg`config.sub' isn't included in this package, then this package doesn't 2757dff02feSmrgneed to know the machine type. 2767dff02feSmrg 2777dff02feSmrg If you are _building_ compiler tools for cross-compiling, you should 2787dff02feSmrguse the option `--target=TYPE' to select the type of system they will 2797dff02feSmrgproduce code for. 2807dff02feSmrg 2817dff02feSmrg If you want to _use_ a cross compiler, that generates code for a 2827dff02feSmrgplatform different from the build platform, you should specify the 2837dff02feSmrg"host" platform (i.e., that on which the generated programs will 2847dff02feSmrgeventually be run) with `--host=TYPE'. 2857dff02feSmrg 2867dff02feSmrgSharing Defaults 2877dff02feSmrg================ 2887dff02feSmrg 2897dff02feSmrg If you want to set default values for `configure' scripts to share, 2907dff02feSmrgyou can create a site shell script called `config.site' that gives 2917dff02feSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2927dff02feSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2937dff02feSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2947dff02feSmrg`CONFIG_SITE' environment variable to the location of the site script. 2957dff02feSmrgA warning: not all `configure' scripts look for a site script. 2967dff02feSmrg 2977dff02feSmrgDefining Variables 2987dff02feSmrg================== 2997dff02feSmrg 3007dff02feSmrg Variables not defined in a site shell script can be set in the 3017dff02feSmrgenvironment passed to `configure'. However, some packages may run 3027dff02feSmrgconfigure again during the build, and the customized values of these 3037dff02feSmrgvariables may be lost. In order to avoid this problem, you should set 3047dff02feSmrgthem in the `configure' command line, using `VAR=value'. For example: 3057dff02feSmrg 3067dff02feSmrg ./configure CC=/usr/local2/bin/gcc 3077dff02feSmrg 3087dff02feSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3097dff02feSmrgoverridden in the site shell script). 3107dff02feSmrg 3117dff02feSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3127dff02feSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3137dff02feSmrg 3147dff02feSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3157dff02feSmrg 3167dff02feSmrg`configure' Invocation 3177dff02feSmrg====================== 3187dff02feSmrg 3197dff02feSmrg `configure' recognizes the following options to control how it 3207dff02feSmrgoperates. 3217dff02feSmrg 3227dff02feSmrg`--help' 3237dff02feSmrg`-h' 3247dff02feSmrg Print a summary of all of the options to `configure', and exit. 3257dff02feSmrg 3267dff02feSmrg`--help=short' 3277dff02feSmrg`--help=recursive' 3287dff02feSmrg Print a summary of the options unique to this package's 3297dff02feSmrg `configure', and exit. The `short' variant lists options used 3307dff02feSmrg only in the top level, while the `recursive' variant lists options 3317dff02feSmrg also present in any nested packages. 3327dff02feSmrg 3337dff02feSmrg`--version' 3347dff02feSmrg`-V' 3357dff02feSmrg Print the version of Autoconf used to generate the `configure' 3367dff02feSmrg script, and exit. 3377dff02feSmrg 3387dff02feSmrg`--cache-file=FILE' 3397dff02feSmrg Enable the cache: use and save the results of the tests in FILE, 3407dff02feSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3417dff02feSmrg disable caching. 3427dff02feSmrg 3437dff02feSmrg`--config-cache' 3447dff02feSmrg`-C' 3457dff02feSmrg Alias for `--cache-file=config.cache'. 3467dff02feSmrg 3477dff02feSmrg`--quiet' 3487dff02feSmrg`--silent' 3497dff02feSmrg`-q' 3507dff02feSmrg Do not print messages saying which checks are being made. To 3517dff02feSmrg suppress all normal output, redirect it to `/dev/null' (any error 3527dff02feSmrg messages will still be shown). 3537dff02feSmrg 3547dff02feSmrg`--srcdir=DIR' 3557dff02feSmrg Look for the package's source code in directory DIR. Usually 3567dff02feSmrg `configure' can determine that directory automatically. 3577dff02feSmrg 3587dff02feSmrg`--prefix=DIR' 359c44a0236Smrg Use DIR as the installation prefix. *note Installation Names:: 3607dff02feSmrg for more details, including other options available for fine-tuning 3617dff02feSmrg the installation locations. 3627dff02feSmrg 3637dff02feSmrg`--no-create' 3647dff02feSmrg`-n' 3657dff02feSmrg Run the configure checks, but stop before creating any output 3667dff02feSmrg files. 3677dff02feSmrg 3687dff02feSmrg`configure' also accepts some other, not widely useful, options. Run 3697dff02feSmrg`configure --help' for more details. 3707dff02feSmrg 371