This macro figures out what libraries are required on this platform to link sockets programs.
The common cases are not to need any extra libraries, or to need -lsocket and -lnsl. We need to avoid linking with libnsl unless we need it, though, since on some OSes where it isn’t necessary it will totally break networking. Unisys also includes gethostbyname() in libsocket but needs libnsl for socket().
Download the latest version of ax_lib_socket_nsl.m4 or browse the macro’s revision history.
Copyright © 2008 Russ Allbery email@example.com
Copyright © 2008 Stepan Kasal firstname.lastname@example.org
Copyright © 2008 Warren Young email@example.com
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.