]> git.decadent.org.uk Git - nfs-utils.git/blob - aclocal/libtirpc.m4
configure: move TI-RPC checks into aclocal
[nfs-utils.git] / aclocal / libtirpc.m4
1 dnl Checks for TI-RPC library and headers
2 dnl
3 AC_DEFUN([AC_LIBTIRPC], [
4
5   dnl if --enable-tirpc was specifed, the following components
6   dnl must be present, and we set up HAVE_ macros for them.
7
8   if test "$enable_tirpc" = yes; then
9
10     dnl look for the library; add to LIBS if found
11     AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
12                  [AC_MSG_ERROR([libtirpc not found.])])
13
14     dnl also must have the headers installed where we expect
15     AC_CHECK_HEADERS([tirpc/netconfig.h], ,
16                      [AC_MSG_ERROR([libtirpc headers not found.])])
17
18     dnl set up HAVE_FOO for various functions
19     AC_CHECK_FUNCS([getnetconfig \
20                     clnt_create clnt_create_timed \
21                     clnt_vc_create clnt_dg_create xdr_rpcb])
22
23   fi
24
25 ])dnl