Please note that this is not a complete-step-by-step solution but rather a set of notes that might help to build Gearman 1.1.6 on Centos 5.9.
Some other helpful notes can be found here: http://gearman.info/build/centos5-8.html
yum install boost141 boost141-devel gcc44 gcc44-c++ libevent-devel mysql-devel
export CC="gcc44"
export CFLAGS="-std=gnu99"
export CXX="gcc44-c++"
export CPPFLAGS="-I/usr/include/boost141"
export LDFLAGS="-L/usr/lib64/boost141"
CC=gcc44 CXX=g++44 ./configure
make
make install
# Download source, extract and cd there
pecl download gearman-1.1.1
...
# Build
phpize
./configure
make
make install
# profit!