You need python-dev and librsync-dev packages.
Debian
apt-get install python-dev librsync-dev
CentOS/RHEL
yum install python-devel
yum install gcc-c++
wget http://internap.dl.sourceforge.net/sourceforge/librsync/librsync-0.9.7.tar.gz
./configure
make install