Tue, 13 May 2014 12:02:54 +0200
Configure: don't look for getaddrinfo and inet_ntop on win32
| configure.ac | file | annotate | diff | comparison | revisions |
--- a/configure.ac Tue May 13 10:53:47 2014 +0200 +++ b/configure.ac Tue May 13 12:02:54 2014 +0200 @@ -270,18 +270,21 @@ fi AC_CHECK_LIB(resolv, __res_query) AC_CHECK_LIB(nsl, gethostent) -if test "x$is_win32" != "xyes" ; then +if test "x$is_win32" = "xyes" ; then + AC_DEFINE(HAVE_GETADDRINFO, 1, [Define to 1 if you have the getaddrinfo function.]) + AC_DEFINE(HAVE_INET_NTOP, 1, [Define to 1 if you have the `inet_ntop' function.]) +else AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])]) + dnl If all goes well, by this point the previous two checks will have + dnl pulled in -lsocket and -lnsl if we need them. + AC_CHECK_FUNC(getaddrinfo, + [AC_DEFINE([HAVE_GETADDRINFO], [1], + [Define to 1 if you have the getaddrinfo function.])], + [AC_CHECK_LIB(socket, getaddrinfo, + [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lnsl $LIBS"], , -lnsl)]) + AC_CHECK_FUNCS(inet_ntop) fi -dnl If all goes well, by this point the previous two checks will have -dnl pulled in -lsocket and -lnsl if we need them. -AC_CHECK_FUNC(getaddrinfo, - [AC_DEFINE([HAVE_GETADDRINFO], [1], - [Define to 1 if you have the getaddrinfo function.])], - [AC_CHECK_LIB(socket, getaddrinfo, - [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lnsl $LIBS"], , -lnsl)]) -AC_CHECK_FUNCS(inet_ntop) AC_CHECK_FUNCS(getifaddrs) dnl Check for socklen_t (in Unix98) AC_MSG_CHECKING(for socklen_t)