[squeak-dev] Re: How to compile FreeType Plugin (FT2Plugin)?

Takashi Yamamiya tak at metatoys.org
Fri Mar 14 20:50:15 UTC 2008

Hi Bert,

Actually this was what I was about to ask you next;)

On Fri, Mar 14, 2008 at 2:48 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On Mar 13, 2008, at 23:28 , Takashi Yamamiya wrote:
>  > What I did is to load:
>  >
>  > - FreeTypeBitBltSimulation.1.cs
>  > - Freetype-Base-tween.71
>  > - Freetype-Plugin-JMM.53
>  >
>  > and edit platforms/unix/plugins/FT2Plugin/Makefile.inc like:
>  > XCPPFLAGS=      $$(freetype-config --cflags) $$(freetype-config --
>  > cflags)/freetype
>  > XLDFLAGS=       $$(freetype-config --libs)
>  That's not the right way to do it. Instead, you should use an autoconf
>  macro like the DBusPlugin does. The package name is freetype2.

I made acinclude.m4:

and Makefile.inc:

in platforms/unix/plugins/FT2Plugin. I just did copy and paste from
RomePlugin (I'm curious why RomePlugin is here in olpc branch, but
this is a different topic).

But "[FREETYPE_CFLAGS]" was just copied to bld/FT2Plugin/Makefile
without substitution. I'm completely a beginner of autoconf, so could
give me a start point to learn about that? where did $FREETYPE_CFLAGS
come from, and how can I make it work?

> Also, why does the "freetype" subdirectory have to be listed explicitly?

Because freetype-config --cflags answers -I/usr/include/freetype2 but
tttables.h is /usr/include/freetype2/freetype.

FT2Plugin class >> declareCVarsIn:

cg addHeaderFile: '<ft2build.h>'.
cg addHeaderFile: '<tttables.h>'.
cg addHeaderFile: 'FT_FREETYPE_H'.
cg addHeaderFile: 'FT_OUTLINE_H'.
cg var: 'library' declareC: 'FT_Library library'.
cg var: 'errorCode' type: 'int'.

Thank you,
- Takashi

More information about the Squeak-dev mailing list