        Compiling MSWindows binary of Asymptote under CYGWIN-x86_64

First run build-asymptote on Linux. This will build the documentation
and source tar ball and copy them to a directory ~/shared which needs to be
shared via virtualbox to the cygwin build environment.

Install TeXLive and these Cygwin packages:

git
wget
make
patch
gcc-g++
autoconf2.5
bison
flex
w32api-headers
w32api-runtime
zlib-devel
libtirpc-devel (SRC)
libreadline-devel (SRC)
libfftw3-devel (SRC)
libgsl-devel (SRC)
libGLEW-devel (SRC)
glm-devel
automake1.15
libtool

mv /usr/include/GL /usr/include/GL.orig

Install these cygwin packages:

Build and install static libraries from /usr/local/src:

gsl-devel:
./configure --prefix=/usr
make install

readline-devel:
./configure --prefix=/usr --without-curses --disable-shared
make install

fftw3-devel:
./configure --prefix=/usr --enable-shared 
make install

tirpc-devel:
./configure --prefix=/usr --disable-gssapi
make install
ln -s /usr/include/tirpc/rpc /usr/include/rpc
ln -s /usr/include/tirpc/netconfig.h /usr/include/netconfig.h
ln -s /usr/lib/libtirpc.a /usr/lib/librpc.a

termcap-1.3.1:
./configure --prefix=/usr
make install

glew-2.1.0:
make CFLAGS=-D_WIN32 glew.lib.static
make install
cp lib/libGLEW.a /usr/lib

git clone http://github.com/vectorgraphics/asymptote

freeglut-3.0.0:
patch -p1 < ~/asymptote/patches/cygwin_freeglut-3.0.0.patch
cmake CMakeLists.txt
make
cp lib/libfreeglut_static.a /usr/lib/libfreeglut.a
cp -a include/GL/*.h /usr/include/w32api/GL/

mkdir -p ~/dll/cygwin
cp /usr/bin/cygwin1.dll ~/dll/cygwin

mkdir ~/CTAN
cp -a ~/asymptote/build-scripts/README-binaries ~/CTAN

GCVERSION=7.6.2
wget http://hboehm.info/gc/gc_source/gc-$GCVERSION.tar.gz
wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$GCVERSION.tar.gz
tar -zxf gc-$GCVERSION.tar.gz
tar -zxf libatomic_ops-$GCVERSION.tar.gz
mv libatomic_ops-$GCVERSION gc-$GCVERSION/libatomic_ops
cd gc-$GCVERSION
./configure --disable-shared
make check

~/asymptote/build-scripts/build-asymptote.dos 2.48
