]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
configure: move IPv6 feature checks into aclocal
authorChuck Lever <chuck.lever@oracle.com>
Mon, 16 Mar 2009 17:37:09 +0000 (13:37 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 16 Mar 2009 17:37:09 +0000 (13:37 -0400)
Clean up: for consistency with other local feature checks, move IPv6
feature checks into aclocal/

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Makefile.am
aclocal/ipv6.m4 [new file with mode: 0644]
configure.ac

index 098446bf781a5522197814906106a990086064c8..b3a6e912b6575ae5f51f252496978ad461c658f3 100644 (file)
@@ -44,7 +44,8 @@ EXTRA_DIST = \
        aclocal/libtirpc.m4 \
        aclocal/libevent.m4 \
        aclocal/libnfsidmap.m4 \
-       aclocal/rpcsec_vers.m4
+       aclocal/rpcsec_vers.m4 \
+       aclocal/ipv6.m4
 
 ACLOCAL_AMFLAGS = -I aclocal
 
diff --git a/aclocal/ipv6.m4 b/aclocal/ipv6.m4
new file mode 100644 (file)
index 0000000..0564b3e
--- /dev/null
@@ -0,0 +1,29 @@
+dnl Checks for IPv6 support
+dnl
+AC_DEFUN([AC_IPV6], [
+
+  AC_CHECK_DECL([AI_ADDRCONFIG],
+                [AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
+                           [Define this to 1 if AI_ADDRCONFIG macro is defined])], ,
+                [ #include <netdb.h> ])
+
+  if test "$enable_ipv6" = yes; then
+
+    dnl TI-RPC required for IPv6
+    if test "$enable_tirpc" = no; then
+      AC_MSG_ERROR(['--enable-ipv6' requires '--enable-tirpc'.])
+    fi
+
+    dnl IPv6-enabled networking functions required for IPv6
+    AC_CHECK_FUNCS([getnameinfo bindresvport_sa], , ,
+                   [AC_MSG_ERROR([Missing functions needed for IPv6.])])
+
+    dnl Need to detect presence of IPv6 networking at run time via
+    dnl getaddrinfo(3); old versions of glibc do not support ADDRCONFIG
+    AC_CHECK_DECL([AI_ADDRCONFIG], ,
+                  [AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support])],
+                  [ #include <netdb.h> ])
+
+  fi
+
+])dnl
index 7d25384912feaf4146d7328071665e0e4ab07203..e34b7e257b756335bb2b0c22c53eee463b5dce50 100644 (file)
@@ -250,21 +250,8 @@ if test "$enable_gss" = yes; then
 
 fi
 
-AC_CHECK_DECL([AI_ADDRCONFIG],
-              AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
-                         [Define this to 1 if AI_ADDRCONFIG macro is defined]), ,
-              [ #include <netdb.h> ] )
-
-if test "$enable_ipv6" = yes; then
-  if test "$enable_tirpc" = no; then
-    AC_MSG_ERROR('--enable-ipv6' requires '--enable-tirpc'.)
-  fi
-  AC_CHECK_FUNCS([getnameinfo bindresvport_sa], , ,
-                 [AC_MSG_ERROR([Missing functions needed for IPv6.])])
-  AC_CHECK_DECL([AI_ADDRCONFIG], ,
-               AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support]),
-               [ #include <netdb.h> ] )
-fi
+dnl Check for IPv6 support
+AC_IPV6
 
 dnl *************************************************************
 dnl Check for headers