# 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)
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
# 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
#################################################