Compile ra_tiff and normtiff for Windows using MinGW + MSYS

For those of you interested in compiling ra_tiff and normtiff for Windows,
below are the instructions on how it could be done.

Tools:
Get tiff-3.9.4.zip from ftp://ftp.remotesensing.org/pub/libtiff/
Get MinGW + MSYS shell from http://www.mingw.org/

To open a MSYS shell: Go to C:\msys\1.0\msys.bat (or where you installed
MSYS)

Original instructions from:
http://www.gaia-gis.it/spatialite-2.4.0/mingw_how_to.html#libtiff
Only step 5 should be enough to compile libtiff (since we do not use libz
nor libjpeg)
To make it work with Radiance I had to modify the procedure a bit:

    download the latest sources: tiff-3.9.4.zip
    uncompress this zip-file
    then open an MSYS shell

cd tiff-3.9.4
./configure --enable-static --enable-logluv --disable-shared --disable-cxx
--disable-jpeg --disable-zlib --disable-pixarlog
make
make install-strip

Copy the file libtiff.a from C:\msys\1.0\local\lib to C:\..\..\ray\src\lib
(where ..\..\ points to where you extracted the Radiance source files)

To build ra_tiff add these lines to ray\src\px\SConscript:

ra_tiff = env.Program(target=radbin('ra_tiff'), source=['ra_tiff.c'],
    LIBS=['libtiff','rtpic','rtio','rtmem'] + mlib)
progs.append(ra_tiff)

In a similar way normtiff can be build:

Add this line to \ray\src\common\SConscript after the section # build
libraries:

rtall = env.StaticLibrary(target=radlib('rtall'), source=ALL)

To build normtiff add these lines to ray\src\px\SConscript:

normtiff = env.Program(target=radbin('normtiff'),source=['normtiff.c'],
    LIBS=['libtiff','rtall'] + mlib)
progs.append(normtiff)

Then proceed with building Radiance with scons.

Best Regards,

Guy