Compile Memcached on Mac OS X
First of all lets make it clear, memcahced on mac? why bother?! Well i have to work on mac at work so i dont really have a choice. I assume if you are interested in that hint you are in same situation. Personally i think its just pain that i dont work on debian but any way.
If you need memcached running locally on mac download sources of libevent from lib event site. Then follow typical procedure of compilation and installation:
./configure --prefix=/usr/local make make install
The reason you have to install libevent is that memcache is using new socket functions like epoll. This allows memcached to handle hundreds (and with kernel modificated settings) thousands of sockets. Regular select syscall is much more CPU intensive if you decide to listen to many open sockets at the same time. Memcache does not use threads for client connections so all sockets are handled by the same code.
Once libevent is installed you can downlaod and install memcached. Get sourced from memcached website. Then follow as usually:
./configure --with-libevent=/usr/local/ make
To run memcached as root with full actions preview execute:
./memcached -u root -vv
That preview gives you very good debugging peek view into memecached activity.
But seriously, format your drive and install linux ;- )