# # patch "INSTALL" # from [aa7aadc343319437b8cf0a71345506d2d3e8cc43] # to [91300af1b7411653bb3eff5608a548b6a5ed633b] # # patch "mkinstalldirs" # from [89e95056c1b4183c7cf37de58931a426bdde7514] # to [058b9b499887b5df4bc7348e713e7566e4234039] # --- INSTALL +++ INSTALL @@ -1,236 +1,212 @@ -Installation Instructions -************************* +building and installation process for monotone +============================================== -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +1. prerequisites: -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + * hardware prerequisites: -Basic Installation -================== + - g++ consumes a lot of memory building monotone, due to + monotone's liberal use of C++ features. it may be possible to + build on a system with 128mb of memory, but not pleasant. we are + working on making this situation better. -These are generic installation instructions. + * software prerequisites: - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). + - a supported C++ compiler: g++ 3.2 or later. + - an installed copy of boost 1.31.0 or later. - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) + on debian: - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. + apt-get install libboost-date-time-dev + apt-get install libboost-filesystem-dev + apt-get install libboost-regex-dev + apt-get install libboost-test-dev + apt-get install libboost-dev + apt-get install g++ - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. + on fedora: -The simplest way to compile this package is: + apt-get install boost-devel + apt-get install g++ - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + on other systems: - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + check your system package repository, you may need to + build some of these from source. if your package repository + does not contain the libraries, see: - 2. Type `make' to compile the package. + http://gcc.gnu.org for g++ + http://www.boost.org for boost - 3. Optionally, type `make check' to run any self-tests that come with - the package. +1.1 building boost: - 4. Type `make install' to install the programs and any data files and - documentation. + many people have reported difficulty building boost. the main + problem is that boost builds with an unorthodox build tool called + "bjam" which must, itself, be built or installed before boost can be + built. the bjam sources are contained within the boost distribution, + but somewhat hidden. there are instructions on + http://www.boost.org/more/getting_started.html, but we have + assembled this abbreviated bourne shell sequence for advanced users + who do not need all the preamble: - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. + wget http://aleron.dl.sourceforge.net/sourceforge/boost/boost_1_31_0.tar.gz + tar -xzf boost_1_31_0.tar.gz + cd boost_1_31_0 + (cd tools/build/jam_src && ./build.sh) + BJAM=`find tools/build/jam_src/ -name bjam -a -type f` + $BJAM "-sBUILD=release single speed static" + for i in `find bin -type d -a -name \*.a`; + do for j in `find $i -type f -a -name \*.a`; + do mv $j libs/`basename $i`; + done; + done + ranlib libs/*.a -Compilers and Options -===================== + if this completes successfully, you will have a selection of boost + libraries in boost_1_31_0/libs and boost headers in + boost_1_31_0/boost. you can then either copy the .a files to your + standard library path and the directory "boost_1_31_0/boost" to your + standard include path, or you can pass additional configuration + options to your monotone configure build, such as: -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + ./configure CPPFLAGS="-Iboost_1_31_2" LDFLAGS="-Lboost_1_31_0/libs" - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: + monotone does not use all of boost -- for instance, people often + have trouble building boost.python, which we do not use. you don't + need to build any libraries that we don't use! - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix +2. configuring monotone: - *Note Defining Variables::, for more details. + * if there is no ./configure script in your source tree you'll need + to create one before proceeding to the next step. one of the + following auto* commands should work: -Compiling For Multiple Architectures -==================================== + $ aclocal-1.7 && autoreconf --install + $ AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 autoreconf --install -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. + * type "./configure" for a basic configuration of monotone. several + configuration options are available; type "configure --help" for a + list of all of them. some special options are shown here: - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + --enable-ipv6[=auto|no|yes] -Installation Names -================== + specify whether IPv6 support has to be enabled or disabled. the + default is to try automatic detection (auto) and use the guessed + results. however, you can force IPv6 detection by saying 'yes' + or completely disable it using 'no'. -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. + --enable-static-boost[=prefix] - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. + this will attempt to link a "mostly static" version of monotone + using the .a files supplied with your installation of + boost. the resulting binary will be larger but more portable + than a normal (dynamic) link. - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. + you can optionally pass a prefix to the option, which will be + used to look for the static libraries; otherwise a list of + predefined directories will be used. for example: - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + ./configure --enable-static-boost=/usr/local/boost -Optional Features -================= + --disable-nls -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. + build a version of monotone without support for local message + catalogs. you might like to do this if you do not have a + working installation of GNU gettext. - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. + --with-bundled-lua=no + --with-bundled-sqlite=no -Specifying the System Type -========================== + build a version of monotone without the internal "bundled" + copies of lua and sqlite libraries. normally monotone will use + copies of these libraries it was bundled with. If you set these + flags to "no", it will try to use libraries it finds on your + system, and use the bundled versions only if you do not have + your own copies. -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: + this is usually untested and not guaranteed to work. if you + have strange problems, then try using the bundled lua and + sqlite. - CPU-COMPANY-SYSTEM + --disable-large-file -where SYSTEM can have one of these forms: + this will disable large file support from the builtin sqlite, to + achieve maximum binary compatibility with old systems. this option + has no effect when --with-bundled-sqlite=no is also given. - OS KERNEL-OS + BOOST_SUFFIX=string - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. + this variable, to be set on configure's command line, can be used + to specify a special string suffix to be appended to boost library + names. many Linux distributions provide symlinks to hide this + suffix, but others do not. therefore, you need to pass it to the + configure script through this variable for correct detection of + boost. for example: - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. + ./configure BOOST_SUFFIX=-gcc - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. + note that, sometimes, the configure script will be able to guess + the correct suffix by itself. -Sharing Defaults -================ +3. building monotone -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. + * type "make". this should produce a monotone binary in your current + directory. if not, please send a build log to + address@hidden with a description of the failure. -Defining Variables -================== + * if you are on solaris/x86, read appendix A of this document. -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: +4. testing monotone - ./configure CC=/usr/local2/bin/gcc + * there is a "make check" target which you can try, if you'd like to + confirm monotone's functionality on your system. you might also + like to try fetching monotone's sources from our monotone + server. this process will transfer the complete development + history (about 40 megabytes) to your database, and you will then + be free to share it with others or make changes and submit them to + us: -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: + monotone --db=mt.db db init - /bin/bash ./configure CONFIG_SHELL=/bin/bash + monotone --db=mt.db read < +# Author: Noah Friedman # Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . +# Public domain errstatus=0 dirmode="" usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help - echo "$usage" - exit $? + echo "$usage" 1>&2 + exit 0 ;; -m) # -m PERM arg shift @@ -35,10 +23,6 @@ dirmode=$1 shift ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; --) # stop option processing shift break @@ -66,37 +50,17 @@ 0) exit 0 ;; esac -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version fi ;; *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done fi ;; esac @@ -120,17 +84,17 @@ mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then - errstatus=$lasterr + errstatus=$lasterr else - if test ! -z "$dirmode"; then + if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi fi fi @@ -143,8 +107,5 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" # End: +# mkinstalldirs ends here