]> git.decadent.org.uk Git - nfs-utils.git/blob - aclocal/ipv6.m4
nfs-utils: nfs-iostat.py autofs cleanup and option to sort by ops/s
[nfs-utils.git] / aclocal / ipv6.m4
1 dnl Checks for IPv6 support
2 dnl
3 AC_DEFUN([AC_IPV6], [
4
5   AC_CHECK_DECL([AI_ADDRCONFIG],
6                 [AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
7                            [Define this to 1 if AI_ADDRCONFIG macro is defined])], ,
8                 [ #include <netdb.h> ])
9
10   if test "$enable_ipv6" = yes; then
11
12     dnl TI-RPC required for IPv6
13     if test "$enable_tirpc" = no; then
14       AC_MSG_ERROR(['--enable-ipv6' requires TIRPC support.])
15     fi
16
17     dnl IPv6-enabled networking functions required for IPv6
18     AC_CHECK_FUNCS([getnameinfo bindresvport_sa], ,
19                    [AC_MSG_ERROR([Missing functions needed for IPv6.])])
20
21     dnl Need to detect presence of IPv6 networking at run time via
22     dnl getaddrinfo(3); old versions of glibc do not support ADDRCONFIG
23     AC_CHECK_DECL([AI_ADDRCONFIG], ,
24                   [AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support])],
25                   [ #include <netdb.h> ])
26
27   fi
28
29 ])dnl