]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Make --enable-tirpc the default. If --enable-tirpc wasn't explicitly
authorSteve Dickson <steved@redhat.com>
Mon, 22 Jun 2009 13:49:17 +0000 (09:49 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 22 Jun 2009 13:49:17 +0000 (09:49 -0400)
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>
Signed-off-by: Steve Dickson <steved@redhat.com>
aclocal/ipv6.m4
aclocal/libtirpc.m4
configure.ac

index ba9dcc236b2f37e4205771eef1b861ae187f0727..2490f3d0ea4e5567d5ae38441d04b277b374605a 100644 (file)
@@ -11,7 +11,7 @@ AC_DEFUN([AC_IPV6], [
 
     dnl TI-RPC required for IPv6
     if test "$enable_tirpc" = no; then
 
     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
     fi
 
     dnl IPv6-enabled networking functions required for IPv6
index af4c7d3c10d109535f91282db8420b81f76dc99b..9f0fde0a6cb93fad7a6c31824b293717223e52a9 100644 (file)
@@ -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.
 
   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], ,
 
     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
     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
 
 
   fi
 
index 9ad64edd27128753059b3fd50f834e9b25346a4d..e0ca70e4eec30fa209210a697dd740b9c1f0115f 100644 (file)
@@ -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],
        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=$enableval,
-       enable_tirpc=no)
+       enable_tirpc='yes')
 AC_ARG_ENABLE(ipv6,
        [AC_HELP_STRING([--enable-ipv6],
                         [enable support for IPv6 @<:@default=no@:>@])],
 AC_ARG_ENABLE(ipv6,
        [AC_HELP_STRING([--enable-ipv6],
                         [enable support for IPv6 @<:@default=no@:>@])],