LC_CONFIG_PINGER
LC_CONFIG_CHECKSUM
LC_CONFIG_LIBLUSTRE_RECOVERY
- LC_CONFIG_QUOTA
LC_CONFIG_HEALTH_CHECK_WRITE
LC_CONFIG_LRU_RESIZE
LC_CONFIG_ADAPTIVE_TIMEOUTS
+ LC_QUOTA_MODULE
LC_TASK_PPTR
# RHEL4 patches
#
# LC_CONFIG_QUOTA
#
-# whether to enable quota support
+# whether to enable quota support global control
#
AC_DEFUN([LC_CONFIG_QUOTA],
-[AC_ARG_ENABLE([quota],
+[AC_ARG_ENABLE([quota],
AC_HELP_STRING([--enable-quota],
[enable quota support]),
- [],[enable_quota='default'])
-if test x$linux25 != xyes; then
- enable_quota='no'
+ [],[enable_quota='yes'])
+])
+
+# whether to enable quota support(kernel modules)
+AC_DEFUN([LC_QUOTA_MODULE],
+[if test x$enable_quota != xno; then
+ LB_LINUX_CONFIG([QUOTA],[
+ enable_quota_module='yes'
+ AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support])
+ ],[
+ enable_quota_module='no'
+ AC_MSG_WARN([quota is not enabled because the kernel - lacks quota support])
+ ])
fi
-LB_LINUX_CONFIG([QUOTA],[
- if test x$enable_quota = xdefault; then
- enable_quota='yes'
- fi
-],[
- if test x$enable_quota = xdefault; then
- enable_quota='no'
- AC_MSG_WARN([quota is not enabled because the kernel lacks quota support])
- else
- if test x$enable_quota = xyes; then
- AC_MSG_ERROR([cannot enable quota because the kernel lacks quota support])
- fi
- fi
])
+
+#
+# LC_CONFIG_QUOTA_LIBLUSTRE
+#
+# whether to enable quota support(liblustre)
+#
+AC_DEFUN([LC_CONFIG_QUOTA_LIBLUSTRE],
+[enable_quota_liblustre='no'
if test x$enable_quota != xno; then
+ AC_MSG_CHECKING([if compile liblustre with quota])
+ enable_quota_liblustre='yes'
AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support])
+ AC_DEFINE(HAVE_QUOTA_LIBLUSTRE_SUPPORT, 1, [Enable liblustre quota support])
+ AC_MSG_RESULT([yes])
fi
])
+AC_DEFUN([LC_QUOTA],
+[#check global
+LC_CONFIG_QUOTA
+LC_CONFIG_QUOTA_LIBLUSTRE
+#check for utils
+AC_CHECK_HEADER(sys/quota.h,
+ [AC_DEFINE(HAVE_SYS_QUOTA_H, 1, [Define to 1 if you have <sys/quota.h>.])],
+ [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
+])
+
AC_DEFUN([LC_QUOTA_READ],
[AC_MSG_CHECKING([if kernel supports quota_read])
LB_LINUX_TRY_COMPILE([
AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
-AM_CONDITIONAL(QUOTA, test x$enable_quota = xyes)
+AM_CONDITIONAL(QUOTA, test x$enable_quota_module = xyes -o x$enable_quota_liblustre = xyes)
AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)
AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)