You can download this from the github project.
There are many C libraries that you might need to use for an iPhone application. The only problem is that you need to cross-compile the library to ARM, and make sure you link it with the right iPhone SDK instead of with your system SDK.
You can do this pretty easily with the autoconf/automake build
system. You just need to pass the right parameters into
./configure and it will configure it to cross-compile (with the
option host=arm-apple-darwin) and link with the right SDK (by
setting a few C compiler flags).
But it's a pain to remember all of these ./configure flags every
time you want to compile a library for the iPhone.
configure-iphone was born to solve this problem.
configure-iphone is a shell script which automatically
configures libraries using the autoconf/automake build system to
build for the iPhone. It simply wraps around the call to
./configure and appends parameters for linking with the
appropriate SDK.
You supply configure-iphone with the iPhone SDK version and the
type of device (os or simulator), and it configures the library to
link against the correct SDKs and cross-crompile to ARM if
targetting the device.
View the README for more details and how to use it.
We can compile Freetype 2 easily using this script.
$ wget http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-2.3.11.tar.gz
$ tar xvzf freetype-2.3.11.tar.gz
$ cd freetype-2.3.11
$ configure-iphone 3.1.2 -t os
$ make
$ sudo make install
$ ls /usr/local/iphone/iPhoneOS3.1.2
/bin
/include
/lib
$ file /usr/local/iphone/iPhoneOS3.1.2
You could also build it against the iPhone Simulator SDKs by
dropping the -t os argument to configure-iphone or by
explicitly specifying -t simulator.