Check for IPv6 multicast support in autoconf
This commit is contained in:
parent
466e7355e1
commit
2a87fd96b4
33
configure.ac
33
configure.ac
|
@ -33,25 +33,40 @@ AC_SUBST(DEBUG_OPTS)
|
|||
AC_ARG_ENABLE(ipv6,
|
||||
AS_HELP_STRING([--disable-ipv6],
|
||||
[disable ipv6 support (default is autodetect)]),
|
||||
ac_cv_have_ipv6=$enable_ipv6,)
|
||||
uvrrpd_want_ipv6=$enable_ipv6,)
|
||||
|
||||
dnl check for ipv6
|
||||
if test "$ac_cv_have_ipv6" != no; then
|
||||
if test x"uvrrpd_want_ipv6" != xno; then
|
||||
AC_CHECK_TYPES(struct in6_addr,,,[#include <netinet/in.h>])
|
||||
AC_CHECK_TYPES(struct ip6_hdr,,,[#include <netinet/ip6.h>])
|
||||
AC_CHECK_DECLS(AF_INET6,,,[#include <sys/socket.h>])
|
||||
AC_MSG_CHECKING(for IPv6 headers and structures)
|
||||
ac_cv_have_ipv6=no
|
||||
uvrrpd_want_ipv6=no
|
||||
|
||||
if test "$ac_cv_type_struct_in6_addr" = yes; then
|
||||
if test "$ac_cv_type_struct_ip6_hdr" = yes; then
|
||||
if test "$ac_cv_have_decl_AF_INET6" = yes; then
|
||||
ac_cv_have_ipv6=yes
|
||||
AC_DEFINE([HAVE_IP6], 1, [Define to enable IPv6 support])
|
||||
if test x"$ac_cv_type_struct_in6_addr" = xyes; then
|
||||
if test x"$ac_cv_type_struct_ip6_hdr" = xyes; then
|
||||
if test x"$ac_cv_have_decl_AF_INET6" = xyes; then
|
||||
uvrrpd_want_ipv6=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_have_ipv6)
|
||||
AC_MSG_RESULT($uvrrpd_want_ipv6)
|
||||
fi
|
||||
|
||||
dnl check for ipv6 multicast (required)
|
||||
if test x"uvrrpd_want_ipv6" != xno; then
|
||||
AC_CHECK_DECLS(IPV6_ADD_MEMBERSHIP,,,[#include <netinet/in.h>])
|
||||
AC_CHECK_TYPES(struct ipv6_mreq,,,[#include <netinet/in.h>])
|
||||
AC_MSG_CHECKING(for IPv6 multicast support)
|
||||
uvrrpd_want_ipv6_mcast=no
|
||||
|
||||
if test x"$ac_cv_have_decl_IPV6_ADD_MEMBERSHIP" = xyes; then
|
||||
if test x"$ac_cv_type_struct_ipv6_mreq" = xyes; then
|
||||
uvrrpd_want_ipv6_mcast=yes
|
||||
AC_DEFINE([HAVE_IP6], 1, [Define to enable IPv6 support])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($uvrrpd_want_ipv6_mcast)
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue