From: Jeffrey Walton Date: Tue, 4 Feb 2020 02:06:30 +0000 (-0500) Subject: Add additional search libs for inet_ntop and inet_pton X-Git-Tag: 1.8.0-rc.1~80^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae8ac3d8255a1f58e8c58bc867af901e9ed8cf47;p=thirdparty%2Fldns.git Add additional search libs for inet_ntop and inet_pton --- diff --git a/configure.ac b/configure.ac index f91563ad..939e6a8c 100644 --- a/configure.ac +++ b/configure.ac @@ -119,8 +119,28 @@ AC_CHECK_TYPE(uint64_t, unsigned long long) AC_CHECK_PROG(doxygen, doxygen, doxygen) # check to see if libraries are needed for these functions. -AC_SEARCH_LIBS([socket], [socket]) -AC_SEARCH_LIBS([inet_pton], [nsl]) +AC_CHECK_FUNC([socket], + [], + [AC_SEARCH_LIBS([socket], [socket]) +]) + +# modern Linux provides inet_ntop in -lsocket. +# modern OS X provides inet_ntop in -lc. +# modern Solaris provides inet_ntop in -lsocket -lnsl. +# older Solaris provides inet_ntop in -lresolv. +AC_CHECK_FUNC([inet_ntop], + [], + [AC_SEARCH_LIBS([inet_ntop], [socket c nsl resolv]) +]) + +# modern Linux provides inet_pton in -lsocket. +# modern OS X provides inet_pton in -lc. +# modern Solaris provides inet_pton in -lsocket -lnsl. +# older Solaris provides inet_pton in -lresolv. +AC_CHECK_FUNC([inet_pton], + [], + [AC_SEARCH_LIBS([inet_pton], [socket c nsl resolv]) +]) AC_ARG_WITH(drill, AC_HELP_STRING([--with-drill],