2 dnl # Check for libtirpc - may be needed for xdr functionality
4 AC_DEFUN([ZFS_AC_CONFIG_USER_LIBTIRPC], [
6 [AS_HELP_STRING([--with-tirpc],
7 [use tirpc for xdr encoding @<:@default=check@:>@])],
14 AS_IF([test "x$with_tirpc" != xno],
15 [AC_CHECK_LIB([tirpc], [xdrmem_create],
16 [AC_SUBST([LIBTIRPC], [-ltirpc])
17 AC_SUBST([LIBTIRPC_CFLAGS], [-I/usr/include/tirpc])
18 AC_DEFINE([HAVE_LIBTIRPC], [1], [Define if you have libtirpc])
20 [if test "x$with_tirpc" != xcheck; then
22 [--with-tirpc was given, but test for tirpc failed])
24 AC_SEARCH_LIBS([xdrmem_create], [tirpc], [], [
25 AC_MSG_FAILURE([xdrmem_create() requires tirpc or libc])])
27 [AC_SEARCH_LIBS([xdrmem_create], [tirpc], [], [
28 AC_MSG_FAILURE([xdrmem_create() requires libc])])