Rob Peck has figured out a way to get memcache (pecl) to compile on his Mac (OS X).
So tonight I ran into an interesting issue this evening in configuring PECL memcache to run on my Macintosh. To give you a bit of background, I use the built-in copy of Apache, but with PHP (current 5.2.8) compiled from source since the version in Leopard is old and I needed some things that it didn’t provide.
After finding out the problem (from a log file), he tracked down a similar issue and its solution. Trying it out, he found it worked - adding in an environment variable to tell the compiler with environment to use.