s3-configure: Only use sysquotas by default
authorAndrew Bartlett <abartlet@samba.org>
Sun, 2 Sep 2012 17:08:54 +0000 (03:08 +1000)
committerBjoern Jacke <bj@sernet.de>
Thu, 6 Sep 2012 07:08:57 +0000 (09:08 +0200)
We now only use old quota code if --with-quotas=yes and there is no
sysquotas support for this platform.

This also removes --with-sys-quotas as an option, instead being the
first choice if --with-quotas=yes or --with-quotas=auto

sysquotas have been our preferred quota mechanism since 2003.

Andrew Bartlett

Signed-off-by: Björn Jacke <bj@sernet.de>
source3/configure.in

index f1c791cfa36dd48a1b48a034a143cf612ee10791..c144e6fc82b5c6ca9e39d04a04c524b70ffe6d3b 100644 (file)
@@ -4516,10 +4516,6 @@ AC_ARG_WITH(syslog-facility,
 # check for experimental disk-quotas support
 
 samba_cv_WITH_QUOTAS=auto
-samba_cv_TRY_QUOTAS=no
-samba_cv_RUN_QUOTA_TESTS=auto
-samba_cv_WITH_SYS_QUOTAS=auto
-samba_cv_TRY_SYS_QUOTAS=auto
 samba_cv_SYSQUOTA_FOUND=no
 
 AC_MSG_CHECKING(whether to try disk-quotas support)
@@ -4529,78 +4525,25 @@ AC_ARG_WITH(quotas,
   yes)
     AC_MSG_RESULT(yes)
     samba_cv_WITH_QUOTAS=yes
-    samba_cv_TRY_QUOTAS=yes
-    samba_cv_RUN_QUOTA_TESTS=yes
-    #set sys quotas to auto in this case
-    samba_cv_TRY_SYS_QUOTAS=auto
     ;;
   auto)
     AC_MSG_RESULT(auto)
     samba_cv_WITH_QUOTAS=auto
-    samba_cv_TRY_QUOTAS=auto
-    samba_cv_RUN_QUOTA_TESTS=auto
-    #set sys quotas to auto in this case
-    samba_cv_TRY_SYS_QUOTAS=auto
     ;;
   no)
     AC_MSG_RESULT(no)
     samba_cv_WITH_QUOTAS=no
-    samba_cv_TRY_QUOTAS=no
-    samba_cv_RUN_QUOTA_TESTS=no
     ;;
   *)
-    AC_MSG_RESULT(${samba_cv_TRY_QUOTAS})
+    AC_MSG_RESULT(${samba_cv_WITH_QUOTAS})
     ;;
   esac ],
-  AC_MSG_RESULT(${samba_cv_TRY_QUOTAS})
+  AC_MSG_RESULT(${samba_cv_WITH_QUOTAS})
 )
 
-AC_MSG_CHECKING(whether to try the new lib/sysquotas.c interface)
-AC_ARG_WITH(sys-quotas,
-[AS_HELP_STRING([--with-sys-quotas], [Include lib/sysquotas.c support (default=auto)])],
-[ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    samba_cv_WITH_SYS_QUOTAS=yes
-    samba_cv_TRY_SYS_QUOTAS=yes
-    samba_cv_RUN_QUOTA_TESTS=yes
-    ;;
-  auto)
-    AC_MSG_RESULT(auto)
-    samba_cv_WITH_SYS_QUOTAS=auto
-    samba_cv_TRY_SYS_QUOTAS=auto
-    samba_cv_RUN_QUOTA_TESTS=auto
-    ;;
-  no)
-    AC_MSG_RESULT(no)
-    samba_cv_WITH_SYS_QUOTAS=no
-    samba_cv_TRY_SYS_QUOTAS=no
-    ;;
-  *)
-    AC_MSG_RESULT(${samba_cv_TRY_SYS_QUOTAS})
-    ;;
-  esac ],
-  AC_MSG_RESULT(${samba_cv_TRY_SYS_QUOTAS})
-)
-
-if test x"$samba_cv_TRY_SYS_QUOTAS" = x"auto"; then
-AC_MSG_CHECKING(whether to try the lib/sysquotas.c interface on ${host_os})
-  case "$host_os" in
-       *linux*)
-           AC_MSG_RESULT(yes)
-            samba_cv_TRY_SYS_QUOTAS=yes
-            samba_cv_RUN_QUOTA_TESTS=yes
-           ;;
-       *)
-           AC_MSG_RESULT(no)
-            samba_cv_TRY_SYS_QUOTAS=no
-           ;;
-  esac
-fi
-
 #############################################
 # only check for quota stuff if --with-quotas
-if test x"$samba_cv_RUN_QUOTA_TESTS" != x"no"; then
+if test x"$samba_cv_WITH_QUOTAS" != x"no"; then
 
 case "$host_os" in
        # on linux we didn't need to test we have builtin support
@@ -4744,53 +4687,27 @@ AC_CHECK_HEADERS(devnm.h)
 # check for devnm
 AC_CHECK_FUNCS(devnm)
 
-if test x"$samba_cv_WITH_SYS_QUOTAS" = x"yes"; then
-    if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then
-       # if --with-sys-quotas=yes then build it
-       # you have can use the get/set quota command smb.conf
-       # options then
-       samba_cv_SYSQUOTA_FOUND=auto
-    fi
-    if test x"$samba_cv_TRY_SYS_QUOTAS" != x"yes"; then
-       # if --with-sys-quotas=yes then build it
-       # you have can use the get/set quota command smb.conf
-       # options then
-       samba_cv_TRY_SYS_QUOTAS=auto
-    fi
-fi
-
-if test x"$samba_cv_SYSQUOTA_FOUND" != x"no"; then
 AC_MSG_CHECKING(whether to use the new lib/sysquotas.c interface)
-    if test x"$samba_cv_TRY_SYS_QUOTAS" != x"no"; then
+if test x"$samba_cv_SYSQUOTA_FOUND" = x"yes"; then
+       AC_MSG_RESULT(yes)
        AC_DEFINE(WITH_QUOTAS,1,[Whether to use disk quota support])
        AC_DEFINE(HAVE_SYS_QUOTAS,1,[Whether the new lib/sysquotas.c interface can be used])
-       samba_cv_WE_USE_SYS_QUOTAS=yes
+       if test x"$samba_cv_found_xfs_header" = x"yes"; then
+          AC_DEFINE(HAVE_XFS_QUOTAS,1,[Whether xfs quota support is available])
+       fi
+else
+    AC_MSG_RESULT(no)
+    AC_MSG_CHECKING(whether to use the old quota support)
+    if test x"$samba_cv_WITH_QUOTAS" = x"yes"; then
+        AC_DEFINE(WITH_QUOTAS,1,[Whether to use old quota support])
        AC_MSG_RESULT(yes)
     else
-        AC_MSG_RESULT(no)
-    fi
-fi
-
-if test x"$samba_cv_SYSQUOTA_FOUND" != x"no" -a x"$samba_cv_found_xfs_header" = x"yes"; then
-    if test x"$samba_cv_WE_USE_SYS_QUOTAS" = x"yes"; then
-       AC_DEFINE(HAVE_XFS_QUOTAS,1,[Whether xfs quota support is available])
-    fi
-fi
-
-AC_MSG_CHECKING(whether to use the old quota support)
-    if test x"$samba_cv_WE_USE_SYS_QUOTAS" != x"yes"; then
-      if test x"$samba_cv_TRY_QUOTAS" != x"no"; then
-        AC_DEFINE(WITH_QUOTAS,1,[Whether to use disk quota support])
-       AC_MSG_RESULT(yes)
-      else
        AC_MSG_RESULT(no)
-      fi
-    else
-      AC_MSG_RESULT(no)
     fi
+fi
 
 ####################
-# End of quota check samba_cv_RUN_QUOTA_TESTS
+# End of quota check samba_cv_WITH_QUOTAS
 fi
 
 #################################################