[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -lsocket -lsnl on solaris 9
From: |
Lars Hecking |
Subject: |
Re: -lsocket -lsnl on solaris 9 |
Date: |
Mon, 26 Jan 2004 15:43:44 +0000 |
User-agent: |
Mutt/1.5.5i |
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)])