如何下载Mac OS X的PHP扩展

I recently purchased a Mac to do my LAMP development. However, coming from Debian, using the apt-get tool to download PHP extensions was surprisingly easy but doesn't exist on my Mac. After reading up on multiple forums, it seems one needs to download Xcode and use ports to do so, OR, download the binaries and compile them. So my question is, what is the best tool to use in order to get all these extensions (php5-mysql, php5-gd, libapache2-mod-php5, php5-curl etc).

Note: I am using the default PHP installed on my Mac which apparently doesn't come with many extensions or support for them.

You are correct. You can download XCode first and then use MacPorts to download/install/enable php and each extension. This is the same approach we use to setup our LAMP development environment on our MacBook Pros at work.

Alternatively to MacPorts, there's also http://mxcl.github.com/homebrew/ which has the same approach