878747
diff --git a/config/amanda/amanda_configure.m4 b/config/amanda/amanda_configure.m4
878747
index 5b427ae..f90810f 100644
878747
--- a/config/amanda/amanda_configure.m4
878747
+++ b/config/amanda/amanda_configure.m4
878747
@@ -18,7 +18,6 @@ AC_PREREQ(2.64)
878747
 # Take care of some early Amanda-specific setup
878747
 #
878747
 AMANDA_CONFIGURE_ARGS
878747
-AMANDA_INIT_SUMMARY
878747
 AMANDA_SNAPSHOT_STAMP
878747
 AMANDA_SPLIT_VERSION
878747
 AMANDA_CONFIG_LOCAL
878747
diff --git a/config/amanda/components.m4 b/config/amanda/components.m4
878747
index f2a07db..7628453 100644
878747
--- a/config/amanda/components.m4
878747
+++ b/config/amanda/components.m4
878747
@@ -186,7 +186,21 @@ AC_DEFUN([AMANDA_WITHOUT_NDMP], [
878747
 	    n | no) WANT_NDMP=false;;
878747
 	    *) AC_MSG_ERROR([You must not supply an argument to --with-ndmp option.]) ;;
878747
 	    esac
878747
-	])
878747
+    ])
878747
+    AC_CHECK_HEADERS(rpc/rpc.h, HAVE_RPC_RPC_H=1)
878747
+    if test x"$WANT_NDMP" = x"true"; then
878747
+	if test x"$HAVE_RPC_RPC_H" = x"1"; then
878747
+	    WANT_NDMP=true
878747
+	else
878747
+	    AMANDA_CHECK_TIRPC
878747
+	    if test x"$HAVE_RPC_RPC_H" = x"1"; then
878747
+		WANT_NDMP=true
878747
+	    else
878747
+		WANT_NDMP=false
878747
+		AMANDA_MSG_WARN([Disabling NDMP because rpc/rpc.h is not found])
878747
+	    fi
878747
+	fi
878747
+   fi
878747
 ])
878747
 
878747
 # SYNOPSIS
878747
diff --git a/config/amanda/libs.m4 b/config/amanda/libs.m4
878747
index 0388c9b..a640557 100644
878747
--- a/config/amanda/libs.m4
878747
+++ b/config/amanda/libs.m4
878747
@@ -183,6 +183,44 @@ AC_DEFUN([AMANDA_CHECK_GLIB], [
878747
     AMANDA_ADD_LIBS($GLIB_LIBS)
878747
 ])
878747
 
878747
+# SYNOPSIS
878747
+#
878747
+#   AMANDA_CHECK_TIRPC
878747
+#
878747
+# OVERVIEW
878747
+#
878747
+#   Search for tirpc.
878747
+#
878747
+AC_DEFUN([AMANDA_CHECK_TIRPC],
878747
+[
878747
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, [], $LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin)
878747
+
878747
+    tirpc_ld_flags=`$PKG_CONFIG libtirpc --libs-only-L 2>/dev/null`
878747
+    tirpc_lib_flags=`$PKG_CONFIG libtirpc --libs-only-l --libs-only-other 2>/dev/null`
878747
+    tirpc_cppflags=`$PKG_CONFIG libtirpc --cflags-only-I 2>/dev/null`
878747
+    tirpc_cflags=`$PKG_CONFIG libtirpc --cflags-only-other 2>/dev/null`
878747
+
878747
+    _libtirpc_save_cppflags=$CPPFLAGS
878747
+    CPPFLAGS="$CPPFLAGS $tirpc_cppflags"
878747
+    _libtirpc_save_libs=$LIBS
878747
+    LIBS="$LIBS $tirpc_lib_flags"
878747
+
878747
+    unset HAVE_RPC_RPC_H
878747
+    unset ac_cv_header_rpc_rpc_h
878747
+    AC_CHECK_HEADERS(rpc/rpc.h, HAVE_RPC_RPC_H=1)
878747
+
878747
+    CPPFLAGS=$_libtirpc_save_cppflags
878747
+    LIBS=$_libtirpc_save_libs
878747
+
878747
+    if test x"$HAVE_RPC_RPC_H" = x"1"; then
878747
+	AMANDA_ADD_LDFLAGS($tirpc_ld_flags)
878747
+	AMANDA_ADD_LIBS($tirpc_lib_flags)
878747
+
878747
+	AMANDA_ADD_CPPFLAGS($tirpc_cppflags)
878747
+	AMANDA_ADD_CFLAGS($tirpc_cflags)
878747
+    fi
878747
+])
878747
+
878747
 # LIBCURL_CHECK_CONFIG is from the libcurl
878747
 # distribution and licensed under the BSD license:
878747
 # Copyright (c) 1996 - 2007, Daniel Stenberg, <daniel@haxx.se>.
878747
diff --git a/configure.ac b/configure.ac
878747
index 89c4890..8d325b7 100644
878747
--- a/configure.ac
878747
+++ b/configure.ac
878747
@@ -13,6 +13,7 @@ AMANDA_VERSION
878747
 gl_EARLY
878747
 gl_INIT
878747
 
878747
+AMANDA_INIT_SUMMARY
878747
 AMANDA_CONFIGURE
878747
 
878747
 AC_DEFINE([USE_GETTEXT], 1, [Define to 1 if files will be processed with gettextize])