Tested with gcc 4.0.1, and I got, of all things,
...
checking for pam_start in -lpam... no
checking configure summary... configure: error: summary failure. Aborting
So it looks like it's specific to Sun Studio 11. I'll rerun
it with cc one more time to be sure. And it gave the same
error, LIBS: -lsocket-lnsl

I don't think that this is related to the Sun Studio compiler. I also get:
configure: WARNING: the global $LIBS variable contains some libraries!
configure: WARNING: this should not happen, please report to samba-technical@lists.samba.org!
configure: error: only _EXT macros from aclocal.m4 should be used!
when trying to configure Samba 4 on Solaris 9, but I'm using GCC 3.3.5 (also
tried GCC 2.95.2 with the same result).
SAMBA VERSION: 3.9.0-SVN-build-12850
autoheader/autoconf 2.59
I tried reporting this on samba-technical a month or so back, but failed
to provoke a response. I'm happy to try and diagnose, if someone can give me
some pointers to get started. I haven't got my head around how Samba 4 is
using autoconf, yet. Surely one of the points of using configure is to find
libraries like -lsocket which are needed on some platforms but not on others?

So, the reason this occours is known: we need to finish the m4 work in socket.m4.
Metze said he would look into it, but has been busy with other things. While not good, I think we should support a global LIBS for the tech preview (that is, warn rather than die on this case).

I updated my source tree to rev 12948 this morning. ./configure.developer now
fails to find a connect() function:
[...]
checking for sys/sockio.h... yes
checking for sys/un.h... (cached) yes
checking for sin_len in sock... no
checking for connect... no
checking for SOCKET_LIBS in -lnsl_s... no
checking for SOCKET_LIBS in -lnsl... no
checking for SOCKET_LIBS in -lsocket... no
checking for SOCKET_LIBS in -linet... no
configure: error: no connect() function available!
I would normally expect to find connect() in -lsocket on Solaris.
I assume that searching for a function called "SOCKET_LIBS()" is
actually some sort of typo?