libcaca development notes
This page explains how to build and hack on libcaca.
Getting the source code
The source code is managed in a Subversion repository. You can browse it online for a quick overview of what is happening.
Use the following command to retrieve the source code:
svn co svn://svn.zoy.org/caca/libcaca/trunk libcaca
Building using the autotools
Using the autotools solution is the preferred way to build libcaca. It is complicated but you can trust us to maintain it properly. Building libcaca is then a 3-step operation: bootstrapping, configuring and building.
./bootstrap ./configure make
This will build libcaca and a few example programs.
Developing using Visual Studio
A libcaca.sln
Visual Studio solution is also provided, but not actively maintained. Its primary purpose is to debug libcaca on the Windows platform.
Developing on Mac OS X
By default libcaca is built only for the CPU architecture specified by --host
(which defaults to --build
, which defaults to the CPU architecture on which you ran configure, i.e. i386-apple-darwin
version or powerpc-apple-darwin
version). You can override this in order to build a "Universal" i386 + ppc libcaca like this:
./bootstrap export MACOSX_DEPLOYMENT_TARGET MACOSX_SDK PKG_CONFIG ARCH CFLAGS MACOSX_DEPLOYMENT_TARGET=10.4 MACOSX_SDK=/Developer/SDKs/MacOSX10.4u.sdk PKG_CONFIG=false ARCH='-arch ppc -arch i386' CFLAGS='-L/usr/lib -I/usr/include -arch ppc -arch i386' ./configure --disable-dependency-tracking --disable-slang make
The resulting binary should run on Intel or PowerPC CPUs on Mac OS X 10.4 and up.
Also by default libcaca is built against the following Mac OS X SDK versions, provided the Cocoa driver is not disabled by ./configure --disable-cocoa:
- ppc host:
MACOSX_SDK=/Developer/SDKs/MacOSX10.3.9.sdk
(the oldest SDK with X11 support on ppc) - i386 host:
MACOSX_SDK=/Developer/SDKs/MacOSX10.4u.sdk
(the oldest SDK with i386 support) - x86_64 host:
MACOSX_SDK=/Developer/SDKs/MacOSX10.5.sdk
(the oldest SDK with Cocoa support on x86_64) - ppc64 host: no idea. Does Cocoa even work there?