16747b715SmrgInstallation Instructions 26747b715Smrg************************* 36747b715Smrg 435c4bbdfSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 535c4bbdfSmrgInc. 66747b715Smrg 735c4bbdfSmrg Copying and distribution of this file, with or without modification, 835c4bbdfSmrgare permitted in any medium without royalty provided the copyright 935c4bbdfSmrgnotice and this notice are preserved. This file is offered as-is, 1035c4bbdfSmrgwithout warranty of any kind. 116747b715Smrg 126747b715SmrgBasic Installation 136747b715Smrg================== 146747b715Smrg 156747b715Smrg Briefly, the shell commands `./configure; make; make install' should 166747b715Smrgconfigure, build, and install this package. The following 176747b715Smrgmore-detailed instructions are generic; see the `README' file for 1835c4bbdfSmrginstructions specific to this package. Some packages provide this 1935c4bbdfSmrg`INSTALL' file but do not implement all of the features documented 2035c4bbdfSmrgbelow. The lack of an optional feature in a given package is not 2135c4bbdfSmrgnecessarily a bug. More recommendations for GNU packages can be found 2235c4bbdfSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 236747b715Smrg 246747b715Smrg The `configure' shell script attempts to guess correct values for 256747b715Smrgvarious system-dependent variables used during compilation. It uses 266747b715Smrgthose values to create a `Makefile' in each directory of the package. 276747b715SmrgIt may also create one or more `.h' files containing system-dependent 286747b715Smrgdefinitions. Finally, it creates a shell script `config.status' that 296747b715Smrgyou can run in the future to recreate the current configuration, and a 306747b715Smrgfile `config.log' containing compiler output (useful mainly for 316747b715Smrgdebugging `configure'). 326747b715Smrg 336747b715Smrg It can also use an optional file (typically called `config.cache' 346747b715Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 356747b715Smrgthe results of its tests to speed up reconfiguring. Caching is 366747b715Smrgdisabled by default to prevent problems with accidental use of stale 376747b715Smrgcache files. 386747b715Smrg 396747b715Smrg If you need to do unusual things to compile the package, please try 406747b715Smrgto figure out how `configure' could check whether to do them, and mail 416747b715Smrgdiffs or instructions to the address given in the `README' so they can 426747b715Smrgbe considered for the next release. If you are using the cache, and at 436747b715Smrgsome point `config.cache' contains results you don't want to keep, you 446747b715Smrgmay remove or edit it. 456747b715Smrg 466747b715Smrg The file `configure.ac' (or `configure.in') is used to create 476747b715Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 486747b715Smrgyou want to change it or regenerate `configure' using a newer version 496747b715Smrgof `autoconf'. 506747b715Smrg 5135c4bbdfSmrg The simplest way to compile this package is: 526747b715Smrg 536747b715Smrg 1. `cd' to the directory containing the package's source code and type 546747b715Smrg `./configure' to configure the package for your system. 556747b715Smrg 566747b715Smrg Running `configure' might take a while. While running, it prints 576747b715Smrg some messages telling which features it is checking for. 586747b715Smrg 596747b715Smrg 2. Type `make' to compile the package. 606747b715Smrg 616747b715Smrg 3. Optionally, type `make check' to run any self-tests that come with 6235c4bbdfSmrg the package, generally using the just-built uninstalled binaries. 636747b715Smrg 646747b715Smrg 4. Type `make install' to install the programs and any data files and 6535c4bbdfSmrg documentation. When installing into a prefix owned by root, it is 6635c4bbdfSmrg recommended that the package be configured and built as a regular 6735c4bbdfSmrg user, and only the `make install' phase executed with root 6835c4bbdfSmrg privileges. 6935c4bbdfSmrg 7035c4bbdfSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7135c4bbdfSmrg this time using the binaries in their final installed location. 7235c4bbdfSmrg This target does not install anything. Running this target as a 7335c4bbdfSmrg regular user, particularly if the prior `make install' required 7435c4bbdfSmrg root privileges, verifies that the installation completed 7535c4bbdfSmrg correctly. 7635c4bbdfSmrg 7735c4bbdfSmrg 6. You can remove the program binaries and object files from the 786747b715Smrg source code directory by typing `make clean'. To also remove the 796747b715Smrg files that `configure' created (so you can compile the package for 806747b715Smrg a different kind of computer), type `make distclean'. There is 816747b715Smrg also a `make maintainer-clean' target, but that is intended mainly 826747b715Smrg for the package's developers. If you use it, you may have to get 836747b715Smrg all sorts of other programs in order to regenerate files that came 846747b715Smrg with the distribution. 856747b715Smrg 8635c4bbdfSmrg 7. Often, you can also type `make uninstall' to remove the installed 8735c4bbdfSmrg files again. In practice, not all packages have tested that 8835c4bbdfSmrg uninstallation works correctly, even though it is required by the 8935c4bbdfSmrg GNU Coding Standards. 9035c4bbdfSmrg 9135c4bbdfSmrg 8. Some packages, particularly those that use Automake, provide `make 9235c4bbdfSmrg distcheck', which can by used by developers to test that all other 9335c4bbdfSmrg targets like `make install' and `make uninstall' work correctly. 9435c4bbdfSmrg This target is generally not run by end users. 956747b715Smrg 966747b715SmrgCompilers and Options 976747b715Smrg===================== 986747b715Smrg 996747b715Smrg Some systems require unusual options for compilation or linking that 1006747b715Smrgthe `configure' script does not know about. Run `./configure --help' 1016747b715Smrgfor details on some of the pertinent environment variables. 1026747b715Smrg 1036747b715Smrg You can give `configure' initial values for configuration parameters 1046747b715Smrgby setting variables in the command line or in the environment. Here 1056747b715Smrgis an example: 1066747b715Smrg 1076747b715Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1086747b715Smrg 1096747b715Smrg *Note Defining Variables::, for more details. 1106747b715Smrg 1116747b715SmrgCompiling For Multiple Architectures 1126747b715Smrg==================================== 1136747b715Smrg 1146747b715Smrg You can compile the package for more than one kind of computer at the 1156747b715Smrgsame time, by placing the object files for each architecture in their 1166747b715Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1176747b715Smrgdirectory where you want the object files and executables to go and run 1186747b715Smrgthe `configure' script. `configure' automatically checks for the 11935c4bbdfSmrgsource code in the directory that `configure' is in and in `..'. This 12035c4bbdfSmrgis known as a "VPATH" build. 1216747b715Smrg 1226747b715Smrg With a non-GNU `make', it is safer to compile the package for one 1236747b715Smrgarchitecture at a time in the source code directory. After you have 1246747b715Smrginstalled the package for one architecture, use `make distclean' before 1256747b715Smrgreconfiguring for another architecture. 1266747b715Smrg 1276747b715Smrg On MacOS X 10.5 and later systems, you can create libraries and 1286747b715Smrgexecutables that work on multiple system types--known as "fat" or 1296747b715Smrg"universal" binaries--by specifying multiple `-arch' options to the 1306747b715Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1316747b715Smrgthis: 1326747b715Smrg 1336747b715Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1346747b715Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1356747b715Smrg CPP="gcc -E" CXXCPP="g++ -E" 1366747b715Smrg 1376747b715Smrg This is not guaranteed to produce working output in all cases, you 1386747b715Smrgmay have to build one architecture at a time and combine the results 1396747b715Smrgusing the `lipo' tool if you have problems. 1406747b715Smrg 1416747b715SmrgInstallation Names 1426747b715Smrg================== 1436747b715Smrg 1446747b715Smrg By default, `make install' installs the package's commands under 1456747b715Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1466747b715Smrgcan specify an installation prefix other than `/usr/local' by giving 14735c4bbdfSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14835c4bbdfSmrgabsolute file name. 1496747b715Smrg 1506747b715Smrg You can specify separate installation prefixes for 1516747b715Smrgarchitecture-specific files and architecture-independent files. If you 1526747b715Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1536747b715SmrgPREFIX as the prefix for installing programs and libraries. 1546747b715SmrgDocumentation and other data files still use the regular prefix. 1556747b715Smrg 1566747b715Smrg In addition, if you use an unusual directory layout you can give 1576747b715Smrgoptions like `--bindir=DIR' to specify different values for particular 1586747b715Smrgkinds of files. Run `configure --help' for a list of the directories 15935c4bbdfSmrgyou can set and what kinds of files go in them. In general, the 16035c4bbdfSmrgdefault for these options is expressed in terms of `${prefix}', so that 16135c4bbdfSmrgspecifying just `--prefix' will affect all of the other directory 16235c4bbdfSmrgspecifications that were not explicitly provided. 16335c4bbdfSmrg 16435c4bbdfSmrg The most portable way to affect installation locations is to pass the 16535c4bbdfSmrgcorrect locations to `configure'; however, many packages provide one or 16635c4bbdfSmrgboth of the following shortcuts of passing variable assignments to the 16735c4bbdfSmrg`make install' command line to change installation locations without 16835c4bbdfSmrghaving to reconfigure or recompile. 16935c4bbdfSmrg 17035c4bbdfSmrg The first method involves providing an override variable for each 17135c4bbdfSmrgaffected directory. For example, `make install 17235c4bbdfSmrgprefix=/alternate/directory' will choose an alternate location for all 17335c4bbdfSmrgdirectory configuration variables that were expressed in terms of 17435c4bbdfSmrg`${prefix}'. Any directories that were specified during `configure', 17535c4bbdfSmrgbut not in terms of `${prefix}', must each be overridden at install 17635c4bbdfSmrgtime for the entire installation to be relocated. The approach of 17735c4bbdfSmrgmakefile variable overrides for each directory variable is required by 17835c4bbdfSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17935c4bbdfSmrgHowever, some platforms have known limitations with the semantics of 18035c4bbdfSmrgshared libraries that end up requiring recompilation when using this 18135c4bbdfSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18235c4bbdfSmrg 18335c4bbdfSmrg The second method involves providing the `DESTDIR' variable. For 18435c4bbdfSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18535c4bbdfSmrg`/alternate/directory' before all installation names. The approach of 18635c4bbdfSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18735c4bbdfSmrgdoes not work on platforms that have drive letters. On the other hand, 18835c4bbdfSmrgit does better at avoiding recompilation issues, and works well even 18935c4bbdfSmrgwhen some directory options were not specified in terms of `${prefix}' 19035c4bbdfSmrgat `configure' time. 19135c4bbdfSmrg 19235c4bbdfSmrgOptional Features 19335c4bbdfSmrg================= 1946747b715Smrg 1956747b715Smrg If the package supports it, you can cause programs to be installed 1966747b715Smrgwith an extra prefix or suffix on their names by giving `configure' the 1976747b715Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1986747b715Smrg 1996747b715Smrg Some packages pay attention to `--enable-FEATURE' options to 2006747b715Smrg`configure', where FEATURE indicates an optional part of the package. 2016747b715SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2026747b715Smrgis something like `gnu-as' or `x' (for the X Window System). The 2036747b715Smrg`README' should mention any `--enable-' and `--with-' options that the 2046747b715Smrgpackage recognizes. 2056747b715Smrg 2066747b715Smrg For packages that use the X Window System, `configure' can usually 2076747b715Smrgfind the X include and library files automatically, but if it doesn't, 2086747b715Smrgyou can use the `configure' options `--x-includes=DIR' and 2096747b715Smrg`--x-libraries=DIR' to specify their locations. 2106747b715Smrg 21135c4bbdfSmrg Some packages offer the ability to configure how verbose the 21235c4bbdfSmrgexecution of `make' will be. For these packages, running `./configure 21335c4bbdfSmrg--enable-silent-rules' sets the default to minimal output, which can be 21435c4bbdfSmrgoverridden with `make V=1'; while running `./configure 21535c4bbdfSmrg--disable-silent-rules' sets the default to verbose, which can be 21635c4bbdfSmrgoverridden with `make V=0'. 21735c4bbdfSmrg 2186747b715SmrgParticular systems 2196747b715Smrg================== 2206747b715Smrg 2216747b715Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2226747b715SmrgCC is not installed, it is recommended to use the following options in 2236747b715Smrgorder to use an ANSI C compiler: 2246747b715Smrg 22535c4bbdfSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2266747b715Smrg 2276747b715Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2286747b715Smrg 22935c4bbdfSmrg HP-UX `make' updates targets which have the same time stamps as 23035c4bbdfSmrgtheir prerequisites, which makes it generally unusable when shipped 23135c4bbdfSmrggenerated files such as `configure' are involved. Use GNU `make' 23235c4bbdfSmrginstead. 23335c4bbdfSmrg 2346747b715Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2356747b715Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2366747b715Smrga workaround. If GNU CC is not installed, it is therefore recommended 2376747b715Smrgto try 2386747b715Smrg 2396747b715Smrg ./configure CC="cc" 2406747b715Smrg 2416747b715Smrgand if that doesn't work, try 2426747b715Smrg 2436747b715Smrg ./configure CC="cc -nodtk" 2446747b715Smrg 24535c4bbdfSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24635c4bbdfSmrgdirectory contains several dysfunctional programs; working variants of 24735c4bbdfSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24835c4bbdfSmrgin your `PATH', put it _after_ `/usr/bin'. 24935c4bbdfSmrg 25035c4bbdfSmrg On Haiku, software installed for all users goes in `/boot/common', 25135c4bbdfSmrgnot `/usr/local'. It is recommended to use the following options: 25235c4bbdfSmrg 25335c4bbdfSmrg ./configure --prefix=/boot/common 25435c4bbdfSmrg 2556747b715SmrgSpecifying the System Type 2566747b715Smrg========================== 2576747b715Smrg 2586747b715Smrg There may be some features `configure' cannot figure out 2596747b715Smrgautomatically, but needs to determine by the type of machine the package 2606747b715Smrgwill run on. Usually, assuming the package is built to be run on the 2616747b715Smrg_same_ architectures, `configure' can figure that out, but if it prints 2626747b715Smrga message saying it cannot guess the machine type, give it the 2636747b715Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2646747b715Smrgtype, such as `sun4', or a canonical name which has the form: 2656747b715Smrg 2666747b715Smrg CPU-COMPANY-SYSTEM 2676747b715Smrg 2686747b715Smrgwhere SYSTEM can have one of these forms: 2696747b715Smrg 27035c4bbdfSmrg OS 27135c4bbdfSmrg KERNEL-OS 2726747b715Smrg 2736747b715Smrg See the file `config.sub' for the possible values of each field. If 2746747b715Smrg`config.sub' isn't included in this package, then this package doesn't 2756747b715Smrgneed to know the machine type. 2766747b715Smrg 2776747b715Smrg If you are _building_ compiler tools for cross-compiling, you should 2786747b715Smrguse the option `--target=TYPE' to select the type of system they will 2796747b715Smrgproduce code for. 2806747b715Smrg 2816747b715Smrg If you want to _use_ a cross compiler, that generates code for a 2826747b715Smrgplatform different from the build platform, you should specify the 2836747b715Smrg"host" platform (i.e., that on which the generated programs will 2846747b715Smrgeventually be run) with `--host=TYPE'. 2856747b715Smrg 2866747b715SmrgSharing Defaults 2876747b715Smrg================ 2886747b715Smrg 2896747b715Smrg If you want to set default values for `configure' scripts to share, 2906747b715Smrgyou can create a site shell script called `config.site' that gives 2916747b715Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2926747b715Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2936747b715Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2946747b715Smrg`CONFIG_SITE' environment variable to the location of the site script. 2956747b715SmrgA warning: not all `configure' scripts look for a site script. 2966747b715Smrg 2976747b715SmrgDefining Variables 2986747b715Smrg================== 2996747b715Smrg 3006747b715Smrg Variables not defined in a site shell script can be set in the 3016747b715Smrgenvironment passed to `configure'. However, some packages may run 3026747b715Smrgconfigure again during the build, and the customized values of these 3036747b715Smrgvariables may be lost. In order to avoid this problem, you should set 3046747b715Smrgthem in the `configure' command line, using `VAR=value'. For example: 3056747b715Smrg 3066747b715Smrg ./configure CC=/usr/local2/bin/gcc 3076747b715Smrg 3086747b715Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3096747b715Smrgoverridden in the site shell script). 3106747b715Smrg 3116747b715SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3126747b715Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3136747b715Smrg 3146747b715Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3156747b715Smrg 3166747b715Smrg`configure' Invocation 3176747b715Smrg====================== 3186747b715Smrg 3196747b715Smrg `configure' recognizes the following options to control how it 3206747b715Smrgoperates. 3216747b715Smrg 3226747b715Smrg`--help' 3236747b715Smrg`-h' 3246747b715Smrg Print a summary of all of the options to `configure', and exit. 3256747b715Smrg 3266747b715Smrg`--help=short' 3276747b715Smrg`--help=recursive' 3286747b715Smrg Print a summary of the options unique to this package's 3296747b715Smrg `configure', and exit. The `short' variant lists options used 3306747b715Smrg only in the top level, while the `recursive' variant lists options 3316747b715Smrg also present in any nested packages. 3326747b715Smrg 3336747b715Smrg`--version' 3346747b715Smrg`-V' 3356747b715Smrg Print the version of Autoconf used to generate the `configure' 3366747b715Smrg script, and exit. 3376747b715Smrg 3386747b715Smrg`--cache-file=FILE' 3396747b715Smrg Enable the cache: use and save the results of the tests in FILE, 3406747b715Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3416747b715Smrg disable caching. 3426747b715Smrg 3436747b715Smrg`--config-cache' 3446747b715Smrg`-C' 3456747b715Smrg Alias for `--cache-file=config.cache'. 3466747b715Smrg 3476747b715Smrg`--quiet' 3486747b715Smrg`--silent' 3496747b715Smrg`-q' 3506747b715Smrg Do not print messages saying which checks are being made. To 3516747b715Smrg suppress all normal output, redirect it to `/dev/null' (any error 3526747b715Smrg messages will still be shown). 3536747b715Smrg 3546747b715Smrg`--srcdir=DIR' 3556747b715Smrg Look for the package's source code in directory DIR. Usually 3566747b715Smrg `configure' can determine that directory automatically. 3576747b715Smrg 3586747b715Smrg`--prefix=DIR' 35935c4bbdfSmrg Use DIR as the installation prefix. *note Installation Names:: 3606747b715Smrg for more details, including other options available for fine-tuning 3616747b715Smrg the installation locations. 3626747b715Smrg 3636747b715Smrg`--no-create' 3646747b715Smrg`-n' 3656747b715Smrg Run the configure checks, but stop before creating any output 3666747b715Smrg files. 3676747b715Smrg 3686747b715Smrg`configure' also accepts some other, not widely useful, options. Run 3696747b715Smrg`configure --help' for more details. 3706747b715Smrg 371