Animation Contact News Download Image Links Welcome FAQ

How to compile POV-Ray 3.1g for Apple's Intel Macs running Mac OSX 10.6 Snow Leopard
Make sure that you have installed Apple's XCode 3.2 (for OSX 10.5.x version 3.0.x), then you can download the complete source package here. I downloaded the package onto my Desktop and used Mac OSX's built-in archive abilities to extract everything into the povray31-directory.

When you have unpacked everything go into that directory and find the source-directory. There you should enter the Unix-directory and open the file makefile. You should best do so using TextWrangler 3.0 or BBEdit 9.2.x or newer. They are both Universal Binary applications.

Add a # as the first character on line 56.

Add after line 57:

   # Mac OS X compiler flags
   CFLAGS = -O3 -c -ansi $(SRCINC) $(LIBPNGINC) $(ZLIBINC)

Save the file when you are done.

Now you should go back to the Source-directory and into the libpng-directory. In its scripts-directory you will find a file called makefile.std. Copy this file one directory up (Desktop:povray31:source:libpng) and rename it to makefile.

Now open this file and change line 15 into the line below, after which we can save the file again.

   CFLAGS = -I$(ZLIBINC) -O3 -c -ansi

Now we need to change another file, go back to the Source-directory and into the zlib-directory. There is another makefile here that we need to make changes to. Open it and change line 17 into:

   CFLAGS = -O3 -c -ansi

Save this file too and now open up the Terminal application. Enter the following commands and each time wait till they have finished, which means that you'll get a blinking cursor again.

   cd /usr

Now check if there is a local directory there, if not then use:

   sudo mkdir local

Otherwise continue here:

   cd local
   sudo mkdir include

Now check if there is a lib directory there, if not then use:

   sudo mkdir lib

Otherwise continue here:

   sudo chmod 777 include
   sudo chmod 777 lib
   cd ~/desktop/povray31/source/zlib
   make install
   cd ../libpng
   make libpng.a
   cd ../unix
   make newunix
   sudo cp povray /usr/sbin

You should now have a working POV-Ray 3.1g for Mac OSX running native on Apple's new Intel Macs or on previous PowerPC machines, fully command line operational and XGrid-worthy!