1af23b0a6SmrgInstallation Instructions 2af23b0a6Smrg************************* 3af23b0a6Smrg 4945aa7e3SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5945aa7e3SmrgInc. 6af23b0a6Smrg 7945aa7e3Smrg Copying and distribution of this file, with or without modification, 8945aa7e3Smrgare permitted in any medium without royalty provided the copyright 9945aa7e3Smrgnotice and this notice are preserved. This file is offered as-is, 10945aa7e3Smrgwithout warranty of any kind. 11af23b0a6Smrg 12af23b0a6SmrgBasic Installation 13af23b0a6Smrg================== 14af23b0a6Smrg 15af23b0a6Smrg Briefly, the shell commands `./configure; make; make install' should 16af23b0a6Smrgconfigure, build, and install this package. The following 17af23b0a6Smrgmore-detailed instructions are generic; see the `README' file for 18945aa7e3Smrginstructions specific to this package. Some packages provide this 19945aa7e3Smrg`INSTALL' file but do not implement all of the features documented 20945aa7e3Smrgbelow. The lack of an optional feature in a given package is not 21945aa7e3Smrgnecessarily a bug. More recommendations for GNU packages can be found 22945aa7e3Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23af23b0a6Smrg 24af23b0a6Smrg The `configure' shell script attempts to guess correct values for 25af23b0a6Smrgvarious system-dependent variables used during compilation. It uses 26af23b0a6Smrgthose values to create a `Makefile' in each directory of the package. 27af23b0a6SmrgIt may also create one or more `.h' files containing system-dependent 28af23b0a6Smrgdefinitions. Finally, it creates a shell script `config.status' that 29af23b0a6Smrgyou can run in the future to recreate the current configuration, and a 30af23b0a6Smrgfile `config.log' containing compiler output (useful mainly for 31af23b0a6Smrgdebugging `configure'). 32af23b0a6Smrg 33af23b0a6Smrg It can also use an optional file (typically called `config.cache' 34af23b0a6Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35af23b0a6Smrgthe results of its tests to speed up reconfiguring. Caching is 36af23b0a6Smrgdisabled by default to prevent problems with accidental use of stale 37af23b0a6Smrgcache files. 38af23b0a6Smrg 39af23b0a6Smrg If you need to do unusual things to compile the package, please try 40af23b0a6Smrgto figure out how `configure' could check whether to do them, and mail 41af23b0a6Smrgdiffs or instructions to the address given in the `README' so they can 42af23b0a6Smrgbe considered for the next release. If you are using the cache, and at 43af23b0a6Smrgsome point `config.cache' contains results you don't want to keep, you 44af23b0a6Smrgmay remove or edit it. 45af23b0a6Smrg 46af23b0a6Smrg The file `configure.ac' (or `configure.in') is used to create 47af23b0a6Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48af23b0a6Smrgyou want to change it or regenerate `configure' using a newer version 49af23b0a6Smrgof `autoconf'. 50af23b0a6Smrg 51945aa7e3Smrg The simplest way to compile this package is: 52af23b0a6Smrg 53af23b0a6Smrg 1. `cd' to the directory containing the package's source code and type 54af23b0a6Smrg `./configure' to configure the package for your system. 55af23b0a6Smrg 56af23b0a6Smrg Running `configure' might take a while. While running, it prints 57af23b0a6Smrg some messages telling which features it is checking for. 58af23b0a6Smrg 59af23b0a6Smrg 2. Type `make' to compile the package. 60af23b0a6Smrg 61af23b0a6Smrg 3. Optionally, type `make check' to run any self-tests that come with 62945aa7e3Smrg the package, generally using the just-built uninstalled binaries. 63af23b0a6Smrg 64af23b0a6Smrg 4. Type `make install' to install the programs and any data files and 65945aa7e3Smrg documentation. When installing into a prefix owned by root, it is 66945aa7e3Smrg recommended that the package be configured and built as a regular 67945aa7e3Smrg user, and only the `make install' phase executed with root 68945aa7e3Smrg privileges. 69945aa7e3Smrg 70945aa7e3Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71945aa7e3Smrg this time using the binaries in their final installed location. 72945aa7e3Smrg This target does not install anything. Running this target as a 73945aa7e3Smrg regular user, particularly if the prior `make install' required 74945aa7e3Smrg root privileges, verifies that the installation completed 75945aa7e3Smrg correctly. 76945aa7e3Smrg 77945aa7e3Smrg 6. You can remove the program binaries and object files from the 78af23b0a6Smrg source code directory by typing `make clean'. To also remove the 79af23b0a6Smrg files that `configure' created (so you can compile the package for 80af23b0a6Smrg a different kind of computer), type `make distclean'. There is 81af23b0a6Smrg also a `make maintainer-clean' target, but that is intended mainly 82af23b0a6Smrg for the package's developers. If you use it, you may have to get 83af23b0a6Smrg all sorts of other programs in order to regenerate files that came 84af23b0a6Smrg with the distribution. 85af23b0a6Smrg 86945aa7e3Smrg 7. Often, you can also type `make uninstall' to remove the installed 87945aa7e3Smrg files again. In practice, not all packages have tested that 88945aa7e3Smrg uninstallation works correctly, even though it is required by the 89945aa7e3Smrg GNU Coding Standards. 90945aa7e3Smrg 91945aa7e3Smrg 8. Some packages, particularly those that use Automake, provide `make 92945aa7e3Smrg distcheck', which can by used by developers to test that all other 93945aa7e3Smrg targets like `make install' and `make uninstall' work correctly. 94945aa7e3Smrg This target is generally not run by end users. 95af23b0a6Smrg 96af23b0a6SmrgCompilers and Options 97af23b0a6Smrg===================== 98af23b0a6Smrg 99af23b0a6Smrg Some systems require unusual options for compilation or linking that 100af23b0a6Smrgthe `configure' script does not know about. Run `./configure --help' 101af23b0a6Smrgfor details on some of the pertinent environment variables. 102af23b0a6Smrg 103af23b0a6Smrg You can give `configure' initial values for configuration parameters 104af23b0a6Smrgby setting variables in the command line or in the environment. Here 105af23b0a6Smrgis an example: 106af23b0a6Smrg 107af23b0a6Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108af23b0a6Smrg 109af23b0a6Smrg *Note Defining Variables::, for more details. 110af23b0a6Smrg 111af23b0a6SmrgCompiling For Multiple Architectures 112af23b0a6Smrg==================================== 113af23b0a6Smrg 114af23b0a6Smrg You can compile the package for more than one kind of computer at the 115af23b0a6Smrgsame time, by placing the object files for each architecture in their 116af23b0a6Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117af23b0a6Smrgdirectory where you want the object files and executables to go and run 118af23b0a6Smrgthe `configure' script. `configure' automatically checks for the 119945aa7e3Smrgsource code in the directory that `configure' is in and in `..'. This 120945aa7e3Smrgis known as a "VPATH" build. 121af23b0a6Smrg 122af23b0a6Smrg With a non-GNU `make', it is safer to compile the package for one 123af23b0a6Smrgarchitecture at a time in the source code directory. After you have 124af23b0a6Smrginstalled the package for one architecture, use `make distclean' before 125af23b0a6Smrgreconfiguring for another architecture. 126af23b0a6Smrg 127af23b0a6Smrg On MacOS X 10.5 and later systems, you can create libraries and 128af23b0a6Smrgexecutables that work on multiple system types--known as "fat" or 129af23b0a6Smrg"universal" binaries--by specifying multiple `-arch' options to the 130af23b0a6Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131af23b0a6Smrgthis: 132af23b0a6Smrg 133af23b0a6Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134af23b0a6Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135af23b0a6Smrg CPP="gcc -E" CXXCPP="g++ -E" 136af23b0a6Smrg 137af23b0a6Smrg This is not guaranteed to produce working output in all cases, you 138af23b0a6Smrgmay have to build one architecture at a time and combine the results 139af23b0a6Smrgusing the `lipo' tool if you have problems. 140af23b0a6Smrg 141af23b0a6SmrgInstallation Names 142af23b0a6Smrg================== 143af23b0a6Smrg 144af23b0a6Smrg By default, `make install' installs the package's commands under 145af23b0a6Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146af23b0a6Smrgcan specify an installation prefix other than `/usr/local' by giving 147945aa7e3Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148945aa7e3Smrgabsolute file name. 149af23b0a6Smrg 150af23b0a6Smrg You can specify separate installation prefixes for 151af23b0a6Smrgarchitecture-specific files and architecture-independent files. If you 152af23b0a6Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153af23b0a6SmrgPREFIX as the prefix for installing programs and libraries. 154af23b0a6SmrgDocumentation and other data files still use the regular prefix. 155af23b0a6Smrg 156af23b0a6Smrg In addition, if you use an unusual directory layout you can give 157af23b0a6Smrgoptions like `--bindir=DIR' to specify different values for particular 158af23b0a6Smrgkinds of files. Run `configure --help' for a list of the directories 159945aa7e3Smrgyou can set and what kinds of files go in them. In general, the 160945aa7e3Smrgdefault for these options is expressed in terms of `${prefix}', so that 161945aa7e3Smrgspecifying just `--prefix' will affect all of the other directory 162945aa7e3Smrgspecifications that were not explicitly provided. 163945aa7e3Smrg 164945aa7e3Smrg The most portable way to affect installation locations is to pass the 165945aa7e3Smrgcorrect locations to `configure'; however, many packages provide one or 166945aa7e3Smrgboth of the following shortcuts of passing variable assignments to the 167945aa7e3Smrg`make install' command line to change installation locations without 168945aa7e3Smrghaving to reconfigure or recompile. 169945aa7e3Smrg 170945aa7e3Smrg The first method involves providing an override variable for each 171945aa7e3Smrgaffected directory. For example, `make install 172945aa7e3Smrgprefix=/alternate/directory' will choose an alternate location for all 173945aa7e3Smrgdirectory configuration variables that were expressed in terms of 174945aa7e3Smrg`${prefix}'. Any directories that were specified during `configure', 175945aa7e3Smrgbut not in terms of `${prefix}', must each be overridden at install 176945aa7e3Smrgtime for the entire installation to be relocated. The approach of 177945aa7e3Smrgmakefile variable overrides for each directory variable is required by 178945aa7e3Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179945aa7e3SmrgHowever, some platforms have known limitations with the semantics of 180945aa7e3Smrgshared libraries that end up requiring recompilation when using this 181945aa7e3Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182945aa7e3Smrg 183945aa7e3Smrg The second method involves providing the `DESTDIR' variable. For 184945aa7e3Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185945aa7e3Smrg`/alternate/directory' before all installation names. The approach of 186945aa7e3Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187945aa7e3Smrgdoes not work on platforms that have drive letters. On the other hand, 188945aa7e3Smrgit does better at avoiding recompilation issues, and works well even 189945aa7e3Smrgwhen some directory options were not specified in terms of `${prefix}' 190945aa7e3Smrgat `configure' time. 191945aa7e3Smrg 192945aa7e3SmrgOptional Features 193945aa7e3Smrg================= 194af23b0a6Smrg 195af23b0a6Smrg If the package supports it, you can cause programs to be installed 196af23b0a6Smrgwith an extra prefix or suffix on their names by giving `configure' the 197af23b0a6Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198af23b0a6Smrg 199af23b0a6Smrg Some packages pay attention to `--enable-FEATURE' options to 200af23b0a6Smrg`configure', where FEATURE indicates an optional part of the package. 201af23b0a6SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202af23b0a6Smrgis something like `gnu-as' or `x' (for the X Window System). The 203af23b0a6Smrg`README' should mention any `--enable-' and `--with-' options that the 204af23b0a6Smrgpackage recognizes. 205af23b0a6Smrg 206af23b0a6Smrg For packages that use the X Window System, `configure' can usually 207af23b0a6Smrgfind the X include and library files automatically, but if it doesn't, 208af23b0a6Smrgyou can use the `configure' options `--x-includes=DIR' and 209af23b0a6Smrg`--x-libraries=DIR' to specify their locations. 210af23b0a6Smrg 211945aa7e3Smrg Some packages offer the ability to configure how verbose the 212945aa7e3Smrgexecution of `make' will be. For these packages, running `./configure 213945aa7e3Smrg--enable-silent-rules' sets the default to minimal output, which can be 214945aa7e3Smrgoverridden with `make V=1'; while running `./configure 215945aa7e3Smrg--disable-silent-rules' sets the default to verbose, which can be 216945aa7e3Smrgoverridden with `make V=0'. 217945aa7e3Smrg 218af23b0a6SmrgParticular systems 219af23b0a6Smrg================== 220af23b0a6Smrg 221af23b0a6Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222af23b0a6SmrgCC is not installed, it is recommended to use the following options in 223af23b0a6Smrgorder to use an ANSI C compiler: 224af23b0a6Smrg 225945aa7e3Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226af23b0a6Smrg 227af23b0a6Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228af23b0a6Smrg 229945aa7e3Smrg HP-UX `make' updates targets which have the same time stamps as 230945aa7e3Smrgtheir prerequisites, which makes it generally unusable when shipped 231945aa7e3Smrggenerated files such as `configure' are involved. Use GNU `make' 232945aa7e3Smrginstead. 233945aa7e3Smrg 234af23b0a6Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235af23b0a6Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236af23b0a6Smrga workaround. If GNU CC is not installed, it is therefore recommended 237af23b0a6Smrgto try 238af23b0a6Smrg 239af23b0a6Smrg ./configure CC="cc" 240af23b0a6Smrg 241af23b0a6Smrgand if that doesn't work, try 242af23b0a6Smrg 243af23b0a6Smrg ./configure CC="cc -nodtk" 244af23b0a6Smrg 245945aa7e3Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246945aa7e3Smrgdirectory contains several dysfunctional programs; working variants of 247945aa7e3Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248945aa7e3Smrgin your `PATH', put it _after_ `/usr/bin'. 249945aa7e3Smrg 250945aa7e3Smrg On Haiku, software installed for all users goes in `/boot/common', 251945aa7e3Smrgnot `/usr/local'. It is recommended to use the following options: 252945aa7e3Smrg 253945aa7e3Smrg ./configure --prefix=/boot/common 254945aa7e3Smrg 255af23b0a6SmrgSpecifying the System Type 256af23b0a6Smrg========================== 257af23b0a6Smrg 258af23b0a6Smrg There may be some features `configure' cannot figure out 259af23b0a6Smrgautomatically, but needs to determine by the type of machine the package 260af23b0a6Smrgwill run on. Usually, assuming the package is built to be run on the 261af23b0a6Smrg_same_ architectures, `configure' can figure that out, but if it prints 262af23b0a6Smrga message saying it cannot guess the machine type, give it the 263af23b0a6Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264af23b0a6Smrgtype, such as `sun4', or a canonical name which has the form: 265af23b0a6Smrg 266af23b0a6Smrg CPU-COMPANY-SYSTEM 267af23b0a6Smrg 268af23b0a6Smrgwhere SYSTEM can have one of these forms: 269af23b0a6Smrg 270945aa7e3Smrg OS 271945aa7e3Smrg KERNEL-OS 272af23b0a6Smrg 273af23b0a6Smrg See the file `config.sub' for the possible values of each field. If 274af23b0a6Smrg`config.sub' isn't included in this package, then this package doesn't 275af23b0a6Smrgneed to know the machine type. 276af23b0a6Smrg 277af23b0a6Smrg If you are _building_ compiler tools for cross-compiling, you should 278af23b0a6Smrguse the option `--target=TYPE' to select the type of system they will 279af23b0a6Smrgproduce code for. 280af23b0a6Smrg 281af23b0a6Smrg If you want to _use_ a cross compiler, that generates code for a 282af23b0a6Smrgplatform different from the build platform, you should specify the 283af23b0a6Smrg"host" platform (i.e., that on which the generated programs will 284af23b0a6Smrgeventually be run) with `--host=TYPE'. 285af23b0a6Smrg 286af23b0a6SmrgSharing Defaults 287af23b0a6Smrg================ 288af23b0a6Smrg 289af23b0a6Smrg If you want to set default values for `configure' scripts to share, 290af23b0a6Smrgyou can create a site shell script called `config.site' that gives 291af23b0a6Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292af23b0a6Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293af23b0a6Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294af23b0a6Smrg`CONFIG_SITE' environment variable to the location of the site script. 295af23b0a6SmrgA warning: not all `configure' scripts look for a site script. 296af23b0a6Smrg 297af23b0a6SmrgDefining Variables 298af23b0a6Smrg================== 299af23b0a6Smrg 300af23b0a6Smrg Variables not defined in a site shell script can be set in the 301af23b0a6Smrgenvironment passed to `configure'. However, some packages may run 302af23b0a6Smrgconfigure again during the build, and the customized values of these 303af23b0a6Smrgvariables may be lost. In order to avoid this problem, you should set 304af23b0a6Smrgthem in the `configure' command line, using `VAR=value'. For example: 305af23b0a6Smrg 306af23b0a6Smrg ./configure CC=/usr/local2/bin/gcc 307af23b0a6Smrg 308af23b0a6Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309af23b0a6Smrgoverridden in the site shell script). 310af23b0a6Smrg 311af23b0a6SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312af23b0a6Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313af23b0a6Smrg 314af23b0a6Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315af23b0a6Smrg 316af23b0a6Smrg`configure' Invocation 317af23b0a6Smrg====================== 318af23b0a6Smrg 319af23b0a6Smrg `configure' recognizes the following options to control how it 320af23b0a6Smrgoperates. 321af23b0a6Smrg 322af23b0a6Smrg`--help' 323af23b0a6Smrg`-h' 324af23b0a6Smrg Print a summary of all of the options to `configure', and exit. 325af23b0a6Smrg 326af23b0a6Smrg`--help=short' 327af23b0a6Smrg`--help=recursive' 328af23b0a6Smrg Print a summary of the options unique to this package's 329af23b0a6Smrg `configure', and exit. The `short' variant lists options used 330af23b0a6Smrg only in the top level, while the `recursive' variant lists options 331af23b0a6Smrg also present in any nested packages. 332af23b0a6Smrg 333af23b0a6Smrg`--version' 334af23b0a6Smrg`-V' 335af23b0a6Smrg Print the version of Autoconf used to generate the `configure' 336af23b0a6Smrg script, and exit. 337af23b0a6Smrg 338af23b0a6Smrg`--cache-file=FILE' 339af23b0a6Smrg Enable the cache: use and save the results of the tests in FILE, 340af23b0a6Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341af23b0a6Smrg disable caching. 342af23b0a6Smrg 343af23b0a6Smrg`--config-cache' 344af23b0a6Smrg`-C' 345af23b0a6Smrg Alias for `--cache-file=config.cache'. 346af23b0a6Smrg 347af23b0a6Smrg`--quiet' 348af23b0a6Smrg`--silent' 349af23b0a6Smrg`-q' 350af23b0a6Smrg Do not print messages saying which checks are being made. To 351af23b0a6Smrg suppress all normal output, redirect it to `/dev/null' (any error 352af23b0a6Smrg messages will still be shown). 353af23b0a6Smrg 354af23b0a6Smrg`--srcdir=DIR' 355af23b0a6Smrg Look for the package's source code in directory DIR. Usually 356af23b0a6Smrg `configure' can determine that directory automatically. 357af23b0a6Smrg 358af23b0a6Smrg`--prefix=DIR' 359945aa7e3Smrg Use DIR as the installation prefix. *note Installation Names:: 360af23b0a6Smrg for more details, including other options available for fine-tuning 361af23b0a6Smrg the installation locations. 362af23b0a6Smrg 363af23b0a6Smrg`--no-create' 364af23b0a6Smrg`-n' 365af23b0a6Smrg Run the configure checks, but stop before creating any output 366af23b0a6Smrg files. 367af23b0a6Smrg 368af23b0a6Smrg`configure' also accepts some other, not widely useful, options. Run 369af23b0a6Smrg`configure --help' for more details. 370af23b0a6Smrg 371