First install libevent:
#curl -O http://monkey.org/~provos/libevent-1.3e.tar.gz
#tar xzvf libevent-1.3e.tar.gz
#cd libevent-1.3e
#./configure --prefix=/usr/local
#make
#make install
And then finally memcache:
#curl -O http://www.danga.com/memcached/dist/memcached-1.2.2.tar.gz
#tar xzvf memcached-1.2.2.tar.gz
#cd memcached-1.2.2.tar.gz
#LDFLAGS='-Wl,--rpath /usr/local/lib' ./configure --prefix=/usr/local
#make
#make install
Update: For the latest 1.2.6 i used
#LDFLAGS='-Wl,--rpath /usr/local/lib' ./configure --prefix=/usr/local --enable-64bit --enable-threads