On Solaris configure.ac adds "-lsocket -lnsl" to LDFLAGS. But there is no such a library "-lnls". There is libnsl - network services library:
209 case $host_os in
211 LDFLAGS="$LDFLAGS -lsocket -lnls"
Also I'd use AC_SEARCH_LIBS() instead of this "case".
Author: Olivier Crête <email@example.com>
Date: Fri Mar 27 20:08:17 2015 -0400
configure: On Solaris, library is libnsl, not libnls