X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=macros%2Fquota-check.m4;h=b13ced7751d5425008f3e6c4f173209c3a7c773a;hb=b90fa4a9a05047767a40da2634f1b9440484876f;hp=aaee1a78c15f47205c434757a7821e1b5b801e83;hpb=be99aa7128914416433bd9c25aa2a2b8102f495f;p=netatalk.git diff --git a/macros/quota-check.m4 b/macros/quota-check.m4 index aaee1a78..b13ced77 100644 --- a/macros/quota-check.m4 +++ b/macros/quota-check.m4 @@ -1,10 +1,35 @@ -dnl $Id: quota-check.m4,v 1.1 2001-12-01 15:25:54 srittau Exp $ +dnl $Id: quota-check.m4,v 1.4 2003-12-28 13:42:06 srittau Exp $ dnl Autoconf macro to check for quota support -dnl FIXME: This is in now way complete. +dnl FIXME: This is in no way complete. AC_DEFUN([AC_CHECK_QUOTA], [ + AC_CHECK_HEADERS(sys/quota.h ufs/quota.h) + QUOTA_LIBS= AC_CHECK_LIB(rpcsvc, main, [QUOTA_LIBS=-lrpcsvc]) AC_SUBST(QUOTA_LIBS) -]) + dnl ----- Linux 2.6 changed the quota interface + ac_have_struct_if_dqblk=no + AC_MSG_CHECKING([for struct if_dqblk]) + AC_COMPILE_IFELSE([ +#include +#include +#include + +int main() { + struct if_dqblk foo; + + return 0; +} + ], [ + ac_have_struct_if_dqblk=yes + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + if test "x$ac_have_struct_if_dqblk" = "xyes"; then + AC_DEFINE(HAVE_STRUCT_IF_DQBLK, 1, [set if struct if_dqblk exists]) + fi +])