1 diff --git a/config/amanda/amanda_configure.m4 b/config/amanda/amanda_configure.m4
2 index 5b427ae..f90810f 100644
3 --- a/config/amanda/amanda_configure.m4
4 +++ b/config/amanda/amanda_configure.m4
5 @@ -18,7 +18,6 @@ AC_PREREQ(2.64)
6 # Take care of some early Amanda-specific setup
13 diff --git a/config/amanda/components.m4 b/config/amanda/components.m4
14 index f2a07db..7628453 100644
15 --- a/config/amanda/components.m4
16 +++ b/config/amanda/components.m4
17 @@ -186,7 +186,21 @@ AC_DEFUN([AMANDA_WITHOUT_NDMP], [
18 n | no) WANT_NDMP=false;;
19 *) AC_MSG_ERROR([You must not supply an argument to --with-ndmp option.]) ;;
23 + AC_CHECK_HEADERS(rpc/rpc.h, HAVE_RPC_RPC_H=1)
24 + if test x"$WANT_NDMP" = x"true"; then
25 + if test x"$HAVE_RPC_RPC_H" = x"1"; then
29 + if test x"$HAVE_RPC_RPC_H" = x"1"; then
33 + AMANDA_MSG_WARN([Disabling NDMP because rpc/rpc.h is not found])
40 diff --git a/config/amanda/libs.m4 b/config/amanda/libs.m4
41 index 0388c9b..a640557 100644
42 --- a/config/amanda/libs.m4
43 +++ b/config/amanda/libs.m4
44 @@ -183,6 +183,44 @@ AC_DEFUN([AMANDA_CHECK_GLIB], [
45 AMANDA_ADD_LIBS($GLIB_LIBS)
56 +AC_DEFUN([AMANDA_CHECK_TIRPC],
58 + AC_PATH_PROG(PKG_CONFIG, pkg-config, [], $LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin)
60 + tirpc_ld_flags=`$PKG_CONFIG libtirpc --libs-only-L 2>/dev/null`
61 + tirpc_lib_flags=`$PKG_CONFIG libtirpc --libs-only-l --libs-only-other 2>/dev/null`
62 + tirpc_cppflags=`$PKG_CONFIG libtirpc --cflags-only-I 2>/dev/null`
63 + tirpc_cflags=`$PKG_CONFIG libtirpc --cflags-only-other 2>/dev/null`
65 + _libtirpc_save_cppflags=$CPPFLAGS
66 + CPPFLAGS="$CPPFLAGS $tirpc_cppflags"
67 + _libtirpc_save_libs=$LIBS
68 + LIBS="$LIBS $tirpc_lib_flags"
70 + unset HAVE_RPC_RPC_H
71 + unset ac_cv_header_rpc_rpc_h
72 + AC_CHECK_HEADERS(rpc/rpc.h, HAVE_RPC_RPC_H=1)
74 + CPPFLAGS=$_libtirpc_save_cppflags
75 + LIBS=$_libtirpc_save_libs
77 + if test x"$HAVE_RPC_RPC_H" = x"1"; then
78 + AMANDA_ADD_LDFLAGS($tirpc_ld_flags)
79 + AMANDA_ADD_LIBS($tirpc_lib_flags)
81 + AMANDA_ADD_CPPFLAGS($tirpc_cppflags)
82 + AMANDA_ADD_CFLAGS($tirpc_cflags)
86 # LIBCURL_CHECK_CONFIG is from the libcurl
87 # distribution and licensed under the BSD license:
88 # Copyright (c) 1996 - 2007, Daniel Stenberg, <daniel@haxx.se>.
89 diff --git a/configure.ac b/configure.ac
90 index 89c4890..8d325b7 100644
93 @@ -13,6 +13,7 @@ AMANDA_VERSION
100 AC_DEFINE([USE_GETTEXT], 1, [Define to 1 if files will be processed with gettextize])