Looks like I'm talking to myself here
Anyway.. I managed to get it working.
I used FreeType 2.0 rather than 2.0.3. Unpacked it and ran make twice. Then I did a
sudo make install (this part was not mentioned in the instructions for some reason).
(I had already installed gd without freetype support -- see stepwise.com for full instructions).
Next I edited GD's Makefile. After various attempts I found that this worked.
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>#Depending on your system, you will need to modify <font color = green>this</font> makefile.
#If you <font color = green>do</font> not have gcc, change the setting <font color = green>for</font> COMPILER, but you must
#use an ANSI standard C compiler (NOT the old SunOS <font color = blue>4.1</font>.<font color = blue>3</font> cc
#compiler; get gcc <font color = green>if</font> you are still using it).
COMPILER=cc
#If the ar command fails on your system, consult the ar manpage
#<font color = green>for</font> your system.
AR=ar
#If you don't have FreeType, libjpeg and/or Xpm installed, including the
#header files, uncomment <font color = green>this</font> (<font color = green>default</font>). You really must install
#libpng and zlib to get anywhere <font color = green>if</font> you wish to create PNG images.
#CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
#If you <font color = green>do</font> have FreeType, libjpeg and/or Xpm fully installed, uncomment a
#variation of <font color = green>this</font> and comment out the line above. See also LIBS below.
CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG \
-DHAVE_LIBFREETYPE
#To use the old FreeType <font color = blue>1.</font>x library, add <font color = green>this</font> additional #define
#to the line above
#-DHAVE_LIBTTF
#If you don't have FreeType Xpm fully installed, uncomment <font color = green>this</font>
#(<font color = green>default</font>).
#PLEASE NOTE: YOU MAY HAVE TO JUGGLE THE ORDER OF THE LIBRARIES.
#Some systems are very picky about link order. They don't all agree
#on the right order, either.
#LIBS=-lgd -lpng -lz -lm
#If you <font color = green>do</font> have FreeType, JPEG and/or Xpm fully installed, uncomment a
#variation of <font color = green>this</font> and comment out the line above. Note that
#Xpm requires X11. See also CFLAGS above.
LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm
#Note: <font color = green>for</font> Freetype <font color = blue>1.</font>x, use DHAVE_LIBTTF and -lttf instead.
#Typical install locations <font color = green>for</font> freetype, zlib, xpm, libjpeg and libpng header
#files. If yours are somewhere <font color = green>else</font>, change <font color = green>this</font>. -I. is important to
#ensure that the version of gd you are installing is used, and not an
#older release in your directory tree somewhere.
INCLUDEDIRS=-I. -I/usr/local/include/freetype2 -I/usr/local/include
#Typical install locations <font color = green>for</font> freetype, zlib, xpm and libpng libraries.
#If yours are somewhere <font color = green>else</font>, other than a standard location
#such as /lib or /usr/lib, then change <font color = green>this</font>. Be sure to keep
#-L. as <font color = green>this</font> allows the gd library itself to be found.
#Put -L. first so that old versions of the gd library elsewhere
#on your system can't cause conflicts <font color = green>while</font> building a new one.
#This line shouldn't hurt <font color = green>if</font> you don't actually have some of the
#optional libraries and directories.
LIBDIRS=-L. -L/usr/local/lib
#Location where libgd.a should be installed by <font color = red>"make install"</font>.
INSTALL_LIB=/usr/local/lib
#Location where .h files should be installed by <font color = red>"make install"</font>.
INSTALL_INCLUDE=/usr/local/include
#Location where useful non-test programs should be installed by <font color = red>"make install"</font>.
INSTALL_BIN=/usr/local/bin</font>[/code]
This allowed me to compile the
gdtestft. I first had to find a font that it was happy with. I tried the standard OSX ones but it wasn't happy. I then tried a free windows font from chank.com and voila!
Hope that helps somebody as it took me all afternoon to work it out.
Also, If anyone has any suggestions for things I could have done better...