OpenCV on Mac

I’m in an ongoing battle to compile the trunk of OpenCV on my Mac (Snow Leopard). Due to compatibility issues, I want to build it for 32 bit. Which has caused some problems. First of all, when compiling it complains of the following:

warning: in /usr/local/lib/libdc1394.dylib, file was built for x86_64which is not the architecture being linked (i386)

Fair enough, if you want to keep things 32-bit, you need to have all components 32 bit. So, although the website of libdc1394 does not provide that much detail, I managed to find out how to compile libdc1394-2.x for 32 bit:

./configure CFLAGS=-m32 CPPFLAGS=-m32

Compiling OpenCV came a lot further this time, but still not all the way. Apparently there was a problem with my Python installation. Now, I don’t intend to use OpenCV with Python, so the easiest option was to use ccmake to configure the OpenCV installation without Python. This time around, building worked like a charm.