Re: Failure to use -lnsl on Solaris with AC_CHECK_LIB

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

 



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.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux