Tue, 15 Apr 2014 02:55:56 +0200
cross-win32: don't check for socket and inet_aton
| configure.ac | file | annotate | diff | comparison | revisions |
--- a/configure.ac Mon Apr 14 22:46:35 2014 +0200 +++ b/configure.ac Tue Apr 15 02:55:56 2014 +0200 @@ -121,6 +121,16 @@ dnl Check for Sun compiler AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) +dnl Check for Win32 +case "$host" in + *-*-mingw* | *-*-cygwin*) + is_win32="yes" + ;; + *) + is_win32="no" + ;; +esac + dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT @@ -147,12 +157,16 @@ ]) dnl Check for inet_aton -AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , - [AC_MSG_ERROR([inet_aton not found])])]) +if test "x$is_win32" != "xyes" ; then + AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , + [AC_MSG_ERROR([inet_aton not found])])]) +fi AC_CHECK_LIB(resolv, __res_query) AC_CHECK_LIB(nsl, gethostent) -AC_CHECK_FUNC(socket, , - [AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])]) +if test "x$is_win32" != "xyes" ; then + AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket, socket, , + [AC_MSG_ERROR([socket not found])])]) +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,