]> granicus.if.org Git - p11-kit/commitdiff
configure: pull in -lnsl -lsocket for socket functions
authorFabian Groffen <grobian@gentoo.org>
Wed, 7 Jun 2017 12:36:54 +0000 (14:36 +0200)
committerDaiki Ueno <ueno@gnu.org>
Tue, 27 Jun 2017 11:10:32 +0000 (13:10 +0200)
Solaris has socket() etc. in these two libs.

configure.ac

index 57536645f4bb1207f76aedd34c0b8b8ee9893eeb..e812efe889eb6bd3c72dc5a311955a25a843897d 100644 (file)
@@ -88,6 +88,13 @@ if test "$os_unix" = "yes"; then
                AC_MSG_ERROR([could not find dlopen])
        ])
 
+       # for Solaris we need -lsocket -lnsl for socket stuff, gethostbyname
+       # is just a dummy to find -lnsl
+       AC_SEARCH_LIBS([gethostbyname], [nsl])
+       AC_SEARCH_LIBS([connect], [socket], [], [
+               AC_MSG_ERROR([could not find socket])
+       ])
+
        # These are thngs we can work around
        AC_CHECK_HEADERS([locale.h sys/resource.h])
        AC_CHECK_MEMBERS([struct dirent.d_type],,,[#include <dirent.h>])