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

Revision 24068, 2.0 KB checked in by broder, 15 years ago (diff)
cd
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_ARG_ENABLE([nfs],
30        [AS_HELP_STRING([--enable-nfs], [support for kNFS lockers (deprecated)])])
31
32if 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
44fi
45
46AC_MSG_CHECKING(if struct dqblk refers to inodes or files)
47AC_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))
51AC_MSG_CHECKING(name of struct dqblk block time limit field)
52AC_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
57AC_MSG_CHECKING(for gqr_status in struct getquota_rslt)
58AC_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))
69AC_MSG_CHECKING(for gqr_rquota in struct getquota_rslt)
70AC_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
82ATHENA_UTIL_COM_ERR
83ATHENA_AFS_REQUIRED
84ATHENA_HESIOD_REQUIRED
85
86AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.