@@ -32,13 +32,32 @@ have_sel_getName="yes" AC_DEFINE(HAVE_SEL_GETNAME, 1, [Whether we have sel_getName])]) test x"$have_sel_get_name" != x"yes" -a x"$have_sel_getName" != x"yes" && \ AC_ERROR(You need either sel_get_name or sel_getName in libobjc!) +AC_MSG_CHECKING(whether we have IPv6 support) +AC_TRY_RUN([ + #include + #include + #include + + int + main() + { + int fd; + struct sockaddr_in6 addr; + fd = socket(AF_INET6, SOCK_STREAM, 0); + exit(fd >= 0 ? 0 : 1); + }], + have_ipv6="yes", have_ipv6="no", have_ipv6="no") +AC_MSG_RESULT($have_ipv6) +test x"$have_ipv6" = x"yes" && \ + AC_DEFINE(HAVE_IPV6, 1, "Whether we have IPv6 support") + test $cross_compiling != x"yes" && AC_SUBST(TESTS, "tests") BUILDSYS_TOUCH_DEPS AC_SUBST(PACKAGE, objfw) AC_CONFIG_FILES([buildsys.mk extra.mk]) AC_CONFIG_HEADERS(config.h) AC_OUTPUT