2 dnl # Check for ioctl()
4 AC_DEFUN([ZFS_AC_CONFIG_USER_IOCTL], [
5 AC_MSG_CHECKING(for ioctl())
6 AC_EGREP_HEADER(ioctl, unistd.h, is_unistd=yes, is_unistd=no)
7 AC_EGREP_HEADER(ioctl, sys/ioctl.h, is_sys_ioctl=yes, is_sys_ioctl=no)
8 AC_EGREP_HEADER(ioctl, stropts.h, is_stropts=yes, is_stropts=no)
10 if test $is_unistd = yes; then
12 AC_DEFINE([HAVE_IOCTL_IN_UNISTD_H], 1,
13 [Define to 1 if ioctl() defined in <unistd.h>])
16 if test $is_sys_ioctl = yes; then
18 AC_DEFINE([HAVE_IOCTL_IN_SYS_IOCTL_H], 1,
19 [Define to 1 if ioctl() defined in <sys/ioctl.h>])
20 elif test $is_stropts = yes; then
21 AC_DEFINE([HAVE_IOCTL_IN_STROPTS_H], 1,
23 [Define to 1 if ioctl() defined in <stropts.h>])
29 if test $result = no; then
31 AC_MSG_ERROR([*** Cannot locate ioctl() definition])