From cce8e55393d21319b193d0407af2365660134265 Mon Sep 17 00:00:00 2001 From: anserper Date: Wed, 6 Aug 2008 09:33:37 +0000 Subject: [PATCH] Branch b1_8_gate b=16091 i=Johann Lombardi (johann) check if CONFIG_QUOTA is in sync with --enable-quota/--disable-quota --- lustre/autoconf/lustre-core.m4 | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index cb77937..5e04400 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1529,20 +1529,32 @@ fi # whether to enable quota support # AC_DEFUN([LC_CONFIG_QUOTA], -[AC_MSG_CHECKING([whether to enable quota support]) -AC_ARG_ENABLE([quota], +[AC_ARG_ENABLE([quota], AC_HELP_STRING([--enable-quota], [enable quota support]), - [],[enable_quota='yes']) -AC_MSG_RESULT([$enable_quota]) + [],[enable_quota='default']) if test x$linux25 != xyes; then - enable_quota='no' + enable_quota='no' 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 +]) if test x$enable_quota != xno; then - AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support]) + AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support]) fi ]) - + AC_DEFUN([LC_QUOTA_READ], [AC_MSG_CHECKING([if kernel supports quota_read]) LB_LINUX_TRY_COMPILE([ -- 1.8.3.1