File: user-libtirpc.m4

package info (click to toggle)
zfs-linux 2.3.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 71,496 kB
  • sloc: ansic: 392,648; sh: 67,208; asm: 47,693; python: 8,160; makefile: 5,100; perl: 839; sed: 41
file content (30 lines) | stat: -rw-r--r-- 990 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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])
		])
	    ])
	])
])