12adc0320SmrgInstallation Instructions 22adc0320Smrg************************* 32adc0320Smrg 440c5344fSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 540c5344fSmrgInc. 62adc0320Smrg 740c5344fSmrg Copying and distribution of this file, with or without modification, 840c5344fSmrgare permitted in any medium without royalty provided the copyright 940c5344fSmrgnotice and this notice are preserved. This file is offered as-is, 1040c5344fSmrgwithout warranty of any kind. 112adc0320Smrg 122adc0320SmrgBasic Installation 132adc0320Smrg================== 142adc0320Smrg 152adc0320Smrg Briefly, the shell commands `./configure; make; make install' should 162adc0320Smrgconfigure, build, and install this package. The following 172adc0320Smrgmore-detailed instructions are generic; see the `README' file for 1840c5344fSmrginstructions specific to this package. Some packages provide this 1940c5344fSmrg`INSTALL' file but do not implement all of the features documented 2040c5344fSmrgbelow. The lack of an optional feature in a given package is not 2140c5344fSmrgnecessarily a bug. More recommendations for GNU packages can be found 2240c5344fSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 232adc0320Smrg 242adc0320Smrg The `configure' shell script attempts to guess correct values for 252adc0320Smrgvarious system-dependent variables used during compilation. It uses 262adc0320Smrgthose values to create a `Makefile' in each directory of the package. 272adc0320SmrgIt may also create one or more `.h' files containing system-dependent 282adc0320Smrgdefinitions. Finally, it creates a shell script `config.status' that 292adc0320Smrgyou can run in the future to recreate the current configuration, and a 302adc0320Smrgfile `config.log' containing compiler output (useful mainly for 312adc0320Smrgdebugging `configure'). 322adc0320Smrg 332adc0320Smrg It can also use an optional file (typically called `config.cache' 342adc0320Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 352adc0320Smrgthe results of its tests to speed up reconfiguring. Caching is 362adc0320Smrgdisabled by default to prevent problems with accidental use of stale 372adc0320Smrgcache files. 382adc0320Smrg 392adc0320Smrg If you need to do unusual things to compile the package, please try 402adc0320Smrgto figure out how `configure' could check whether to do them, and mail 412adc0320Smrgdiffs or instructions to the address given in the `README' so they can 422adc0320Smrgbe considered for the next release. If you are using the cache, and at 432adc0320Smrgsome point `config.cache' contains results you don't want to keep, you 442adc0320Smrgmay remove or edit it. 452adc0320Smrg 462adc0320Smrg The file `configure.ac' (or `configure.in') is used to create 472adc0320Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 482adc0320Smrgyou want to change it or regenerate `configure' using a newer version 492adc0320Smrgof `autoconf'. 502adc0320Smrg 5140c5344fSmrg The simplest way to compile this package is: 522adc0320Smrg 532adc0320Smrg 1. `cd' to the directory containing the package's source code and type 542adc0320Smrg `./configure' to configure the package for your system. 552adc0320Smrg 562adc0320Smrg Running `configure' might take a while. While running, it prints 572adc0320Smrg some messages telling which features it is checking for. 582adc0320Smrg 592adc0320Smrg 2. Type `make' to compile the package. 602adc0320Smrg 612adc0320Smrg 3. Optionally, type `make check' to run any self-tests that come with 6240c5344fSmrg the package, generally using the just-built uninstalled binaries. 632adc0320Smrg 642adc0320Smrg 4. Type `make install' to install the programs and any data files and 6540c5344fSmrg documentation. When installing into a prefix owned by root, it is 6640c5344fSmrg recommended that the package be configured and built as a regular 6740c5344fSmrg user, and only the `make install' phase executed with root 6840c5344fSmrg privileges. 6940c5344fSmrg 7040c5344fSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7140c5344fSmrg this time using the binaries in their final installed location. 7240c5344fSmrg This target does not install anything. Running this target as a 7340c5344fSmrg regular user, particularly if the prior `make install' required 7440c5344fSmrg root privileges, verifies that the installation completed 7540c5344fSmrg correctly. 7640c5344fSmrg 7740c5344fSmrg 6. You can remove the program binaries and object files from the 782adc0320Smrg source code directory by typing `make clean'. To also remove the 792adc0320Smrg files that `configure' created (so you can compile the package for 802adc0320Smrg a different kind of computer), type `make distclean'. There is 812adc0320Smrg also a `make maintainer-clean' target, but that is intended mainly 822adc0320Smrg for the package's developers. If you use it, you may have to get 832adc0320Smrg all sorts of other programs in order to regenerate files that came 842adc0320Smrg with the distribution. 852adc0320Smrg 8640c5344fSmrg 7. Often, you can also type `make uninstall' to remove the installed 8740c5344fSmrg files again. In practice, not all packages have tested that 8840c5344fSmrg uninstallation works correctly, even though it is required by the 8940c5344fSmrg GNU Coding Standards. 9040c5344fSmrg 9140c5344fSmrg 8. Some packages, particularly those that use Automake, provide `make 9240c5344fSmrg distcheck', which can by used by developers to test that all other 9340c5344fSmrg targets like `make install' and `make uninstall' work correctly. 9440c5344fSmrg This target is generally not run by end users. 952adc0320Smrg 962adc0320SmrgCompilers and Options 972adc0320Smrg===================== 982adc0320Smrg 992adc0320Smrg Some systems require unusual options for compilation or linking that 1002adc0320Smrgthe `configure' script does not know about. Run `./configure --help' 1012adc0320Smrgfor details on some of the pertinent environment variables. 1022adc0320Smrg 1032adc0320Smrg You can give `configure' initial values for configuration parameters 1042adc0320Smrgby setting variables in the command line or in the environment. Here 1052adc0320Smrgis an example: 1062adc0320Smrg 1072adc0320Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1082adc0320Smrg 1092adc0320Smrg *Note Defining Variables::, for more details. 1102adc0320Smrg 1112adc0320SmrgCompiling For Multiple Architectures 1122adc0320Smrg==================================== 1132adc0320Smrg 1142adc0320Smrg You can compile the package for more than one kind of computer at the 1152adc0320Smrgsame time, by placing the object files for each architecture in their 1162adc0320Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1172adc0320Smrgdirectory where you want the object files and executables to go and run 1182adc0320Smrgthe `configure' script. `configure' automatically checks for the 11940c5344fSmrgsource code in the directory that `configure' is in and in `..'. This 12040c5344fSmrgis known as a "VPATH" build. 1212adc0320Smrg 1222adc0320Smrg With a non-GNU `make', it is safer to compile the package for one 1232adc0320Smrgarchitecture at a time in the source code directory. After you have 1242adc0320Smrginstalled the package for one architecture, use `make distclean' before 1252adc0320Smrgreconfiguring for another architecture. 1262adc0320Smrg 1272adc0320Smrg On MacOS X 10.5 and later systems, you can create libraries and 1282adc0320Smrgexecutables that work on multiple system types--known as "fat" or 1292adc0320Smrg"universal" binaries--by specifying multiple `-arch' options to the 1302adc0320Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1312adc0320Smrgthis: 1322adc0320Smrg 1332adc0320Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1342adc0320Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1352adc0320Smrg CPP="gcc -E" CXXCPP="g++ -E" 1362adc0320Smrg 1372adc0320Smrg This is not guaranteed to produce working output in all cases, you 1382adc0320Smrgmay have to build one architecture at a time and combine the results 1392adc0320Smrgusing the `lipo' tool if you have problems. 1402adc0320Smrg 1412adc0320SmrgInstallation Names 1422adc0320Smrg================== 1432adc0320Smrg 1442adc0320Smrg By default, `make install' installs the package's commands under 1452adc0320Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1462adc0320Smrgcan specify an installation prefix other than `/usr/local' by giving 14740c5344fSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14840c5344fSmrgabsolute file name. 1492adc0320Smrg 1502adc0320Smrg You can specify separate installation prefixes for 1512adc0320Smrgarchitecture-specific files and architecture-independent files. If you 1522adc0320Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1532adc0320SmrgPREFIX as the prefix for installing programs and libraries. 1542adc0320SmrgDocumentation and other data files still use the regular prefix. 1552adc0320Smrg 1562adc0320Smrg In addition, if you use an unusual directory layout you can give 1572adc0320Smrgoptions like `--bindir=DIR' to specify different values for particular 1582adc0320Smrgkinds of files. Run `configure --help' for a list of the directories 15940c5344fSmrgyou can set and what kinds of files go in them. In general, the 16040c5344fSmrgdefault for these options is expressed in terms of `${prefix}', so that 16140c5344fSmrgspecifying just `--prefix' will affect all of the other directory 16240c5344fSmrgspecifications that were not explicitly provided. 16340c5344fSmrg 16440c5344fSmrg The most portable way to affect installation locations is to pass the 16540c5344fSmrgcorrect locations to `configure'; however, many packages provide one or 16640c5344fSmrgboth of the following shortcuts of passing variable assignments to the 16740c5344fSmrg`make install' command line to change installation locations without 16840c5344fSmrghaving to reconfigure or recompile. 16940c5344fSmrg 17040c5344fSmrg The first method involves providing an override variable for each 17140c5344fSmrgaffected directory. For example, `make install 17240c5344fSmrgprefix=/alternate/directory' will choose an alternate location for all 17340c5344fSmrgdirectory configuration variables that were expressed in terms of 17440c5344fSmrg`${prefix}'. Any directories that were specified during `configure', 17540c5344fSmrgbut not in terms of `${prefix}', must each be overridden at install 17640c5344fSmrgtime for the entire installation to be relocated. The approach of 17740c5344fSmrgmakefile variable overrides for each directory variable is required by 17840c5344fSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17940c5344fSmrgHowever, some platforms have known limitations with the semantics of 18040c5344fSmrgshared libraries that end up requiring recompilation when using this 18140c5344fSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18240c5344fSmrg 18340c5344fSmrg The second method involves providing the `DESTDIR' variable. For 18440c5344fSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18540c5344fSmrg`/alternate/directory' before all installation names. The approach of 18640c5344fSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18740c5344fSmrgdoes not work on platforms that have drive letters. On the other hand, 18840c5344fSmrgit does better at avoiding recompilation issues, and works well even 18940c5344fSmrgwhen some directory options were not specified in terms of `${prefix}' 19040c5344fSmrgat `configure' time. 19140c5344fSmrg 19240c5344fSmrgOptional Features 19340c5344fSmrg================= 1942adc0320Smrg 1952adc0320Smrg If the package supports it, you can cause programs to be installed 1962adc0320Smrgwith an extra prefix or suffix on their names by giving `configure' the 1972adc0320Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1982adc0320Smrg 1992adc0320Smrg Some packages pay attention to `--enable-FEATURE' options to 2002adc0320Smrg`configure', where FEATURE indicates an optional part of the package. 2012adc0320SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2022adc0320Smrgis something like `gnu-as' or `x' (for the X Window System). The 2032adc0320Smrg`README' should mention any `--enable-' and `--with-' options that the 2042adc0320Smrgpackage recognizes. 2052adc0320Smrg 2062adc0320Smrg For packages that use the X Window System, `configure' can usually 2072adc0320Smrgfind the X include and library files automatically, but if it doesn't, 2082adc0320Smrgyou can use the `configure' options `--x-includes=DIR' and 2092adc0320Smrg`--x-libraries=DIR' to specify their locations. 2102adc0320Smrg 21140c5344fSmrg Some packages offer the ability to configure how verbose the 21240c5344fSmrgexecution of `make' will be. For these packages, running `./configure 21340c5344fSmrg--enable-silent-rules' sets the default to minimal output, which can be 21440c5344fSmrgoverridden with `make V=1'; while running `./configure 21540c5344fSmrg--disable-silent-rules' sets the default to verbose, which can be 21640c5344fSmrgoverridden with `make V=0'. 21740c5344fSmrg 2182adc0320SmrgParticular systems 2192adc0320Smrg================== 2202adc0320Smrg 2212adc0320Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2222adc0320SmrgCC is not installed, it is recommended to use the following options in 2232adc0320Smrgorder to use an ANSI C compiler: 2242adc0320Smrg 22540c5344fSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2262adc0320Smrg 2272adc0320Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2282adc0320Smrg 22940c5344fSmrg HP-UX `make' updates targets which have the same time stamps as 23040c5344fSmrgtheir prerequisites, which makes it generally unusable when shipped 23140c5344fSmrggenerated files such as `configure' are involved. Use GNU `make' 23240c5344fSmrginstead. 23340c5344fSmrg 2342adc0320Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2352adc0320Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2362adc0320Smrga workaround. If GNU CC is not installed, it is therefore recommended 2372adc0320Smrgto try 2382adc0320Smrg 2392adc0320Smrg ./configure CC="cc" 2402adc0320Smrg 2412adc0320Smrgand if that doesn't work, try 2422adc0320Smrg 2432adc0320Smrg ./configure CC="cc -nodtk" 2442adc0320Smrg 24540c5344fSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24640c5344fSmrgdirectory contains several dysfunctional programs; working variants of 24740c5344fSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24840c5344fSmrgin your `PATH', put it _after_ `/usr/bin'. 24940c5344fSmrg 25040c5344fSmrg On Haiku, software installed for all users goes in `/boot/common', 25140c5344fSmrgnot `/usr/local'. It is recommended to use the following options: 25240c5344fSmrg 25340c5344fSmrg ./configure --prefix=/boot/common 25440c5344fSmrg 2552adc0320SmrgSpecifying the System Type 2562adc0320Smrg========================== 2572adc0320Smrg 2582adc0320Smrg There may be some features `configure' cannot figure out 2592adc0320Smrgautomatically, but needs to determine by the type of machine the package 2602adc0320Smrgwill run on. Usually, assuming the package is built to be run on the 2612adc0320Smrg_same_ architectures, `configure' can figure that out, but if it prints 2622adc0320Smrga message saying it cannot guess the machine type, give it the 2632adc0320Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2642adc0320Smrgtype, such as `sun4', or a canonical name which has the form: 2652adc0320Smrg 2662adc0320Smrg CPU-COMPANY-SYSTEM 2672adc0320Smrg 2682adc0320Smrgwhere SYSTEM can have one of these forms: 2692adc0320Smrg 27040c5344fSmrg OS 27140c5344fSmrg KERNEL-OS 2722adc0320Smrg 2732adc0320Smrg See the file `config.sub' for the possible values of each field. If 2742adc0320Smrg`config.sub' isn't included in this package, then this package doesn't 2752adc0320Smrgneed to know the machine type. 2762adc0320Smrg 2772adc0320Smrg If you are _building_ compiler tools for cross-compiling, you should 2782adc0320Smrguse the option `--target=TYPE' to select the type of system they will 2792adc0320Smrgproduce code for. 2802adc0320Smrg 2812adc0320Smrg If you want to _use_ a cross compiler, that generates code for a 2822adc0320Smrgplatform different from the build platform, you should specify the 2832adc0320Smrg"host" platform (i.e., that on which the generated programs will 2842adc0320Smrgeventually be run) with `--host=TYPE'. 2852adc0320Smrg 2862adc0320SmrgSharing Defaults 2872adc0320Smrg================ 2882adc0320Smrg 2892adc0320Smrg If you want to set default values for `configure' scripts to share, 2902adc0320Smrgyou can create a site shell script called `config.site' that gives 2912adc0320Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2922adc0320Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2932adc0320Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2942adc0320Smrg`CONFIG_SITE' environment variable to the location of the site script. 2952adc0320SmrgA warning: not all `configure' scripts look for a site script. 2962adc0320Smrg 2972adc0320SmrgDefining Variables 2982adc0320Smrg================== 2992adc0320Smrg 3002adc0320Smrg Variables not defined in a site shell script can be set in the 3012adc0320Smrgenvironment passed to `configure'. However, some packages may run 3022adc0320Smrgconfigure again during the build, and the customized values of these 3032adc0320Smrgvariables may be lost. In order to avoid this problem, you should set 3042adc0320Smrgthem in the `configure' command line, using `VAR=value'. For example: 3052adc0320Smrg 3062adc0320Smrg ./configure CC=/usr/local2/bin/gcc 3072adc0320Smrg 3082adc0320Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3092adc0320Smrgoverridden in the site shell script). 3102adc0320Smrg 3112adc0320SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3122adc0320Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3132adc0320Smrg 3142adc0320Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3152adc0320Smrg 3162adc0320Smrg`configure' Invocation 3172adc0320Smrg====================== 3182adc0320Smrg 3192adc0320Smrg `configure' recognizes the following options to control how it 3202adc0320Smrgoperates. 3212adc0320Smrg 3222adc0320Smrg`--help' 3232adc0320Smrg`-h' 3242adc0320Smrg Print a summary of all of the options to `configure', and exit. 3252adc0320Smrg 3262adc0320Smrg`--help=short' 3272adc0320Smrg`--help=recursive' 3282adc0320Smrg Print a summary of the options unique to this package's 3292adc0320Smrg `configure', and exit. The `short' variant lists options used 3302adc0320Smrg only in the top level, while the `recursive' variant lists options 3312adc0320Smrg also present in any nested packages. 3322adc0320Smrg 3332adc0320Smrg`--version' 3342adc0320Smrg`-V' 3352adc0320Smrg Print the version of Autoconf used to generate the `configure' 3362adc0320Smrg script, and exit. 3372adc0320Smrg 3382adc0320Smrg`--cache-file=FILE' 3392adc0320Smrg Enable the cache: use and save the results of the tests in FILE, 3402adc0320Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3412adc0320Smrg disable caching. 3422adc0320Smrg 3432adc0320Smrg`--config-cache' 3442adc0320Smrg`-C' 3452adc0320Smrg Alias for `--cache-file=config.cache'. 3462adc0320Smrg 3472adc0320Smrg`--quiet' 3482adc0320Smrg`--silent' 3492adc0320Smrg`-q' 3502adc0320Smrg Do not print messages saying which checks are being made. To 3512adc0320Smrg suppress all normal output, redirect it to `/dev/null' (any error 3522adc0320Smrg messages will still be shown). 3532adc0320Smrg 3542adc0320Smrg`--srcdir=DIR' 3552adc0320Smrg Look for the package's source code in directory DIR. Usually 3562adc0320Smrg `configure' can determine that directory automatically. 3572adc0320Smrg 3582adc0320Smrg`--prefix=DIR' 35940c5344fSmrg Use DIR as the installation prefix. *note Installation Names:: 3602adc0320Smrg for more details, including other options available for fine-tuning 3612adc0320Smrg the installation locations. 3622adc0320Smrg 3632adc0320Smrg`--no-create' 3642adc0320Smrg`-n' 3652adc0320Smrg Run the configure checks, but stop before creating any output 3662adc0320Smrg files. 3672adc0320Smrg 3682adc0320Smrg`configure' also accepts some other, not widely useful, options. Run 3692adc0320Smrg`configure --help' for more details. 3702adc0320Smrg 371