I had to add EXTRA_CFLAGS = -lstdc++ -lresolv to Makefile when trying to compile PHP 5.3.19 with:
./configure --prefix=/usr/local --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/private/etc --enable-cli --with-config-file-path=/usr/local/php/etc --with-libxml-dir=/usr --enable-xml --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --enable-gd-native-ttf --with-imap=/usr/local --with-imap-ssl --enable-magic-quotes --enable-mbstring --enable-mbregex --enable-json --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=/tmp/mysql.sock --with-iodbc=/usr --enable-shmop --enable-sockets --enable-fpm --with-mhash --with-mcrypt --with-xmlrpc --enable-xmlwriter --enable-xmlreader --with-xsl=/usr --enable-zend-multibyte --enable-zip --with-pcre-regex=/usr/local --with-pdo-sqlite --enable-pdo --with-freetype-dir=/usr/local --enable-dom --enable-fileinfo --with-kerberos --with-pgsql=/Applications/Postgres.app/Contents/MacOS --with-pdo-pgsql=/Applications/Postgres.app/Contents/MacOS --with-curl --with-gettext --with-zlib --with-tidy --enable-pcntl --enable-hash --enable-mbregex --with-regex=php --enable-bcmath --enable-sqlite-utf8 --enable-intl
Otherwise I had errors with Intl (ICU) and cUrl together, something like :
Undefined symbols for architecture x86_64
_res_9_dn_expand etc...
This was on OSX Mountain Lion.
Coworker reports it also works on old Lion :p

Hi, why don’t you use package manager for Mac?
Like homebrew (http://mxcl.github.com/homebrew/) for example.
It is a much more better way than to build sources manually.
I like to have full control of where stuff gets installed. Package managers introduce dependencies and bloat. Besides, it’s not because you use such a package installer that you won’t one day run into the same problems : https://github.com/josegonzalez/homebrew-php/issues/42
So instead of waiting for someone else to fix it for me, I prefer to do it myself.