source: trunk/athena/bin/quota/configure.in @ 13168

Revision 13168, 1.8 KB checked in by danw, 25 years ago (diff)
Add some more autoconfiscation to deal with the struct dqblk and rquota struct elements having different names on different OSes
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(quota.c)
3
4AC_PROG_CC
5AC_PROG_INSTALL
6
7AC_CANONICAL_HOST
8case $host_os in
9solaris*)
10        AC_DEFINE(SOLARIS)
11        ;;
12irix*)
13        AC_DEFINE(IRIX)
14        ;;
15netbsd*)
16        AC_DEFINE(NETBSD)
17        ;;
18linux*)
19        AC_DEFINE(LINUX)
20        ;;
21osf*)
22        AC_DEFINE(OSF)
23        ;;
24*)
25        AC_MSG_ERROR(Unknown operating system)
26        ;;
27esac
28
29AC_CHECK_HEADERS(rpc/clnt_soc.h)
30
31AC_CHECK_LIB(rpcsvc, xdr_getquota_rslt, :,
32        RQUOTA_OBJS=rquota_xdr.o RQUOTA_JUNK="rquota.x rquota_xdr.c rquota.h rquota_clnt.c rquota_svc.c")
33AC_SUBST(RQUOTA_OBJS)
34AC_SUBST(RQUOTA_JUNK)
35
36AC_MSG_CHECKING(if struct dqblk refers to inodes or files)
37AC_TRY_COMPILE([#include "quota.h"],[struct dqblk dqb; dqb.dqb_curinodes = 1; ],
38        [AC_MSG_RESULT(inodes)
39         AC_DEFINE(DQBLK_USES_INODES)],
40        AC_MSG_RESULT(files))
41AC_MSG_CHECKING(name of struct dqblk block time limit field)
42AC_TRY_COMPILE([#include "quota.h"],[struct dqblk dqb; dqb.dqb_btime = 1; ],
43        [AC_MSG_RESULT(dqb_btime)
44         AC_DEFINE(DQBLK_USES_TIME)],
45        AC_MSG_RESULT(dqb_btimelimit))
46
47AC_MSG_CHECKING(for gqr_status in struct getquota_rslt)
48AC_TRY_COMPILE([
49#include <rpc/rpc.h>
50#ifdef HAVE_RPC_CLNT_SOC_H
51#include <rpc/clnt_soc.h>
52#endif
53#include <rpc/pmap_prot.h>
54#include <rpcsvc/rquota.h>
55], [struct getquota_rslt gqr; gqr.gqr_status = Q_OK;],
56        [AC_MSG_RESULT(yes)
57         AC_DEFINE(GQR_RQUOTA_USES_GQR_STATUS)],
58        AC_MSG_RESULT(no))
59AC_MSG_CHECKING(for gqr_rquota in struct getquota_rslt)
60AC_TRY_COMPILE([
61#include <rpc/rpc.h>
62#ifdef HAVE_RPC_CLNT_SOC_H
63#include <rpc/clnt_soc.h>
64#endif
65#include <rpc/pmap_prot.h>
66#include <rpcsvc/rquota.h>
67], [struct getquota_rslt gqr; gqr.gqr_rquota.rq_bsize = 1;],
68        [AC_MSG_RESULT(yes)
69         AC_DEFINE(GQR_RQUOTA_USES_GQR_RQUOTA)],
70        AC_MSG_RESULT(no))
71
72ATHENA_UTIL_COM_ERR
73ATHENA_AFS_REQUIRED
74ATHENA_KRB4_REQUIRED
75ATHENA_HESIOD_REQUIRED
76
77AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.