You might wonder why one would want to compile it under Cygwin while there is a nicely compiled (+Gui) version for Windows. The reason is that the Windows version does not come with a command line only executable. The command line version is very useful especially if you want to write your code on your laptop and render on your Desktop via SSH.
I also would like to thank “Le Forgeron” for the help he has provided on Pov-Ray forums when I was looking for help.
So here is how I did with.
-Before starting the compiling process you need to download and install Cygwin package. Please make sure that you have all the developers packages like gcc, g++, boost libraries. If you have enough disk space and do not know which ones to go for, just select all the libraries, compression utils, base packages and the developers packages etc from the Cygwin setup gui. You can download the setup.exe from their front page. For more details please visit http://www.cygwin.com
-You need to download the source for the Linux version. You can get the Linux sources from here http://www.povray.org/beta/source. For convenience please download into c:\cygwin\temp, assuming that c: is your default drive and you have used default Cygwin installation.
-Open the newly installed Cygwin shell and type “cd /temp”. You will be in the “temp” folder where your compressed Povray sources are. Now type “tar -xf povray-3.7.0.RC3.tar.bz2″ to extract the whole package. It will extract the whole content of the compressed file to a new folder.
-Type “cd povray-3.7.0.RC3″ to get into the Povray folder.
-Now we need to configure the packages. That is where the trickiest part is. Normally we can just configure the installation by typing “./configure” but in our case that wont be enough so you have to put the newly constructed configure command
“./configure CPPFLAGS=”-Dlseek64=lseek” --with-boost-thread=boost_thread-mt --without-libtiff NON_REDISTRIBUTABLE_BUILD=yes COMPILED_BY=”YOURNAME HERE” ” (Please watch out for double dashes and spaces)
-This line should configure the compiling process for you. It might take a little bit
-Once it is done we need to edit one file to make it Cygwin friendly. Now open config.h in your text editor and change the line that says
“#define HAVE_CLOCK_GETTIME 1″ to “#undef HAVE_CLOCK_GETTIME”
-Now type “make”. This will take a while. Once it is done, you can type “make install” to install in your Cygwin system. After the last step you can just type “povray --V” in your “bash shell” to test it out to see if it runs correctly
I hope that these steps work out for you too. It took a while to figure all these out and seems to work fine for me as of now.