2 dnl # check if kernel provides definitions for given types
5 dnl _ZFS_AC_KERNEL_SRC_TYPE(type)
6 AC_DEFUN([_ZFS_AC_KERNEL_SRC_TYPE], [
7 ZFS_LINUX_TEST_SRC([type_$1], [
8 #include <linux/types.h>
10 const $1 __attribute__((unused)) x = ($1) 0;
14 dnl _ZFS_AC_KERNEL_TYPE(type)
15 AC_DEFUN([_ZFS_AC_KERNEL_TYPE], [
16 AC_MSG_CHECKING([whether kernel defines $1])
17 ZFS_LINUX_TEST_RESULT([type_$1], [
19 AC_DEFINE([HAVE_KERNEL_]m4_quote(m4_translit([$1], [a-z], [A-Z])),
20 1, [kernel defines $1])
26 dnl ZFS_AC_KERNEL_TYPES([types...])
27 AC_DEFUN([ZFS_AC_KERNEL_TYPES], [
28 AC_DEFUN([ZFS_AC_KERNEL_SRC_TYPES], [
29 m4_foreach_w([type], [$1], [
30 _ZFS_AC_KERNEL_SRC_TYPE(type)
33 AC_DEFUN([ZFS_AC_KERNEL_TYPES], [
34 m4_foreach_w([type], [$1], [
35 _ZFS_AC_KERNEL_TYPE(type)
40 ZFS_AC_KERNEL_TYPES([intptr_t])