15cf18391SmrgInstallation Instructions 25cf18391Smrg************************* 35cf18391Smrg 487402a6fSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 587402a6fSmrgInc. 65cf18391Smrg 787402a6fSmrg Copying and distribution of this file, with or without modification, 887402a6fSmrgare permitted in any medium without royalty provided the copyright 987402a6fSmrgnotice and this notice are preserved. This file is offered as-is, 1087402a6fSmrgwithout warranty of any kind. 115cf18391Smrg 125cf18391SmrgBasic Installation 135cf18391Smrg================== 145cf18391Smrg 155cf18391Smrg Briefly, the shell commands `./configure; make; make install' should 165cf18391Smrgconfigure, build, and install this package. The following 175cf18391Smrgmore-detailed instructions are generic; see the `README' file for 1887402a6fSmrginstructions specific to this package. Some packages provide this 1987402a6fSmrg`INSTALL' file but do not implement all of the features documented 2087402a6fSmrgbelow. The lack of an optional feature in a given package is not 2187402a6fSmrgnecessarily a bug. More recommendations for GNU packages can be found 2287402a6fSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 235cf18391Smrg 245cf18391Smrg The `configure' shell script attempts to guess correct values for 255cf18391Smrgvarious system-dependent variables used during compilation. It uses 265cf18391Smrgthose values to create a `Makefile' in each directory of the package. 275cf18391SmrgIt may also create one or more `.h' files containing system-dependent 285cf18391Smrgdefinitions. Finally, it creates a shell script `config.status' that 295cf18391Smrgyou can run in the future to recreate the current configuration, and a 305cf18391Smrgfile `config.log' containing compiler output (useful mainly for 315cf18391Smrgdebugging `configure'). 325cf18391Smrg 335cf18391Smrg It can also use an optional file (typically called `config.cache' 345cf18391Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 355cf18391Smrgthe results of its tests to speed up reconfiguring. Caching is 365cf18391Smrgdisabled by default to prevent problems with accidental use of stale 375cf18391Smrgcache files. 385cf18391Smrg 395cf18391Smrg If you need to do unusual things to compile the package, please try 405cf18391Smrgto figure out how `configure' could check whether to do them, and mail 415cf18391Smrgdiffs or instructions to the address given in the `README' so they can 425cf18391Smrgbe considered for the next release. If you are using the cache, and at 435cf18391Smrgsome point `config.cache' contains results you don't want to keep, you 445cf18391Smrgmay remove or edit it. 455cf18391Smrg 465cf18391Smrg The file `configure.ac' (or `configure.in') is used to create 475cf18391Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 485cf18391Smrgyou want to change it or regenerate `configure' using a newer version 495cf18391Smrgof `autoconf'. 505cf18391Smrg 5187402a6fSmrg The simplest way to compile this package is: 525cf18391Smrg 535cf18391Smrg 1. `cd' to the directory containing the package's source code and type 545cf18391Smrg `./configure' to configure the package for your system. 555cf18391Smrg 565cf18391Smrg Running `configure' might take a while. While running, it prints 575cf18391Smrg some messages telling which features it is checking for. 585cf18391Smrg 595cf18391Smrg 2. Type `make' to compile the package. 605cf18391Smrg 615cf18391Smrg 3. Optionally, type `make check' to run any self-tests that come with 6287402a6fSmrg the package, generally using the just-built uninstalled binaries. 635cf18391Smrg 645cf18391Smrg 4. Type `make install' to install the programs and any data files and 6587402a6fSmrg documentation. When installing into a prefix owned by root, it is 6687402a6fSmrg recommended that the package be configured and built as a regular 6787402a6fSmrg user, and only the `make install' phase executed with root 6887402a6fSmrg privileges. 6987402a6fSmrg 7087402a6fSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7187402a6fSmrg this time using the binaries in their final installed location. 7287402a6fSmrg This target does not install anything. Running this target as a 7387402a6fSmrg regular user, particularly if the prior `make install' required 7487402a6fSmrg root privileges, verifies that the installation completed 7587402a6fSmrg correctly. 7687402a6fSmrg 7787402a6fSmrg 6. You can remove the program binaries and object files from the 785cf18391Smrg source code directory by typing `make clean'. To also remove the 795cf18391Smrg files that `configure' created (so you can compile the package for 805cf18391Smrg a different kind of computer), type `make distclean'. There is 815cf18391Smrg also a `make maintainer-clean' target, but that is intended mainly 825cf18391Smrg for the package's developers. If you use it, you may have to get 835cf18391Smrg all sorts of other programs in order to regenerate files that came 845cf18391Smrg with the distribution. 855cf18391Smrg 8687402a6fSmrg 7. Often, you can also type `make uninstall' to remove the installed 8787402a6fSmrg files again. In practice, not all packages have tested that 8887402a6fSmrg uninstallation works correctly, even though it is required by the 8987402a6fSmrg GNU Coding Standards. 9087402a6fSmrg 9187402a6fSmrg 8. Some packages, particularly those that use Automake, provide `make 9287402a6fSmrg distcheck', which can by used by developers to test that all other 9387402a6fSmrg targets like `make install' and `make uninstall' work correctly. 9487402a6fSmrg This target is generally not run by end users. 955cf18391Smrg 965cf18391SmrgCompilers and Options 975cf18391Smrg===================== 985cf18391Smrg 995cf18391Smrg Some systems require unusual options for compilation or linking that 1005cf18391Smrgthe `configure' script does not know about. Run `./configure --help' 1015cf18391Smrgfor details on some of the pertinent environment variables. 1025cf18391Smrg 1035cf18391Smrg You can give `configure' initial values for configuration parameters 1045cf18391Smrgby setting variables in the command line or in the environment. Here 1055cf18391Smrgis an example: 1065cf18391Smrg 1075cf18391Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1085cf18391Smrg 1095cf18391Smrg *Note Defining Variables::, for more details. 1105cf18391Smrg 1115cf18391SmrgCompiling For Multiple Architectures 1125cf18391Smrg==================================== 1135cf18391Smrg 1145cf18391Smrg You can compile the package for more than one kind of computer at the 1155cf18391Smrgsame time, by placing the object files for each architecture in their 1165cf18391Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1175cf18391Smrgdirectory where you want the object files and executables to go and run 1185cf18391Smrgthe `configure' script. `configure' automatically checks for the 11987402a6fSmrgsource code in the directory that `configure' is in and in `..'. This 12087402a6fSmrgis known as a "VPATH" build. 1215cf18391Smrg 1225cf18391Smrg With a non-GNU `make', it is safer to compile the package for one 1235cf18391Smrgarchitecture at a time in the source code directory. After you have 1245cf18391Smrginstalled the package for one architecture, use `make distclean' before 1255cf18391Smrgreconfiguring for another architecture. 1265cf18391Smrg 1275cf18391Smrg On MacOS X 10.5 and later systems, you can create libraries and 1285cf18391Smrgexecutables that work on multiple system types--known as "fat" or 1295cf18391Smrg"universal" binaries--by specifying multiple `-arch' options to the 1305cf18391Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1315cf18391Smrgthis: 1325cf18391Smrg 1335cf18391Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1345cf18391Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1355cf18391Smrg CPP="gcc -E" CXXCPP="g++ -E" 1365cf18391Smrg 1375cf18391Smrg This is not guaranteed to produce working output in all cases, you 1385cf18391Smrgmay have to build one architecture at a time and combine the results 1395cf18391Smrgusing the `lipo' tool if you have problems. 1405cf18391Smrg 1415cf18391SmrgInstallation Names 1425cf18391Smrg================== 1435cf18391Smrg 1445cf18391Smrg By default, `make install' installs the package's commands under 1455cf18391Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1465cf18391Smrgcan specify an installation prefix other than `/usr/local' by giving 14787402a6fSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14887402a6fSmrgabsolute file name. 1495cf18391Smrg 1505cf18391Smrg You can specify separate installation prefixes for 1515cf18391Smrgarchitecture-specific files and architecture-independent files. If you 1525cf18391Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1535cf18391SmrgPREFIX as the prefix for installing programs and libraries. 1545cf18391SmrgDocumentation and other data files still use the regular prefix. 1555cf18391Smrg 1565cf18391Smrg In addition, if you use an unusual directory layout you can give 1575cf18391Smrgoptions like `--bindir=DIR' to specify different values for particular 1585cf18391Smrgkinds of files. Run `configure --help' for a list of the directories 15987402a6fSmrgyou can set and what kinds of files go in them. In general, the 16087402a6fSmrgdefault for these options is expressed in terms of `${prefix}', so that 16187402a6fSmrgspecifying just `--prefix' will affect all of the other directory 16287402a6fSmrgspecifications that were not explicitly provided. 16387402a6fSmrg 16487402a6fSmrg The most portable way to affect installation locations is to pass the 16587402a6fSmrgcorrect locations to `configure'; however, many packages provide one or 16687402a6fSmrgboth of the following shortcuts of passing variable assignments to the 16787402a6fSmrg`make install' command line to change installation locations without 16887402a6fSmrghaving to reconfigure or recompile. 16987402a6fSmrg 17087402a6fSmrg The first method involves providing an override variable for each 17187402a6fSmrgaffected directory. For example, `make install 17287402a6fSmrgprefix=/alternate/directory' will choose an alternate location for all 17387402a6fSmrgdirectory configuration variables that were expressed in terms of 17487402a6fSmrg`${prefix}'. Any directories that were specified during `configure', 17587402a6fSmrgbut not in terms of `${prefix}', must each be overridden at install 17687402a6fSmrgtime for the entire installation to be relocated. The approach of 17787402a6fSmrgmakefile variable overrides for each directory variable is required by 17887402a6fSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17987402a6fSmrgHowever, some platforms have known limitations with the semantics of 18087402a6fSmrgshared libraries that end up requiring recompilation when using this 18187402a6fSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18287402a6fSmrg 18387402a6fSmrg The second method involves providing the `DESTDIR' variable. For 18487402a6fSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18587402a6fSmrg`/alternate/directory' before all installation names. The approach of 18687402a6fSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18787402a6fSmrgdoes not work on platforms that have drive letters. On the other hand, 18887402a6fSmrgit does better at avoiding recompilation issues, and works well even 18987402a6fSmrgwhen some directory options were not specified in terms of `${prefix}' 19087402a6fSmrgat `configure' time. 19187402a6fSmrg 19287402a6fSmrgOptional Features 19387402a6fSmrg================= 1945cf18391Smrg 1955cf18391Smrg If the package supports it, you can cause programs to be installed 1965cf18391Smrgwith an extra prefix or suffix on their names by giving `configure' the 1975cf18391Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1985cf18391Smrg 1995cf18391Smrg Some packages pay attention to `--enable-FEATURE' options to 2005cf18391Smrg`configure', where FEATURE indicates an optional part of the package. 2015cf18391SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2025cf18391Smrgis something like `gnu-as' or `x' (for the X Window System). The 2035cf18391Smrg`README' should mention any `--enable-' and `--with-' options that the 2045cf18391Smrgpackage recognizes. 2055cf18391Smrg 2065cf18391Smrg For packages that use the X Window System, `configure' can usually 2075cf18391Smrgfind the X include and library files automatically, but if it doesn't, 2085cf18391Smrgyou can use the `configure' options `--x-includes=DIR' and 2095cf18391Smrg`--x-libraries=DIR' to specify their locations. 2105cf18391Smrg 21187402a6fSmrg Some packages offer the ability to configure how verbose the 21287402a6fSmrgexecution of `make' will be. For these packages, running `./configure 21387402a6fSmrg--enable-silent-rules' sets the default to minimal output, which can be 21487402a6fSmrgoverridden with `make V=1'; while running `./configure 21587402a6fSmrg--disable-silent-rules' sets the default to verbose, which can be 21687402a6fSmrgoverridden with `make V=0'. 21787402a6fSmrg 2185cf18391SmrgParticular systems 2195cf18391Smrg================== 2205cf18391Smrg 2215cf18391Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2225cf18391SmrgCC is not installed, it is recommended to use the following options in 2235cf18391Smrgorder to use an ANSI C compiler: 2245cf18391Smrg 22587402a6fSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2265cf18391Smrg 2275cf18391Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2285cf18391Smrg 22987402a6fSmrg HP-UX `make' updates targets which have the same time stamps as 23087402a6fSmrgtheir prerequisites, which makes it generally unusable when shipped 23187402a6fSmrggenerated files such as `configure' are involved. Use GNU `make' 23287402a6fSmrginstead. 23387402a6fSmrg 2345cf18391Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2355cf18391Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2365cf18391Smrga workaround. If GNU CC is not installed, it is therefore recommended 2375cf18391Smrgto try 2385cf18391Smrg 2395cf18391Smrg ./configure CC="cc" 2405cf18391Smrg 2415cf18391Smrgand if that doesn't work, try 2425cf18391Smrg 2435cf18391Smrg ./configure CC="cc -nodtk" 2445cf18391Smrg 24587402a6fSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24687402a6fSmrgdirectory contains several dysfunctional programs; working variants of 24787402a6fSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24887402a6fSmrgin your `PATH', put it _after_ `/usr/bin'. 24987402a6fSmrg 25087402a6fSmrg On Haiku, software installed for all users goes in `/boot/common', 25187402a6fSmrgnot `/usr/local'. It is recommended to use the following options: 25287402a6fSmrg 25387402a6fSmrg ./configure --prefix=/boot/common 25487402a6fSmrg 2555cf18391SmrgSpecifying the System Type 2565cf18391Smrg========================== 2575cf18391Smrg 2585cf18391Smrg There may be some features `configure' cannot figure out 2595cf18391Smrgautomatically, but needs to determine by the type of machine the package 2605cf18391Smrgwill run on. Usually, assuming the package is built to be run on the 2615cf18391Smrg_same_ architectures, `configure' can figure that out, but if it prints 2625cf18391Smrga message saying it cannot guess the machine type, give it the 2635cf18391Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2645cf18391Smrgtype, such as `sun4', or a canonical name which has the form: 2655cf18391Smrg 2665cf18391Smrg CPU-COMPANY-SYSTEM 2675cf18391Smrg 2685cf18391Smrgwhere SYSTEM can have one of these forms: 2695cf18391Smrg 27087402a6fSmrg OS 27187402a6fSmrg KERNEL-OS 2725cf18391Smrg 2735cf18391Smrg See the file `config.sub' for the possible values of each field. If 2745cf18391Smrg`config.sub' isn't included in this package, then this package doesn't 2755cf18391Smrgneed to know the machine type. 2765cf18391Smrg 2775cf18391Smrg If you are _building_ compiler tools for cross-compiling, you should 2785cf18391Smrguse the option `--target=TYPE' to select the type of system they will 2795cf18391Smrgproduce code for. 2805cf18391Smrg 2815cf18391Smrg If you want to _use_ a cross compiler, that generates code for a 2825cf18391Smrgplatform different from the build platform, you should specify the 2835cf18391Smrg"host" platform (i.e., that on which the generated programs will 2845cf18391Smrgeventually be run) with `--host=TYPE'. 2855cf18391Smrg 2865cf18391SmrgSharing Defaults 2875cf18391Smrg================ 2885cf18391Smrg 2895cf18391Smrg If you want to set default values for `configure' scripts to share, 2905cf18391Smrgyou can create a site shell script called `config.site' that gives 2915cf18391Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2925cf18391Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2935cf18391Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2945cf18391Smrg`CONFIG_SITE' environment variable to the location of the site script. 2955cf18391SmrgA warning: not all `configure' scripts look for a site script. 2965cf18391Smrg 2975cf18391SmrgDefining Variables 2985cf18391Smrg================== 2995cf18391Smrg 3005cf18391Smrg Variables not defined in a site shell script can be set in the 3015cf18391Smrgenvironment passed to `configure'. However, some packages may run 3025cf18391Smrgconfigure again during the build, and the customized values of these 3035cf18391Smrgvariables may be lost. In order to avoid this problem, you should set 3045cf18391Smrgthem in the `configure' command line, using `VAR=value'. For example: 3055cf18391Smrg 3065cf18391Smrg ./configure CC=/usr/local2/bin/gcc 3075cf18391Smrg 3085cf18391Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3095cf18391Smrgoverridden in the site shell script). 3105cf18391Smrg 3115cf18391SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3125cf18391Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3135cf18391Smrg 3145cf18391Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3155cf18391Smrg 3165cf18391Smrg`configure' Invocation 3175cf18391Smrg====================== 3185cf18391Smrg 3195cf18391Smrg `configure' recognizes the following options to control how it 3205cf18391Smrgoperates. 3215cf18391Smrg 3225cf18391Smrg`--help' 3235cf18391Smrg`-h' 3245cf18391Smrg Print a summary of all of the options to `configure', and exit. 3255cf18391Smrg 3265cf18391Smrg`--help=short' 3275cf18391Smrg`--help=recursive' 3285cf18391Smrg Print a summary of the options unique to this package's 3295cf18391Smrg `configure', and exit. The `short' variant lists options used 3305cf18391Smrg only in the top level, while the `recursive' variant lists options 3315cf18391Smrg also present in any nested packages. 3325cf18391Smrg 3335cf18391Smrg`--version' 3345cf18391Smrg`-V' 3355cf18391Smrg Print the version of Autoconf used to generate the `configure' 3365cf18391Smrg script, and exit. 3375cf18391Smrg 3385cf18391Smrg`--cache-file=FILE' 3395cf18391Smrg Enable the cache: use and save the results of the tests in FILE, 3405cf18391Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3415cf18391Smrg disable caching. 3425cf18391Smrg 3435cf18391Smrg`--config-cache' 3445cf18391Smrg`-C' 3455cf18391Smrg Alias for `--cache-file=config.cache'. 3465cf18391Smrg 3475cf18391Smrg`--quiet' 3485cf18391Smrg`--silent' 3495cf18391Smrg`-q' 3505cf18391Smrg Do not print messages saying which checks are being made. To 3515cf18391Smrg suppress all normal output, redirect it to `/dev/null' (any error 3525cf18391Smrg messages will still be shown). 3535cf18391Smrg 3545cf18391Smrg`--srcdir=DIR' 3555cf18391Smrg Look for the package's source code in directory DIR. Usually 3565cf18391Smrg `configure' can determine that directory automatically. 3575cf18391Smrg 3585cf18391Smrg`--prefix=DIR' 35987402a6fSmrg Use DIR as the installation prefix. *note Installation Names:: 3605cf18391Smrg for more details, including other options available for fine-tuning 3615cf18391Smrg the installation locations. 3625cf18391Smrg 3635cf18391Smrg`--no-create' 3645cf18391Smrg`-n' 3655cf18391Smrg Run the configure checks, but stop before creating any output 3665cf18391Smrg files. 3675cf18391Smrg 3685cf18391Smrg`configure' also accepts some other, not widely useful, options. Run 3695cf18391Smrg`configure --help' for more details. 3705cf18391Smrg 371