Quick note: iconv and Building PHP on OSX

When attempting to build PHP 5.3.6 on OSX (Snow Leopard) I got warnings about iconv, which I had installed via ports.

Undefined symbols:
  "_iconv_close", referenced from:
      __php_iconv_strlen in iconv.o
      _php_iconv_string in iconv.o
      _php_iconv_string in iconv.o
      __php_iconv_strpos in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      _zif_iconv_substr in iconv.o
      _zif_iconv_substr in iconv.o
      _php_iconv_stream_filter_dtor in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
 ... etc

To get around this, I had to:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-iconv=shared,/opt/local