dnl #
AC_MSG_CHECKING([zfs devel headers])
AS_IF([test -z "${zfslib}"], [
- AS_IF([test -e $zfssrc/include/libzfs.h && test -e $zfssrc/lib/libspl/include], [
+ AS_IF([test -e "${zfssrc}/include/libzfs.h" && test -e "${zfssrc}/lib/libspl/include"], [
zfslib="-I $zfssrc/lib/libspl/include -I $zfssrc/include"
], [test -d /usr/include/libzfs && test -d /usr/include/libspl], [
zfslib="-I /usr/include/libspl -I /usr/include/libzfs"
AC_SUBST(ZFS_LIBZFS_INCLUDE)
])
-AC_DEFUN([LB_PATH_ZFS], [
+AC_DEFUN([LB_CONFIG_ZFS], [
AC_ARG_WITH([zfs],
[AS_HELP_STRING([--with-zfs=PATH], [Path to zfs source])],
[
zfssrc="$withval"
])
], [
- AS_IF([test x$enable_server = xyes &&
- test x$enable_dist = xno], [
+ AS_IF([test x$enable_server != xno], [
require_zfs=no
enable_zfs=yes
], [
])
])
+ AS_IF([test x$enable_zfs = xyes], [
+ AC_MSG_CHECKING([if zfs defines dsl_pool_config_enter/exit])
+ LB_LINUX_TRY_COMPILE([
+ #include <sys/dsl_pool.h>
+ ],[
+ dsl_pool_config_enter(NULL, FTAG);
+ ],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_DSL_POOL_CONFIG, 1,
+ [Have dsl_pool_config_enter/exit in ZFS])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+ ])
+
AM_CONDITIONAL(ZFS_ENABLED, test x$enable_zfs = xyes)
])