Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -9,11 +9,10 @@ AC_PROG_CPP AC_PROG_LN_S AC_PROG_EGREP CFLAGS="$CFLAGS -Wall" -CPPFLAGS="$CPPFLAGS -D_RENTRANT" OBJCFLAGS="$OBJCFLAGS -Wall -fobjc-exceptions" LIBS="$LIBS -lobjc" AC_DEFINE(OF_CONFIG_H, 1, [Define so that we know we got our config.h]) @@ -84,23 +83,32 @@ AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32") AC_MSG_CHECKING(whether we have IPv6 support) AC_CACHE_VAL(ac_cv_have_ipv6, [ AC_TRY_RUN([ + #ifndef _WIN32 #include #include #include + #else + #include + #include + #endif + + #ifndef INVALID_SOCKET + #define INVALID_SOCKET -1 + #endif int main() { int fd; struct sockaddr_in6 addr; fd = socket(AF_INET6, SOCK_STREAM, 0); - exit(fd >= 0 ? 0 : 1); + exit(fd != INVALID_SOCKET ? 0 : 1); }], ac_cv_have_ipv6="yes", ac_cv_have_ipv6="no", ac_cv_have_ipv6="no")]) AC_MSG_RESULT($ac_cv_have_ipv6)