From 2d9546548b09cf7c38a82f26da2f7d06596b0600 Mon Sep 17 00:00:00 2001
From: tianzy <tianzy>
Date: Thu, 13 Nov 2008 08:09:26 +0000
Subject: [PATCH] Branch b1_6 fix lquota.ko fails to install with
 --disable-liblustre used b=17620 i=johann i=brian

---
 lustre/autoMakefile.am         |  5 ++---
 lustre/autoconf/lustre-core.m4 | 17 -----------------
 lustre/liblustre/Makefile.am   |  2 +-
 lustre/liblustre/lutil.c       |  2 --
 4 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/lustre/autoMakefile.am b/lustre/autoMakefile.am
index 8db3ee06e6..13d576c981 100644
--- a/lustre/autoMakefile.am
+++ b/lustre/autoMakefile.am
@@ -58,11 +58,10 @@ if CLIENT
 SUBDIRS += $(CLIENT_SUBDIRS)
 endif
 
+SUBDIRS += $(QUOTA_SUBDIRS)
+
 # this needs to be after the client subdirs
 if LIBLUSTRE
-if QUOTA_LIBLUSTRE
-SUBDIRS += $(QUOTA_SUBDIRS)
-endif
 if !CLIENT
 SUBDIRS += $(CLIENT_SUBDIRS)
 endif
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
index 3815547e1a..3aaf8a3ffa 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -1535,25 +1535,9 @@ AC_DEFUN([LC_QUOTA_MODULE],
 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_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>.])],
@@ -1757,7 +1741,6 @@ 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_module = xyes)
-AM_CONDITIONAL(QUOTA_LIBLUSTRE, test 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)
diff --git a/lustre/liblustre/Makefile.am b/lustre/liblustre/Makefile.am
index 2a0f0e93b9..bfe9644cbc 100644
--- a/lustre/liblustre/Makefile.am
+++ b/lustre/liblustre/Makefile.am
@@ -19,7 +19,7 @@ LUSTRE_LIBS = libllite.a \
               $(top_builddir)/lustre/obdclass/liblustreclass.a \
               $(top_builddir)/lustre/lvfs/liblvfs.a
 
-if QUOTA_LIBLUSTRE
+if LIBLUSTRE
 QUOTA_LIBS = $(top_builddir)/lustre/quota/libquota.a
 endif
 
diff --git a/lustre/liblustre/lutil.c b/lustre/liblustre/lutil.c
index 7b0946c4d1..f907890b95 100644
--- a/lustre/liblustre/lutil.c
+++ b/lustre/liblustre/lutil.c
@@ -77,14 +77,12 @@ void *inter_module_get(char *arg)
                 return ldlm_namespace_cleanup;
         else if (!strcmp(arg, "ldlm_replay_locks"))
                 return ldlm_replay_locks;
-#ifdef HAVE_QUOTA_LIBLUSTRE_SUPPORT
         else if (!strcmp(arg, "osc_quota_interface"))
                 return &osc_quota_interface;
         else if (!strcmp(arg, "mdc_quota_interface"))
                 return &mdc_quota_interface;
         else if (!strcmp(arg, "lov_quota_interface"))
                 return &lov_quota_interface;
-#endif
         else
                 return NULL;
 }
-- 
GitLab