In Solaris 9 the libnet library is a prerequisite for building PHP with LDAP, SASL and SSL (libnet is available on Sunfreeware).
I didn't see this mentioned anywhere and I'm not sure if it is required by ldap or sasl or ssl. I just spent an hour on Google with no luck before I figured it out, maybe this comment will help the next googler.
The error is,
ld: fatal: library -lnet: not found
ld: fatal: File processing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1