Jeff Fulmer writes: > Hello, > > I'm at wit's end here. I used to be able to link to the socket libs on > Solaris using the following directives in configure.in > > AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket)) > AC_CHECK_FUNCS(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname)) > > AC_CHECK_LIB(socket, socket) > > At link time, it would add -lsocket and -lnsl > > Since I've upgraded to solaris 9, this is no longer the the case. > configure correctly notes that I need -lsocket and -lnsl and adds those > flags to LIBS, however the only way I can get this to work is to add > LIBS to LDFLAGS as such: > > LDFLAGS = $(SSL_LDFLAGS) @LIBS@ > > Am I missing something? Have you checked config.log? Maybe the order of the checks is important. I've been using the following for ages, and it continues to work on Solaris 9: AC_CHECK_FUNCS(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname,,[AC_CHECK_LIB(socket,gethostbyname)])]) AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(socket,setsockopt)])