From 05d913484160c99ef9a94072602c33919c30a00d Mon Sep 17 00:00:00 2001 From: Lauri Nurmi Date: Thu, 27 Apr 2017 16:17:29 +0300 Subject: [PATCH] Link against socket and nsl libs when building on SunOS On OpenIndiana (SunOS) functions such as bind, socket, listen require -lnsl -lsocket to be given to linker. --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 4c3c7778..dda46ca7 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,7 @@ AC_CANONICAL_HOST os_win32="false" os_cygwin="false" os_qnx="false" +os_sunos="false" case "${host_os}" in *mingw32*) os_win32="true" @@ -68,6 +69,9 @@ case "${host_os}" in ;; *cygwin*) os_cygwin="true" + ;; + *solaris*) + os_sunos="true" ;; esac AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "true") @@ -133,6 +137,11 @@ if test "$os_cygwin" = "false"; then fi fi +if test "$os_sunos" = "true"; then + LIBS="$LIBS -lnsl -lsocket" + AC_SUBST(LIBS) +fi + # Check for RS485 support (Linux kernel version 2.6.28+) AC_CHECK_DECLS([TIOCSRS485], [], [], [[#include ]]) # Check for RTS flags