2025-12-20 16:45:07 +11:00
|
|
|
dnl # SPDX-License-Identifier: CDDL-1.0
|
2016-04-26 17:24:41 -07:00
|
|
|
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],
|
2019-03-02 16:19:05 -08:00
|
|
|
[use tirpc for xdr encoding @<:@default=check@:>@])],
|
2016-04-26 17:24:41 -07:00
|
|
|
[],
|
|
|
|
|
[with_tirpc=check])
|
|
|
|
|
|
2019-03-02 16:19:05 -08:00
|
|
|
have_xdr=
|
2016-04-26 17:24:41 -07:00
|
|
|
|
2019-03-02 16:19:05 -08:00
|
|
|
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])
|
|
|
|
|
])
|
2016-04-26 17:24:41 -07:00
|
|
|
])
|
2019-03-02 16:19:05 -08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
AS_IF([test "x$have_xdr" = "x"], [
|
2020-07-09 16:31:41 -04:00
|
|
|
ZFS_AC_FIND_SYSTEM_LIBRARY(LIBTIRPC, [libtirpc], [rpc/xdr.h], [tirpc], [tirpc], [xdrmem_create], [], [
|
2019-03-02 16:19:05 -08:00
|
|
|
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])
|
|
|
|
|
])
|
|
|
|
|
])
|
|
|
|
|
])
|
2016-04-26 17:24:41 -07:00
|
|
|
])
|