Here are the complete procedures to build Xft and dependencies from scratch
(Systems tested are Solaris/sparc 8).

Note that these instructions are provided as is, and do not represent a
100% guaranteed method. This is merely an empirical list of steps that
are required for a given version and for a given set of OS.

Download

fontconfig, render, xrender and xft are found at
  http://freedesktop.org/Software/fontconfig/releases/
FreeType at ftp://ftp.freetype.org/freetype/freetype2/
expat at ftp://ftp.jclark.com/pub/xml/

##############

prefix=/opt/gtk-2.0

First make sure pkgconfig and zlib are installed, following instructions in
gtk-build.txt

#########
# expat #
#########

tar xzvf expat-1.2.tar.gz
cd expat-1.2
make CFLAGS="-O2 -fPIC -Ixmltok -Ixmlparse"
mkdir -p $prefix/include $prefix/lib
cp -p xmlparse/xmlparse.h $prefix/include
cp -p xmlparse/libexpat.a $prefix/lib
cd ..

############
# FreeType #
############

(Note: pango/gtk 2.2 are incompatible with freetype-2.1.7)
tar xzvf freetype-2.1.5.tar.gz
cd freetype-2.1.5
./configure --prefix=$prefix
make
make install
cd ..

##############
# fontconfig #
##############

tar xzvf fontconfig-2.2.2.tar.gz
cd fontconfig-2.2.2
./configure --prefix=$prefix
make
make install
cd ..

##########
# render #
##########

tar xzvf render-0.8.tar.gz
cd render-0.8
./configure --prefix=$prefix
make
make install
cd ..

###########
# xrender #
###########

tar xzvf xrender-0.8.3.tar.gz
cd xrender-0.8.3
./configure --prefix=$prefix
make CFLAGS="-g -O2 -D__STDC__"
make install
cd ..

#######
# xft #
#######

tar xzvf xft-2.1.2.tar.gz
cd xft-2.1.2
./configure --prefix=$prefix
make
make install
cd ..

