]> git.proxmox.com Git - mirror_zfs.git/blame - config/user-libtirpc.m4
Fix zfs-mount-generator for datasets with spaces
[mirror_zfs.git] / config / user-libtirpc.m4
CommitLineData
1ab3678b
BB
1dnl #
2dnl # Check for libtirpc - may be needed for xdr functionality
3dnl #
4AC_DEFUN([ZFS_AC_CONFIG_USER_LIBTIRPC], [
5 AC_ARG_WITH([tirpc],
6 [AS_HELP_STRING([--with-tirpc],
762f9ef3 7 [use tirpc for xdr encoding @<:@default=check@:>@])],
1ab3678b
BB
8 [],
9 [with_tirpc=check])
10
762f9ef3 11 have_xdr=
1ab3678b 12
762f9ef3
RK
13 AS_IF([test "x$with_tirpc" != "xyes"], [
14 AC_SEARCH_LIBS([xdrmem_create], [], [have_xdr=1], [
15 AS_IF([test "x$with_tirpc" = "xno"], [
16 AC_MSG_FAILURE([xdrmem_create() requires sunrpc support in libc if not using libtirpc])
17 ])
1ab3678b 18 ])
762f9ef3
RK
19 ])
20
21 AS_IF([test "x$have_xdr" = "x"], [
22 FIND_SYSTEM_LIBRARY(LIBTIRPC, [libtirpc], [rpc/xdr.h], [tirpc], [tirpc], [xdrmem_create], [], [
23 AS_IF([test "x$with_tirpc" = "xyes"], [
24 AC_MSG_FAILURE([--with-tirpc was given, but libtirpc is not available, try installing libtirpc-devel])
25 ],[dnl ELSE
26 AC_MSG_FAILURE([neither libc sunrpc support nor libtirpc is available, try installing libtirpc-devel])
27 ])
28 ])
29 ])
1ab3678b 30])