[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failure to use -lnsl on Solaris with AC_CHECK_LIB

From: Warren Young
Subject: Re: Failure to use -lnsl on Solaris with AC_CHECK_LIB
Date: Tue, 30 Aug 2005 18:46:02 -0600
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Russ Allbery wrote:

Well, Autoconf has never handled this automatically for anyone else.  :)

I don't do any specific checks for libnsl currently, yet it gets linked automatically when build the program on Linux, at least. How is that need discovered, if not automatically by autoconf? I also see it picking up other libraries, too, like zlib. Is it somehow chasing library dependencies?

dnl The rat's nest of networking libraries.  The common cases are not to
dnl need any extra libraries, or to need -lsocket -lnsl.  We need to avoid
dnl linking with libnsl unless we need it, though, since on some OSes where
dnl it isn't necessary it will totally break networking.  Unisys also
dnl includes gethostbyname in libsocket but needs libnsl for socket().

That comment alone is very reassuring. Seriously: I've used some of those platforms, and you're right. :)

Thanks for this.  I'll have the person who reported the problem try it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]