XAMPP on Mavericks install APC and Memcached
If you've installed XAMPP then you'll have two versions of PHP on your system. I think the problem is that you are using the XAMPP version of PHP, but the extensions have been compiled against the OS bundled version.

If you are using XAMPP then you'll need to use the toolchain that comes with XAMPP.
For example, try sudo /Applications/XAMPP/xamppfiles/bin/pecl install memcached, this seems to download, build and install memcached correctly for me so that XAMPP can use it.

After that I just needed to add the extension=memcached.so line to php.ini and now memcached is appearing in phpinfo().