2
[ --disable-ipv6 disable IPv6 support],
3
want_ipv6=$enableval, want_ipv6="yes")
5
if test "$want_ipv6" = "yes"
7
AC_MSG_CHECKING([for IPv6 support])
8
AC_CACHE_VAL([have_cv_ipv6],[
10
#include <sys/types.h>
11
#include <sys/socket.h>
14
int main(int argc, char **argv)
16
struct addrinfo *res, hints;
19
if((sd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
22
/* also check if getaddrinfo() handles AF_UNSPEC -- bb#1196 */
23
memset(&hints, 0, sizeof(hints));
24
hints.ai_family = AF_UNSPEC;
25
if(getaddrinfo("127.0.0.1", NULL, &hints, &res) < 0)
35
AC_MSG_RESULT([$have_cv_ipv6])
36
if test "$have_cv_ipv6" = yes; then
37
AC_DEFINE(SUPPORT_IPv6, 1, [Support for IPv6])