]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/CyaSSL/m4/lib_socket_nsl.m4
Commit 3 RX100 low power demos.
[freertos] / FreeRTOS-Plus / CyaSSL / m4 / lib_socket_nsl.m4
1 dnl @synopsis LIB_SOCKET_NSL
2 dnl
3 dnl This macro figures out what libraries are required on this platform
4 dnl to link sockets programs.
5 dnl
6 dnl The common cases are not to need any extra libraries, or to need
7 dnl -lsocket and -lnsl. We need to avoid linking with libnsl unless we
8 dnl need it, though, since on some OSes where it isn't necessary it
9 dnl will totally break networking. Unisys also includes gethostbyname()
10 dnl in libsocket but needs libnsl for socket().
11 dnl
12 dnl @category Misc
13 dnl @author Russ Allbery <rra@stanford.edu>
14 dnl @author Stepan Kasal <kasal@ucw.cz>
15 dnl @author Warren Young <warren@etr-usa.com>
16 dnl @version 2005-09-06
17 dnl @license AllPermissive
18
19 AC_DEFUN([LIB_SOCKET_NSL],
20 [
21         AC_SEARCH_LIBS([gethostbyname], [nsl])
22         AC_SEARCH_LIBS([socket], [socket], [], [
23                 AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
24                 [], [-lnsl])])
25 ])