Build Ganglia using Cygwin on Windows 
=====================================

Ganglia (Gmond, Gmetric and Gstat) may be built in the Cygwin environment for
use by Cygwin applications.  As with the Unix platform, Ganglia on Cygwin uses 
GNU tools, therefore, Ganglia on Cygwin could be built using the same set of
instructions as are used in the UNIX platforms as far as all dependencies are
covered. 

Supported Cygwin versions
-------------------------

Cygwin 1.7 was released in late 2009, just before the release of
Ganglia 3.1.6.  Consequently, Ganglia has not yet been tested as
extensively with Cygwin 1.7.  We can only confirm that the ganglia
binaries can be compiled (might require additional patches) and
executed on this platform, although we are not aware of any specific
reason why it should not work.

Cygwin 1.5 has been used by ganglia since 3.0, for several years and is
extensibly tested.  Users who want to deploy Cygwin 1.5 can use the
setup-legacy.exe installer from the Cygwin web site:

  http://www.cygwin.com/win-9x.html

Prerequisites
------------- 

Cygwin with the following packages:

* expat (Libs)
* gcc (Devel)
* libapr1-devel (Libs)
* make (Devel)
* sunrpc (Libs)
* pkg-config (Devel)

Optionally you will need the following packages for additional functionality
as described in the INSTALL document and which will be otherwise selected
at build time by the configure call:

* libpcre-devel (libs) : disabled by "without-libpcre" flag to configure
* python (Python)      : disabled by "disable-python" flag to configure

Process
-------

Download libconfuse, build it and install the libconfuse library (this will
be linked statically and will only be needed in the build machine)

  ./configure --disable-nls
  make
  make install

Download a release or snapshot package and unpack it.
Go to the ganglia directory, and run the following commands to build it:

  ./configure --with-libconfuse=/usr/local --without-libpcre --enable-static-build
  make

If everything works right, then you should see a gmond.exe, gstat.exe and 
gmetric.exe created in the gmond, gstat and gmetric directories
respectively. 

The binaries generated depend on cygwin (cygwin1.dll), the apr cygwin
library (cygapr-1-0.dll), the expat cygwin library (cygexpat-1.dll) and 
depending of the options chosen the pcre cygwin library (cygpcre-0.dll)
and the python cygwin library (libpython2.5.dll).

if you want to use them in a different system you'll need to copy and
install all of them together with an appropiate configuration.

Gmetad cannot be built on Cygwin but you can use gmetad in any other supported
architecture with the Gmond agents running in Cygwin.

Build a development version of Ganglia using Cygwin in Windows
==============================================================

The procedure to build a development version of Ganglia in Windows is described
in README.GIT as it is the same that is used in other platforms and as far as
all dependencies are covered:

Prerequisites
------------- 

The following extra packages are needed to develop Ganglia in adition to the
ones needed to build it and that are listed above:

* autoconf (Devel)
* automake (Devel)
* bison (Devel)
* diffutils (Utils)
* flex (Devel)
* libtool (Devel)
* sharutils (Archive)
* git (Devel)
