16f5dd5c2SmrgInstallation Instructions 26f5dd5c2Smrg************************* 36f5dd5c2Smrg 4feee4651SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5feee4651SmrgInc. 66f5dd5c2Smrg 7feee4651Smrg Copying and distribution of this file, with or without modification, 8feee4651Smrgare permitted in any medium without royalty provided the copyright 9feee4651Smrgnotice and this notice are preserved. This file is offered as-is, 10feee4651Smrgwithout warranty of any kind. 116f5dd5c2Smrg 126f5dd5c2SmrgBasic Installation 136f5dd5c2Smrg================== 146f5dd5c2Smrg 156f5dd5c2Smrg Briefly, the shell commands `./configure; make; make install' should 166f5dd5c2Smrgconfigure, build, and install this package. The following 176f5dd5c2Smrgmore-detailed instructions are generic; see the `README' file for 18feee4651Smrginstructions specific to this package. Some packages provide this 19feee4651Smrg`INSTALL' file but do not implement all of the features documented 20feee4651Smrgbelow. The lack of an optional feature in a given package is not 21feee4651Smrgnecessarily a bug. More recommendations for GNU packages can be found 22feee4651Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 236f5dd5c2Smrg 246f5dd5c2Smrg The `configure' shell script attempts to guess correct values for 256f5dd5c2Smrgvarious system-dependent variables used during compilation. It uses 266f5dd5c2Smrgthose values to create a `Makefile' in each directory of the package. 276f5dd5c2SmrgIt may also create one or more `.h' files containing system-dependent 286f5dd5c2Smrgdefinitions. Finally, it creates a shell script `config.status' that 296f5dd5c2Smrgyou can run in the future to recreate the current configuration, and a 306f5dd5c2Smrgfile `config.log' containing compiler output (useful mainly for 316f5dd5c2Smrgdebugging `configure'). 326f5dd5c2Smrg 336f5dd5c2Smrg It can also use an optional file (typically called `config.cache' 346f5dd5c2Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 356f5dd5c2Smrgthe results of its tests to speed up reconfiguring. Caching is 366f5dd5c2Smrgdisabled by default to prevent problems with accidental use of stale 376f5dd5c2Smrgcache files. 386f5dd5c2Smrg 396f5dd5c2Smrg If you need to do unusual things to compile the package, please try 406f5dd5c2Smrgto figure out how `configure' could check whether to do them, and mail 416f5dd5c2Smrgdiffs or instructions to the address given in the `README' so they can 426f5dd5c2Smrgbe considered for the next release. If you are using the cache, and at 436f5dd5c2Smrgsome point `config.cache' contains results you don't want to keep, you 446f5dd5c2Smrgmay remove or edit it. 456f5dd5c2Smrg 466f5dd5c2Smrg The file `configure.ac' (or `configure.in') is used to create 476f5dd5c2Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 486f5dd5c2Smrgyou want to change it or regenerate `configure' using a newer version 496f5dd5c2Smrgof `autoconf'. 506f5dd5c2Smrg 51feee4651Smrg The simplest way to compile this package is: 526f5dd5c2Smrg 536f5dd5c2Smrg 1. `cd' to the directory containing the package's source code and type 546f5dd5c2Smrg `./configure' to configure the package for your system. 556f5dd5c2Smrg 566f5dd5c2Smrg Running `configure' might take a while. While running, it prints 576f5dd5c2Smrg some messages telling which features it is checking for. 586f5dd5c2Smrg 596f5dd5c2Smrg 2. Type `make' to compile the package. 606f5dd5c2Smrg 616f5dd5c2Smrg 3. Optionally, type `make check' to run any self-tests that come with 62feee4651Smrg the package, generally using the just-built uninstalled binaries. 636f5dd5c2Smrg 646f5dd5c2Smrg 4. Type `make install' to install the programs and any data files and 65feee4651Smrg documentation. When installing into a prefix owned by root, it is 66feee4651Smrg recommended that the package be configured and built as a regular 67feee4651Smrg user, and only the `make install' phase executed with root 68feee4651Smrg privileges. 69feee4651Smrg 70feee4651Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71feee4651Smrg this time using the binaries in their final installed location. 72feee4651Smrg This target does not install anything. Running this target as a 73feee4651Smrg regular user, particularly if the prior `make install' required 74feee4651Smrg root privileges, verifies that the installation completed 75feee4651Smrg correctly. 76feee4651Smrg 77feee4651Smrg 6. You can remove the program binaries and object files from the 786f5dd5c2Smrg source code directory by typing `make clean'. To also remove the 796f5dd5c2Smrg files that `configure' created (so you can compile the package for 806f5dd5c2Smrg a different kind of computer), type `make distclean'. There is 816f5dd5c2Smrg also a `make maintainer-clean' target, but that is intended mainly 826f5dd5c2Smrg for the package's developers. If you use it, you may have to get 836f5dd5c2Smrg all sorts of other programs in order to regenerate files that came 846f5dd5c2Smrg with the distribution. 856f5dd5c2Smrg 86feee4651Smrg 7. Often, you can also type `make uninstall' to remove the installed 87feee4651Smrg files again. In practice, not all packages have tested that 88feee4651Smrg uninstallation works correctly, even though it is required by the 89feee4651Smrg GNU Coding Standards. 90feee4651Smrg 91feee4651Smrg 8. Some packages, particularly those that use Automake, provide `make 92feee4651Smrg distcheck', which can by used by developers to test that all other 93feee4651Smrg targets like `make install' and `make uninstall' work correctly. 94feee4651Smrg This target is generally not run by end users. 956f5dd5c2Smrg 966f5dd5c2SmrgCompilers and Options 976f5dd5c2Smrg===================== 986f5dd5c2Smrg 996f5dd5c2Smrg Some systems require unusual options for compilation or linking that 1006f5dd5c2Smrgthe `configure' script does not know about. Run `./configure --help' 1016f5dd5c2Smrgfor details on some of the pertinent environment variables. 1026f5dd5c2Smrg 1036f5dd5c2Smrg You can give `configure' initial values for configuration parameters 1046f5dd5c2Smrgby setting variables in the command line or in the environment. Here 1056f5dd5c2Smrgis an example: 1066f5dd5c2Smrg 1076f5dd5c2Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1086f5dd5c2Smrg 1096f5dd5c2Smrg *Note Defining Variables::, for more details. 1106f5dd5c2Smrg 1116f5dd5c2SmrgCompiling For Multiple Architectures 1126f5dd5c2Smrg==================================== 1136f5dd5c2Smrg 1146f5dd5c2Smrg You can compile the package for more than one kind of computer at the 1156f5dd5c2Smrgsame time, by placing the object files for each architecture in their 1166f5dd5c2Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1176f5dd5c2Smrgdirectory where you want the object files and executables to go and run 1186f5dd5c2Smrgthe `configure' script. `configure' automatically checks for the 119feee4651Smrgsource code in the directory that `configure' is in and in `..'. This 120feee4651Smrgis known as a "VPATH" build. 1216f5dd5c2Smrg 1226f5dd5c2Smrg With a non-GNU `make', it is safer to compile the package for one 1236f5dd5c2Smrgarchitecture at a time in the source code directory. After you have 1246f5dd5c2Smrginstalled the package for one architecture, use `make distclean' before 1256f5dd5c2Smrgreconfiguring for another architecture. 1266f5dd5c2Smrg 1276f5dd5c2Smrg On MacOS X 10.5 and later systems, you can create libraries and 1286f5dd5c2Smrgexecutables that work on multiple system types--known as "fat" or 1296f5dd5c2Smrg"universal" binaries--by specifying multiple `-arch' options to the 1306f5dd5c2Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1316f5dd5c2Smrgthis: 1326f5dd5c2Smrg 1336f5dd5c2Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1346f5dd5c2Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1356f5dd5c2Smrg CPP="gcc -E" CXXCPP="g++ -E" 1366f5dd5c2Smrg 1376f5dd5c2Smrg This is not guaranteed to produce working output in all cases, you 1386f5dd5c2Smrgmay have to build one architecture at a time and combine the results 1396f5dd5c2Smrgusing the `lipo' tool if you have problems. 1406f5dd5c2Smrg 1416f5dd5c2SmrgInstallation Names 1426f5dd5c2Smrg================== 1436f5dd5c2Smrg 1446f5dd5c2Smrg By default, `make install' installs the package's commands under 1456f5dd5c2Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1466f5dd5c2Smrgcan specify an installation prefix other than `/usr/local' by giving 147feee4651Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148feee4651Smrgabsolute file name. 1496f5dd5c2Smrg 1506f5dd5c2Smrg You can specify separate installation prefixes for 1516f5dd5c2Smrgarchitecture-specific files and architecture-independent files. If you 1526f5dd5c2Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1536f5dd5c2SmrgPREFIX as the prefix for installing programs and libraries. 1546f5dd5c2SmrgDocumentation and other data files still use the regular prefix. 1556f5dd5c2Smrg 1566f5dd5c2Smrg In addition, if you use an unusual directory layout you can give 1576f5dd5c2Smrgoptions like `--bindir=DIR' to specify different values for particular 1586f5dd5c2Smrgkinds of files. Run `configure --help' for a list of the directories 159feee4651Smrgyou can set and what kinds of files go in them. In general, the 160feee4651Smrgdefault for these options is expressed in terms of `${prefix}', so that 161feee4651Smrgspecifying just `--prefix' will affect all of the other directory 162feee4651Smrgspecifications that were not explicitly provided. 163feee4651Smrg 164feee4651Smrg The most portable way to affect installation locations is to pass the 165feee4651Smrgcorrect locations to `configure'; however, many packages provide one or 166feee4651Smrgboth of the following shortcuts of passing variable assignments to the 167feee4651Smrg`make install' command line to change installation locations without 168feee4651Smrghaving to reconfigure or recompile. 169feee4651Smrg 170feee4651Smrg The first method involves providing an override variable for each 171feee4651Smrgaffected directory. For example, `make install 172feee4651Smrgprefix=/alternate/directory' will choose an alternate location for all 173feee4651Smrgdirectory configuration variables that were expressed in terms of 174feee4651Smrg`${prefix}'. Any directories that were specified during `configure', 175feee4651Smrgbut not in terms of `${prefix}', must each be overridden at install 176feee4651Smrgtime for the entire installation to be relocated. The approach of 177feee4651Smrgmakefile variable overrides for each directory variable is required by 178feee4651Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179feee4651SmrgHowever, some platforms have known limitations with the semantics of 180feee4651Smrgshared libraries that end up requiring recompilation when using this 181feee4651Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182feee4651Smrg 183feee4651Smrg The second method involves providing the `DESTDIR' variable. For 184feee4651Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185feee4651Smrg`/alternate/directory' before all installation names. The approach of 186feee4651Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187feee4651Smrgdoes not work on platforms that have drive letters. On the other hand, 188feee4651Smrgit does better at avoiding recompilation issues, and works well even 189feee4651Smrgwhen some directory options were not specified in terms of `${prefix}' 190feee4651Smrgat `configure' time. 191feee4651Smrg 192feee4651SmrgOptional Features 193feee4651Smrg================= 1946f5dd5c2Smrg 1956f5dd5c2Smrg If the package supports it, you can cause programs to be installed 1966f5dd5c2Smrgwith an extra prefix or suffix on their names by giving `configure' the 1976f5dd5c2Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1986f5dd5c2Smrg 1996f5dd5c2Smrg Some packages pay attention to `--enable-FEATURE' options to 2006f5dd5c2Smrg`configure', where FEATURE indicates an optional part of the package. 2016f5dd5c2SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2026f5dd5c2Smrgis something like `gnu-as' or `x' (for the X Window System). The 2036f5dd5c2Smrg`README' should mention any `--enable-' and `--with-' options that the 2046f5dd5c2Smrgpackage recognizes. 2056f5dd5c2Smrg 2066f5dd5c2Smrg For packages that use the X Window System, `configure' can usually 2076f5dd5c2Smrgfind the X include and library files automatically, but if it doesn't, 2086f5dd5c2Smrgyou can use the `configure' options `--x-includes=DIR' and 2096f5dd5c2Smrg`--x-libraries=DIR' to specify their locations. 2106f5dd5c2Smrg 211feee4651Smrg Some packages offer the ability to configure how verbose the 212feee4651Smrgexecution of `make' will be. For these packages, running `./configure 213feee4651Smrg--enable-silent-rules' sets the default to minimal output, which can be 214feee4651Smrgoverridden with `make V=1'; while running `./configure 215feee4651Smrg--disable-silent-rules' sets the default to verbose, which can be 216feee4651Smrgoverridden with `make V=0'. 217feee4651Smrg 2186f5dd5c2SmrgParticular systems 2196f5dd5c2Smrg================== 2206f5dd5c2Smrg 2216f5dd5c2Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2226f5dd5c2SmrgCC is not installed, it is recommended to use the following options in 2236f5dd5c2Smrgorder to use an ANSI C compiler: 2246f5dd5c2Smrg 225feee4651Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2266f5dd5c2Smrg 2276f5dd5c2Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2286f5dd5c2Smrg 229feee4651Smrg HP-UX `make' updates targets which have the same time stamps as 230feee4651Smrgtheir prerequisites, which makes it generally unusable when shipped 231feee4651Smrggenerated files such as `configure' are involved. Use GNU `make' 232feee4651Smrginstead. 233feee4651Smrg 2346f5dd5c2Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2356f5dd5c2Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2366f5dd5c2Smrga workaround. If GNU CC is not installed, it is therefore recommended 2376f5dd5c2Smrgto try 2386f5dd5c2Smrg 2396f5dd5c2Smrg ./configure CC="cc" 2406f5dd5c2Smrg 2416f5dd5c2Smrgand if that doesn't work, try 2426f5dd5c2Smrg 2436f5dd5c2Smrg ./configure CC="cc -nodtk" 2446f5dd5c2Smrg 245feee4651Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246feee4651Smrgdirectory contains several dysfunctional programs; working variants of 247feee4651Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248feee4651Smrgin your `PATH', put it _after_ `/usr/bin'. 249feee4651Smrg 250feee4651Smrg On Haiku, software installed for all users goes in `/boot/common', 251feee4651Smrgnot `/usr/local'. It is recommended to use the following options: 252feee4651Smrg 253feee4651Smrg ./configure --prefix=/boot/common 254feee4651Smrg 2556f5dd5c2SmrgSpecifying the System Type 2566f5dd5c2Smrg========================== 2576f5dd5c2Smrg 2586f5dd5c2Smrg There may be some features `configure' cannot figure out 2596f5dd5c2Smrgautomatically, but needs to determine by the type of machine the package 2606f5dd5c2Smrgwill run on. Usually, assuming the package is built to be run on the 2616f5dd5c2Smrg_same_ architectures, `configure' can figure that out, but if it prints 2626f5dd5c2Smrga message saying it cannot guess the machine type, give it the 2636f5dd5c2Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2646f5dd5c2Smrgtype, such as `sun4', or a canonical name which has the form: 2656f5dd5c2Smrg 2666f5dd5c2Smrg CPU-COMPANY-SYSTEM 2676f5dd5c2Smrg 2686f5dd5c2Smrgwhere SYSTEM can have one of these forms: 2696f5dd5c2Smrg 270feee4651Smrg OS 271feee4651Smrg KERNEL-OS 2726f5dd5c2Smrg 2736f5dd5c2Smrg See the file `config.sub' for the possible values of each field. If 2746f5dd5c2Smrg`config.sub' isn't included in this package, then this package doesn't 2756f5dd5c2Smrgneed to know the machine type. 2766f5dd5c2Smrg 2776f5dd5c2Smrg If you are _building_ compiler tools for cross-compiling, you should 2786f5dd5c2Smrguse the option `--target=TYPE' to select the type of system they will 2796f5dd5c2Smrgproduce code for. 2806f5dd5c2Smrg 2816f5dd5c2Smrg If you want to _use_ a cross compiler, that generates code for a 2826f5dd5c2Smrgplatform different from the build platform, you should specify the 2836f5dd5c2Smrg"host" platform (i.e., that on which the generated programs will 2846f5dd5c2Smrgeventually be run) with `--host=TYPE'. 2856f5dd5c2Smrg 2866f5dd5c2SmrgSharing Defaults 2876f5dd5c2Smrg================ 2886f5dd5c2Smrg 2896f5dd5c2Smrg If you want to set default values for `configure' scripts to share, 2906f5dd5c2Smrgyou can create a site shell script called `config.site' that gives 2916f5dd5c2Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2926f5dd5c2Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2936f5dd5c2Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2946f5dd5c2Smrg`CONFIG_SITE' environment variable to the location of the site script. 2956f5dd5c2SmrgA warning: not all `configure' scripts look for a site script. 2966f5dd5c2Smrg 2976f5dd5c2SmrgDefining Variables 2986f5dd5c2Smrg================== 2996f5dd5c2Smrg 3006f5dd5c2Smrg Variables not defined in a site shell script can be set in the 3016f5dd5c2Smrgenvironment passed to `configure'. However, some packages may run 3026f5dd5c2Smrgconfigure again during the build, and the customized values of these 3036f5dd5c2Smrgvariables may be lost. In order to avoid this problem, you should set 3046f5dd5c2Smrgthem in the `configure' command line, using `VAR=value'. For example: 3056f5dd5c2Smrg 3066f5dd5c2Smrg ./configure CC=/usr/local2/bin/gcc 3076f5dd5c2Smrg 3086f5dd5c2Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3096f5dd5c2Smrgoverridden in the site shell script). 3106f5dd5c2Smrg 3116f5dd5c2SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3126f5dd5c2Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3136f5dd5c2Smrg 3146f5dd5c2Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3156f5dd5c2Smrg 3166f5dd5c2Smrg`configure' Invocation 3176f5dd5c2Smrg====================== 3186f5dd5c2Smrg 3196f5dd5c2Smrg `configure' recognizes the following options to control how it 3206f5dd5c2Smrgoperates. 3216f5dd5c2Smrg 3226f5dd5c2Smrg`--help' 3236f5dd5c2Smrg`-h' 3246f5dd5c2Smrg Print a summary of all of the options to `configure', and exit. 3256f5dd5c2Smrg 3266f5dd5c2Smrg`--help=short' 3276f5dd5c2Smrg`--help=recursive' 3286f5dd5c2Smrg Print a summary of the options unique to this package's 3296f5dd5c2Smrg `configure', and exit. The `short' variant lists options used 3306f5dd5c2Smrg only in the top level, while the `recursive' variant lists options 3316f5dd5c2Smrg also present in any nested packages. 3326f5dd5c2Smrg 3336f5dd5c2Smrg`--version' 3346f5dd5c2Smrg`-V' 3356f5dd5c2Smrg Print the version of Autoconf used to generate the `configure' 3366f5dd5c2Smrg script, and exit. 3376f5dd5c2Smrg 3386f5dd5c2Smrg`--cache-file=FILE' 3396f5dd5c2Smrg Enable the cache: use and save the results of the tests in FILE, 3406f5dd5c2Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3416f5dd5c2Smrg disable caching. 3426f5dd5c2Smrg 3436f5dd5c2Smrg`--config-cache' 3446f5dd5c2Smrg`-C' 3456f5dd5c2Smrg Alias for `--cache-file=config.cache'. 3466f5dd5c2Smrg 3476f5dd5c2Smrg`--quiet' 3486f5dd5c2Smrg`--silent' 3496f5dd5c2Smrg`-q' 3506f5dd5c2Smrg Do not print messages saying which checks are being made. To 3516f5dd5c2Smrg suppress all normal output, redirect it to `/dev/null' (any error 3526f5dd5c2Smrg messages will still be shown). 3536f5dd5c2Smrg 3546f5dd5c2Smrg`--srcdir=DIR' 3556f5dd5c2Smrg Look for the package's source code in directory DIR. Usually 3566f5dd5c2Smrg `configure' can determine that directory automatically. 3576f5dd5c2Smrg 3586f5dd5c2Smrg`--prefix=DIR' 359feee4651Smrg Use DIR as the installation prefix. *note Installation Names:: 3606f5dd5c2Smrg for more details, including other options available for fine-tuning 3616f5dd5c2Smrg the installation locations. 3626f5dd5c2Smrg 3636f5dd5c2Smrg`--no-create' 3646f5dd5c2Smrg`-n' 3656f5dd5c2Smrg Run the configure checks, but stop before creating any output 3666f5dd5c2Smrg files. 3676f5dd5c2Smrg 3686f5dd5c2Smrg`configure' also accepts some other, not widely useful, options. Run 3696f5dd5c2Smrg`configure --help' for more details. 3706f5dd5c2Smrg 371