mirror_zfs/config/user-libtirpc.m4
Rob Norris 85391ee931 build: add SPDX license tags to build system files
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #18077
2026-01-08 15:08:03 -08:00

32 lines
1.0 KiB
Plaintext

dnl # SPDX-License-Identifier: CDDL-1.0
dnl #
dnl # Check for libtirpc - may be needed for xdr functionality
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER_LIBTIRPC], [
AC_ARG_WITH([tirpc],
[AS_HELP_STRING([--with-tirpc],
[use tirpc for xdr encoding @<:@default=check@:>@])],
[],
[with_tirpc=check])
have_xdr=
AS_IF([test "x$with_tirpc" != "xyes"], [
AC_SEARCH_LIBS([xdrmem_create], [], [have_xdr=1], [
AS_IF([test "x$with_tirpc" = "xno"], [
AC_MSG_FAILURE([xdrmem_create() requires sunrpc support in libc if not using libtirpc])
])
])
])
AS_IF([test "x$have_xdr" = "x"], [
ZFS_AC_FIND_SYSTEM_LIBRARY(LIBTIRPC, [libtirpc], [rpc/xdr.h], [tirpc], [tirpc], [xdrmem_create], [], [
AS_IF([test "x$with_tirpc" = "xyes"], [
AC_MSG_FAILURE([--with-tirpc was given, but libtirpc is not available, try installing libtirpc-devel])
],[dnl ELSE
AC_MSG_FAILURE([neither libc sunrpc support nor libtirpc is available, try installing libtirpc-devel])
])
])
])
])