public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs-utils: make --enable-tirpc the default when configuring
@ 2009-06-08 13:03 Jeff Layton
  2009-06-22 14:35 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2009-06-08 13:03 UTC (permalink / raw)
  To: linux-nfs; +Cc: steved, chuck.lever, Dan.Muntz, vapier

Make --enable-tirpc the default. If --enable-tirpc wasn't explicitly
specified, but TIRPC libs or headers aren't present then just throw a
warning and disable it. If it was explicitly specified, then throw an
error and exit if they aren't present.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 aclocal/ipv6.m4     |    2 +-
 aclocal/libtirpc.m4 |   22 +++++++++++++++++-----
 configure.ac        |    4 ++--
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/aclocal/ipv6.m4 b/aclocal/ipv6.m4
index ba9dcc2..2490f3d 100644
--- a/aclocal/ipv6.m4
+++ b/aclocal/ipv6.m4
@@ -11,7 +11,7 @@ AC_DEFUN([AC_IPV6], [
 
     dnl TI-RPC required for IPv6
     if test "$enable_tirpc" = no; then
-      AC_MSG_ERROR(['--enable-ipv6' requires '--enable-tirpc'.])
+      AC_MSG_ERROR(['--enable-ipv6' requires TIRPC support.])
     fi
 
     dnl IPv6-enabled networking functions required for IPv6
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
index af4c7d3..9f0fde0 100644
--- a/aclocal/libtirpc.m4
+++ b/aclocal/libtirpc.m4
@@ -11,17 +11,29 @@ AC_DEFUN([AC_LIBTIRPC], [
   dnl if --enable-tirpc was specifed, the following components
   dnl must be present, and we set up HAVE_ macros for them.
 
-  if test "$enable_tirpc" = yes; then
+  if test "$enable_tirpc" != "no"; then
 
     dnl look for the library; add to LIBS if found
     AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
-                 [AC_MSG_ERROR([libtirpc not found.])])
+                 [if test "$enable_tirpc" = "yes"; then
+			AC_MSG_ERROR([libtirpc not found.])
+		  else
+			AC_MSG_WARN([libtirpc not found. TIRPC disabled!])
+			enable_tirpc="no"
+		  fi])
+  fi
 
+  if test "$enable_tirpc" != "no"; then
     dnl also must have the headers installed where we expect
     dnl look for headers; add -I compiler option if found
-    AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h], ,
-                     [AC_MSG_ERROR([libtirpc headers not found.])])
-    AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])
+    AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
+    		      AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]),
+		      [if test "$enable_tirpc" = "yes"; then
+			 AC_MSG_ERROR([libtirpc headers not found.])
+		       else
+			 AC_MSG_WARN([libtirpc headers not found. TIRPC disabled!])
+			 enable_tirpc="no"
+		       fi])
 
   fi
 
diff --git a/configure.ac b/configure.ac
index 9ad64ed..95c88a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,9 +120,9 @@ AC_ARG_ENABLE(mount,
 	AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])
 AC_ARG_ENABLE(tirpc,
 	[AC_HELP_STRING([--enable-tirpc],
-			[enable use of TI-RPC @<:@default=no@:>@])],
+			[enable use of TI-RPC @<:@default=yes@:>@])],
 	enable_tirpc=$enableval,
-	enable_tirpc=no)
+	enable_tirpc='')
 AC_ARG_ENABLE(ipv6,
 	[AC_HELP_STRING([--enable-ipv6],
                         [enable support for IPv6 @<:@default=no@:>@])],
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfs-utils: make --enable-tirpc the default when configuring
  2009-06-08 13:03 [PATCH] nfs-utils: make --enable-tirpc the default when configuring Jeff Layton
@ 2009-06-22 14:35 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2009-06-22 14:35 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-nfs, chuck.lever, Dan.Muntz, vapier



Jeff Layton wrote:
> Make --enable-tirpc the default. If --enable-tirpc wasn't explicitly
> specified, but TIRPC libs or headers aren't present then just throw a
> warning and disable it. If it was explicitly specified, then throw an
> error and exit if they aren't present.
> 
Committed...

steved.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-22 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 13:03 [PATCH] nfs-utils: make --enable-tirpc the default when configuring Jeff Layton
2009-06-22 14:35 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox