Fix the creation of the dumpdir directory in stress_floppy Makefile
[ltp-debian.git] / m4 / ltp-quota.m4
blob8f99535ccda4567457fd46a5fc357786250289a3
1 dnl
2 dnl Copyright (c) Cisco Systems, Inc, 2008
3 dnl
4 dnl This program is free software;  you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
8 dnl
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
12 dnl the GNU General Public License for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program;  if not, write to the Free Software
16 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 dnl
19 dnl
20 dnl LTP_CHECK_SYSCALL_QUOTACTL
21 dnl ----------------------------
22 dnl
23 AC_DEFUN([LTP_CHECK_SYSCALL_QUOTACTL],
24 dnl Backstory: this autoconf test is bogus because it (and the quotactl test)
25 dnl uses Q_GETINFO which only exists in the quota 2.x code. Thus, it's
26 dnl commented out now until a proper 2.4.x test can be written, if necessary...
27 dnl[AC_TRY_COMPILE([
28 dnl #include <linux/quota.h>
29 dnl #include <unistd.h>],[
30 dnl int main(void) {
31 dnl     return quotactl(Q_GETINFO, (const char *)NULL, geteuid(), (caddr_t)NULL);
32 dnl}],[has_24_quotactl="yes"],
33 [AC_TRY_COMPILE([
34 #define _LINUX_QUOTA_VERSION 2
35 #include <sys/types.h>
36 #include <sys/quota.h>
37 #include <unistd.h>],[
38 int main(void) {
39         return quotactl(Q_GETINFO, (const char *)NULL, geteuid(), (caddr_t)NULL);
40 }],[has_quotav2="yes"],[AC_MSG_ERROR([Couldn't find functional copy of quota v2 - are you running 2.4.x?])])
41 dnl if test "x$has_24_quotactl" = "xyes"; then
42 dnl     AC_DEFINE(HAS_24_QUOTACTL,1,[Define to 1 if you have the 2.4.x version of quotactl, e.g. require linux/quota.h instead of sys/quota.h])
43 dnl elif test "x$has_new_26_quotactl" = "xyes"; then
44 if test "x$has_quotav2" = "xyes"; then
45         AC_DEFINE(HAS_QUOTAV2,1,[Define to 1 if you have quota v2 code, e.g. are running 2.6.x])