b8c490a
commit aee8b1ab778f8e07b30305f10d4f9427023e314d
b8c490a
Author: Chuck Lever <chuck.lever@oracle.com>
b8c490a
Date:   Wed Jan 7 12:06:14 2009 -0500
b8c490a
b8c490a
    configure: Remove inet_ntop(3) check from configure.ac
b8c490a
    
b8c490a
    nfs-utils no longer uses inet_ntop(3) so remove checks for it from
b8c490a
    configure.ac.
b8c490a
b8c490a
commit ba05418f589c2d01f4e7e44c70d4844f43511927
b8c490a
Author: Chuck Lever <chuck.lever@oracle.com>
b8c490a
Date:   Wed Jan 7 12:18:11 2009 -0500
b8c490a
b8c490a
    configure: Add new build option "--enable-tirpc"
b8c490a
    
b8c490a
    Allow easier testing of nfs-utils in legacy environments by providing
b8c490a
    a "configure" option to force the build not to use libtirpc, even if
b8c490a
    it's present on the build system.  This can also be tried as a
b8c490a
    fallback if problems are found with the new TI-RPC-based nfs-utils
b8c490a
    code.
b8c490a
    
b8c490a
    The new option is:
b8c490a
    
b8c490a
      --enable-tirpc          enable use of TI-RPC [default=no]
b8c490a
    
b8c490a
    Build option matrix:
b8c490a
    
b8c490a
       --disable-tirpc   --disable-ipv6	Default; IPv4 only, glibc RPC
b8c490a
       --disable-tirpc   --enable-ipv6	'configure' will fail
b8c490a
       --enable-tirpc    --disable-ipv6	IPv4 only, TI-RPC
b8c490a
       --enable-tirpc    --enable-ipv6	IPv4 and IPv6, TI-RPC
b8c490a
    
b8c490a
commit 29ac873f9024c8fcbca38ab09ba54cda3765b746
b8c490a
Author: Chuck Lever <chuck.lever@oracle.com>
b8c490a
Date:   Wed Jan 7 12:33:09 2009 -0500
b8c490a
b8c490a
    showmount command: Quiesce warning when TI-RPC is disabled
b8c490a
    
b8c490a
    Make sure nfs_sm_pgmtbl is not compiled if TI-RPC functions are not
b8c490a
    available.  This quiesces the following compiler warning:
b8c490a
    
b8c490a
      showmount.c:53: warning: nfs_sm_pgmtbl defined but not used
b8c490a
b8c490a
diff -up nfs-utils-1.1.4/configure.ac.save nfs-utils-1.1.4/configure.ac
b8c490a
--- nfs-utils-1.1.4/configure.ac.save	2009-01-07 12:52:29.000000000 -0500
b8c490a
+++ nfs-utils-1.1.4/configure.ac	2009-01-07 12:52:50.000000000 -0500
b8c490a
@@ -131,6 +131,14 @@ AC_ARG_ENABLE(ipv6,
b8c490a
 	AC_SUBST(enable_ipv6)
b8c490a
 	AM_CONDITIONAL(CONFIG_IPV6, [test "$enable_ipv6" = "yes"])
b8c490a
 
b8c490a
+AC_ARG_ENABLE(tirpc,
b8c490a
+	[AC_HELP_STRING([--enable-tirpc],
b8c490a
+                        [enable use of TI-RPC @<:@default=no@:>@])],
b8c490a
+	enable_tirpc=$enableval,
b8c490a
+	enable_tirpc=no)
b8c490a
+	AC_SUBST(enable_tirpc)
b8c490a
+	AM_CONDITIONAL(CONFIG_TIRPC, [test "$enable_tirpc" = "yes"])
b8c490a
+
b8c490a
 # Check whether user wants TCP wrappers support
b8c490a
 AC_TCP_WRAPPERS
b8c490a
 
b8c490a
@@ -251,15 +259,22 @@ AC_CHECK_DECL([AI_ADDRCONFIG],
b8c490a
                          [Define this to 1 if AI_ADDRCONFIG macro is defined]), ,
b8c490a
               [ #include <netdb.h> ] )
b8c490a
 
b8c490a
+if test "$enable_tirpc" = yes; then
b8c490a
+  AC_CHECK_LIB(tirpc, clnt_tli_create, ,
b8c490a
+           AC_MSG_ERROR([libtirpc not found.]))
b8c490a
+  AC_CHECK_HEADERS(tirpc/netconfig.h, ,
b8c490a
+                   AC_MSG_ERROR([libtirpc headers not found.]))
b8c490a
+  AC_CHECK_FUNCS([bindresvport_sa getnetconfig \
b8c490a
+                  clnt_create clnt_create_timed \
b8c490a
+                  clnt_vc_create clnt_dg_create xdr_rpcb])
b8c490a
+fi
b8c490a
+
b8c490a
 if test "$enable_ipv6" = yes; then
b8c490a
-  AC_CHECK_FUNC(inet_ntop, , ,
b8c490a
-               AC_MSG_ERROR(Function 'inet_ntop' not found.))
b8c490a
+  if test "$enable_tirpc" = no; then
b8c490a
+    AC_MSG_ERROR('--enable-ipv6' requires '--enable-tirpc'.)
b8c490a
+  fi
b8c490a
   AC_CHECK_FUNC(getnameinfo, , ,
b8c490a
                AC_MSG_ERROR(Function 'getnameinfo' not found.))
b8c490a
-  AC_CHECK_LIB(tirpc, clnt_tli_create, ,
b8c490a
-               AC_MSG_ERROR([libtirpc needed for IPv6 support]))
b8c490a
-  AC_CHECK_HEADERS(tirpc/netconfig.h, ,
b8c490a
-               AC_MSG_ERROR([libtirpc headers needed for IPv6 support]))
b8c490a
   AC_CHECK_DECL([AI_ADDRCONFIG], ,
b8c490a
                AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support]),
b8c490a
                [ #include <netdb.h> ] )
b8c490a
@@ -273,7 +288,7 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h li
b8c490a
                  stdlib.h string.h sys/file.h sys/ioctl.h sys/mount.h \
b8c490a
                  sys/param.h sys/socket.h sys/time.h sys/vfs.h \
b8c490a
                  syslog.h unistd.h com_err.h et/com_err.h \
b8c490a
-                 ifaddrs.h tirpc/netconfig.h])
b8c490a
+                 ifaddrs.h])
b8c490a
 
b8c490a
 dnl *************************************************************
b8c490a
 dnl Checks for typedefs, structures, and compiler characteristics
b8c490a
@@ -309,10 +324,7 @@ AC_FUNC_STAT
b8c490a
 AC_FUNC_VPRINTF
b8c490a
 AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
b8c490a
                gethostbyaddr gethostbyname gethostname getmntent \
b8c490a
-               inet_ntop getnameinfo getrpcbyname \
b8c490a
-               bindresvport_sa getnetconfig \
b8c490a
-               clnt_create clnt_create_timed \
b8c490a
-               clnt_tli_create clnt_vc_create clnt_dg_create xdr_rpcb \
b8c490a
+               getnameinfo getrpcbyname \
b8c490a
                gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
b8c490a
                realpath rmdir select socket strcasecmp strchr strdup \
b8c490a
                strerror strrchr strtol strtoul sigprocmask])
b8c490a
diff -up nfs-utils-1.1.4/utils/showmount/showmount.c.save nfs-utils-1.1.4/utils/showmount/showmount.c
b8c490a
--- nfs-utils-1.1.4/utils/showmount/showmount.c.save	2009-01-07 12:53:26.000000000 -0500
b8c490a
+++ nfs-utils-1.1.4/utils/showmount/showmount.c	2009-01-07 12:53:37.000000000 -0500
b8c490a
@@ -50,13 +50,6 @@ static int	aflag = 0;
b8c490a
 static int	dflag = 0;
b8c490a
 static int	eflag = 0;
b8c490a
 
b8c490a
-static const char *nfs_sm_pgmtbl[] = {
b8c490a
-	"showmount",
b8c490a
-	"mount",
b8c490a
-	"mountd",
b8c490a
-	NULL,
b8c490a
-};
b8c490a
-
b8c490a
 static struct option longopts[] =
b8c490a
 {
b8c490a
 	{ "all", 0, 0, 'a' },
b8c490a
@@ -87,6 +80,13 @@ static void usage(FILE *fp, int n)
b8c490a
 
b8c490a
 #ifdef HAVE_CLNT_CREATE
b8c490a
 
b8c490a
+static const char *nfs_sm_pgmtbl[] = {
b8c490a
+	"showmount",
b8c490a
+	"mount",
b8c490a
+	"mountd",
b8c490a
+	NULL,
b8c490a
+};
b8c490a
+
b8c490a
 /*
b8c490a
  * Generate an RPC client handle connected to the mountd service
b8c490a
  * at @hostname, or die trying.