See INSTALL for general notes, such as running 'make' and 'make check'

on Windows (using MinGW):

Many tools and packages are available on SourceForge:

https://sourceforge.net/projects/<project>/files/

That site is organized into several hierarchical lists of files. We
give the hierarchy names here, rather than a complete download URL, to
make it easy to check for new versions.

The versions given here may not be exactly the same versions as used to
build the current release of monontone.

These instructions work on a new computer, with only
Windows XP installed.

Package       | Version | location
--------------------------
Python        | 2.7.1   | http://www.python.org/
                        | "Windows Installer" under "Quick Links (2.7.1)"
mingw-get-inst| latest  | http://sourceforge.net/projects/mingw/files/
                        | -> Automated MinGW Installer
                        | -> mingw-get-inst
                        | -> mingw-get-inst-20101030
                        | -> mingw-get-inst-20101030.exe
boost         | 1.45.1  | http://sourceforge.net/projects/boost/files/
                        | -> boost -> 1.54.0 -> boost_1_45_0.tar.gz
Lua           | 5.1.4   | http://www.lua.org/
                        | -> download
                        | -> "...current release is >Lua 5.1.4<" under "Source"
                        | lua-5.1.4.tar.gz
pcre          | 8.11    | http://www.pcre.org/
                        | -> ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
                        | -> pcre-8.11.tar.gz
botan         | 1.8.11  | http://botan.randombit.net/download.html
                        | "Source: >tar/gzip<" under "Current Stable Release"
sqlite3       | 3.7.4   | http://www.sqlite.org/download.html
                        | -> sqlite-autoconf-3070400.tar.gz
libidn        | 1.19    | ftp://ftp.gnu.org/gnu/libidn/
                        | -> libidn-1.19.tar.gz
Depends.exe   |         | http://www.dependencywalker.com/ ; also comes with Visual Studio

In general, there are two versions of most tools on the
MinGW site; mingw and msys. MinGW versions are intended to
be run from a DOS shell, msys versions from an Msys shell.
monotone configure requires the Msys shell, so we need the
msys versions of autoconf and automake.

Other tools will be linked with the monotone MinGW
executable, so we need the MinGW versions of those.

The tools listed here are sufficient to build the monotone
executable and html and info documentation. However, the
'distcheck' target also builds the documentation in
postscript format, which requires tools not (yet) available
for MinGW.

The commands below assume you download files to C:\MinGW\Msys\1.0\ , which
maps to both / and /usr/ under the MinGW shell.

01. Python (needed for the Botan configure script)
  01.1 Run the installer, accept all defaults.
  01.2 Add python to your PATH
    Right-click on "My Computer", select "Properties"
    Go to the "Advanced" tab, and click on "Environment Variables"
    To add Python to everyone's path:
      Select "Path" (case-insensitive) in the "System variables" at the botton.
      Click "Edit".
      Add ";C:\Python27" (without the quotes) to the end of the value.
    To add Python to only your path:
      If there is a "Path" entry in the "User variables for ..." section,
      edit it as above.
      If there is not a "Path" entry, click on "New" in the User variables section,
      and enter "PATH" as the variable name and "C:\Python27" as the value.
    To verify your new PATH, you can go to Start->Run and enter "cmd", then in the
    command window run "echo %PATH%" and look for the Python directory in the output.

02. MinGW
  Run mingw-get-inst (graphical installer for mingw-get and the MinGW base system).
  At the "Select Components" screen, add "C++ compiler" and "MinGW Developer Toolkit".
    Other than this, accept all defaults.
  Open the MinGW shell (Start->All Programs->MinGW->MinGW Shell)
  Run the following:
  $ mingw-get install msys-autoconf msys-automake mingw32-libiconv
  $ mingw-get install mingw32-zlib mingw32-libz-dev mingw32-gettext

03. boost; only need headers
  $ cd /usr
  $ mkdir src
  $ cd src
  $ tar -zxf ../boost_1_45_1.tar.gz
  This may give errors about gid_t out of range, and then say
  "Exiting with failure status due to previous errors"; you can
  ignore this.
  $ cd boost_1_45_1
  $ cp -a boost /mingw/include

04. Lua
   $ cd /usr/src
   $ tar -zxf ../lua-5.1.4.tar.gz
   $ cd lua-5.1.4
   $ make mingw INSTALL_TOP=/mingw
   $ make install INSTALL_TOP=/mingw

05. pcre
   $ cd /usr/src
   $ tar -zxf ../pcre-8.11.tar.gz
   $ cd pcre-8.11
   $ ./configure --prefix=/mingw
   $ make install

06. botan
   $ cd /usr/src
   $ tar -zxf ../Botan-1.8.11.tgz
   $ cd Botan-1.8.11
   $ ./configure.py --cc=gcc --os=mingw
   The Botan configure script generates paths with Python's
   os.path.join(...), which in the case of the Windows Python
   we installed uses '\' as the path separator. There are a
   couple of places in the Makefile where this causes problems.
   $ sed -i 's#\\\(.\)#/\1#g' Makefile
   $ make install

07. sqlite3
   $ cd /usr/src
   $ tar -zxf ../sqlite-autoconf-3070400.tar.gz
   $ cd sqlite-autoconf-3070400
   $ ./configure --prefix=/mingw
   $ make install

08. libidn
   $ cd /usr/src
   $ tar -zxf ../libidn-1.19.tar.gz
   $ cd libidn-1.19
   $ ./configure --prefix=/mingw
   $ make install

09. Depends.exe
   If you have Visual Studio installed, you should be able to skip this.
   If you don't, then download the appropriate depends*.zip and
   unpack it someplace in your %PATH% (for example, C:\MinGW\bin\).
   This is only used by the testsuite, in particular the empty_environment test.
   If you just want to build monotone for your own use, you can skip this and
   just ignore that that test fails.

10. build monotone
   You can skip the CXXFLAGS and LDFLAGS if you really want to, but if you do that
   then libgcc_s and libstdc++-6 will be linked dynamically and the resulting
   monotone binary will take several extra seconds to start.
   $ cd /c/.../monotone
   $ autoreconf -i # not needed if you use the distributed tarball
   $ CXXFLAGS="-static-libgcc -static-libstdc++ -O2 -Wall"; export CXXFLAGS
   $ LDFLAGS="-static-libgcc -static-libstdc++"; export LDFLAGS
   $ ./configure
   $ make

