+AC_DEFUN([LB_ZFS_DEVEL], [
+ AC_ARG_WITH([zfs-devel],
+ [AS_HELP_STRING([--with-zfs-devel=PATH],
+ [Path to zfs development headers])],
+ [zfsdevel="$withval"])
+
+ AC_MSG_CHECKING([user provided zfs devel headers])
+ AS_IF([test ! -z "${zfsdevel}"], [
+ AS_IF([test -d "${zfsdevel}/usr/include/libspl" && test -d "${zfsdevel}/usr/include/libzfs"], [
+ zfslib="-I $zfsdevel/usr/include/libspl -I $zfsdevel/usr/include/libzfs"
+ ], [
+ AC_MSG_ERROR([Path to development headers directory does not exist])
+ ])
+ ])
+ AC_MSG_RESULT([$zfslib])
+])
+