X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=configure.in.pre;h=d7722afa39c23d2f0ec7f21f2b74757b8a6561e0;hb=99865727f85eb96f5462158eed8dc935710d1a0b;hp=82762d4420d9b9d7c51a6aea4608087c61f6bf84;hpb=e4b63806b89601e4e787c239b39b1bee33e46f7e;p=silc.git diff --git a/configure.in.pre b/configure.in.pre index 82762d44..d7722afa 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -611,12 +611,49 @@ AC_ARG_WITH(win32, AM_CONDITIONAL(SILC_WIN32, test x$win32-support = xtrue) +# +# IPv6 support +# +AC_MSG_CHECKING(for IPv6 support) +AC_ARG_ENABLE(ipv6, +[ --enable-ipv6 Enable IPv6 support], +[ case "${enableval}" in + yes) + want_ipv6=true + check_ipv6=false + AC_DEFINE(HAVE_IPV6) + AC_MSG_RESULT(yes) + ;; + *) + want_ipv6=false + check_ipv6=false + AC_MSG_RESULT(no) + ;; +esac ], check_ipv6=true) + +if test x$check_ipv6 = xtrue; then + AC_TRY_COMPILE([#ifdef HAVE_NETINET_TCP_H + #include + #endif + #ifdef HAVE_NETDB_H + #include + #endif + #include + #ifdef HAVE_NETDB_IN_H + #include + #endif], + [struct sockaddr_in6 sin6; + int family = AF_INET6; + ], [AC_DEFINE(HAVE_IPV6) + AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) +fi + # # Debug checking # AC_MSG_CHECKING(for enabled debugging) AC_ARG_ENABLE(debug, -[ --enable-debug Enable debugging (warning: it is heavy!)], +[ --enable-debug Enable debugging], [ case "${enableval}" in yes) AC_MSG_RESULT(yes)