• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl SPDX-License-Identifier: GPL-2.0-or-later
2dnl Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
3dnl Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
4
5AC_DEFUN([LTP_CHECK_TIRPC], [
6	dnl libtirpc library and headers
7	PKG_CHECK_MODULES([LIBTIRPC], [libtirpc >= 0.2.4], [
8		have_libtirpc=yes
9	], [have_libtirpc=no])
10
11	dnl TI-RPC headers (in glibc, since 2.26 installed only when configured
12	dnl with --enable-obsolete-rpc)
13	dnl NOTE: To port tests for ntirpc would require use non-deprecated
14	dnl functions as it does not have the deprecated ones any more (e.g. use
15	dnl rpc_broadcast() instead of clnt_broadcast()), but glibc implementation
16	dnl does not have the new ones. We could either provide the deprecated
17	dnl functions (copy from libtirpc src/rpc_soc.c) or drop glibc tests.
18	AC_CHECK_FUNCS([xdr_char clnttcp_create], [have_rpc_glibc=yes])
19
20	if test "x$have_libtirpc" = "xyes" -o "x$have_rpc_glibc" = "xyes"; then
21		AC_SUBST(HAVE_RPC, 1)
22	fi
23])
24