Search
Tweets
Recent Changes
« Unnamed Chart Module 0.20 | Main | Unnamed Chart Package 0.1.0 »
Thursday
Apr202006

Compiling Cairo on Mac OS X

Trying to compile Cairo on Mac OS X and having trouble? The problem seems to be finding fontconfig. The solution is to create a .pc file for pkg-config (which you should have installed it you are compiling and installing most open source packages). Create cairo.pc in the directory where pkg-config stores it's pc files (/usr/local/lib/pkgconfig for me, YMMV)



prefix=/usr/X11R6/
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${exec_prefix}/include

Name: fontconfig
Description: mmmhmmm
Version: 1.0.2
Libs -L${libdir} -lfontconfig
Cflags: -I${includedir}


This will allow cairo to detect fontconfig. I originally tried setting the FONTCONFIG_CFLAGS and _LIBS variables, but then pkg-config cairo --cflags would fail because it depends on fontconfig.

Reader Comments (2)

Thanks for the tip. It was really helpul. I also noticed that there is alread a fontconfig.pc file in /usr/X11R6/lib/pkgconfig. I copied this to /usr/local/lib/pkgconfig and it worked as well.

June 1, 2006 | Unregistered CommenterVaderPi

Thanx too! managed to install Chart::Clicker after some darwinports installations but prefere the Mac OS X way over the ports-stuff...

Your hint made that one possible *THX A LOT*

PS: http://www.onemogin.com/clicker/ is down @ the moment (12/29/2006 4:41 pm MEZ), looking for a way to draw graphs with other colors than the default red/green/... ones on the example in cpan.... Would be cool if you could fix the database...

December 29, 2006 | Unregistered CommenterHypericum

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>