1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | AC_INIT(quota.c) |
---|
3 | |
---|
4 | AC_PROG_CC |
---|
5 | AC_PROG_INSTALL |
---|
6 | |
---|
7 | AC_CANONICAL_HOST |
---|
8 | case $host_os in |
---|
9 | solaris*) |
---|
10 | AC_DEFINE(SOLARIS) |
---|
11 | ;; |
---|
12 | irix*) |
---|
13 | AC_DEFINE(IRIX) |
---|
14 | ;; |
---|
15 | netbsd*) |
---|
16 | AC_DEFINE(NETBSD) |
---|
17 | ;; |
---|
18 | linux*) |
---|
19 | AC_DEFINE(LINUX) |
---|
20 | ;; |
---|
21 | osf*) |
---|
22 | AC_DEFINE(OSF) |
---|
23 | ;; |
---|
24 | *) |
---|
25 | AC_MSG_ERROR(Unknown operating system) |
---|
26 | ;; |
---|
27 | esac |
---|
28 | |
---|
29 | AC_ARG_ENABLE([nfs], |
---|
30 | [AS_HELP_STRING([--enable-nfs], [support for kNFS lockers (deprecated)])]) |
---|
31 | |
---|
32 | if test "$enable_nfs" = "yes"; then |
---|
33 | AC_DEFINE([ENABLE_NFS],[1],[Support for kNFS lockers (deprecated).]) |
---|
34 | |
---|
35 | AC_CHECK_HEADERS(rpc/clnt_soc.h) |
---|
36 | |
---|
37 | AC_CHECK_LIB(rpcsvc, xdr_getquota_rslt, :, |
---|
38 | RQUOTA_OBJS=rquota_xdr.o RQUOTA_JUNK="rquota.x rquota_xdr.c rquota.h rquota_clnt.c rquota_svc.c") |
---|
39 | AC_SUBST(RQUOTA_OBJS) |
---|
40 | AC_SUBST(RQUOTA_JUNK) |
---|
41 | |
---|
42 | ATHENA_KRB4 |
---|
43 | ATHENA_KRB4_REQUIRED |
---|
44 | fi |
---|
45 | |
---|
46 | AC_MSG_CHECKING(if struct dqblk refers to inodes or files) |
---|
47 | AC_TRY_COMPILE([#include "quota.h"],[struct dqblk dqb; dqb.dqb_curinodes = 1; ], |
---|
48 | [AC_MSG_RESULT(inodes) |
---|
49 | AC_DEFINE(DQBLK_USES_INODES)], |
---|
50 | AC_MSG_RESULT(files)) |
---|
51 | AC_MSG_CHECKING(name of struct dqblk block time limit field) |
---|
52 | AC_TRY_COMPILE([#include "quota.h"],[struct dqblk dqb; dqb.dqb_btime = 1; ], |
---|
53 | [AC_MSG_RESULT(dqb_btime) |
---|
54 | AC_DEFINE(DQBLK_USES_TIME)], |
---|
55 | AC_MSG_RESULT(dqb_btimelimit)) |
---|
56 | |
---|
57 | AC_MSG_CHECKING(for gqr_status in struct getquota_rslt) |
---|
58 | AC_TRY_COMPILE([ |
---|
59 | #include <rpc/rpc.h> |
---|
60 | #ifdef HAVE_RPC_CLNT_SOC_H |
---|
61 | #include <rpc/clnt_soc.h> |
---|
62 | #endif |
---|
63 | #include <rpc/pmap_prot.h> |
---|
64 | #include <rpcsvc/rquota.h> |
---|
65 | ], [struct getquota_rslt gqr; gqr.gqr_status = Q_OK;], |
---|
66 | [AC_MSG_RESULT(yes) |
---|
67 | AC_DEFINE(GQR_RQUOTA_USES_GQR_STATUS)], |
---|
68 | AC_MSG_RESULT(no)) |
---|
69 | AC_MSG_CHECKING(for gqr_rquota in struct getquota_rslt) |
---|
70 | AC_TRY_COMPILE([ |
---|
71 | #include <rpc/rpc.h> |
---|
72 | #ifdef HAVE_RPC_CLNT_SOC_H |
---|
73 | #include <rpc/clnt_soc.h> |
---|
74 | #endif |
---|
75 | #include <rpc/pmap_prot.h> |
---|
76 | #include <rpcsvc/rquota.h> |
---|
77 | ], [struct getquota_rslt gqr; gqr.gqr_rquota.rq_bsize = 1;], |
---|
78 | [AC_MSG_RESULT(yes) |
---|
79 | AC_DEFINE(GQR_RQUOTA_USES_GQR_RQUOTA)], |
---|
80 | AC_MSG_RESULT(no)) |
---|
81 | |
---|
82 | ATHENA_UTIL_COM_ERR |
---|
83 | ATHENA_AFS_REQUIRED |
---|
84 | ATHENA_HESIOD_REQUIRED |
---|
85 | |
---|
86 | AC_OUTPUT(Makefile) |
---|