LINUX: hold vcache while dropping dcache refs
[openafs.git] / configure.ac
1 AC_PREREQ([2.60])
2 AC_INIT([OpenAFS],
3     m4_esyscmd([build-tools/git-version .]),
4     [openafs-bugs@openafs.org], [],
5     [http://www.openafs.org/])
6 AC_CONFIG_AUX_DIR([build-tools])
7 AC_CONFIG_MACRO_DIR([src/cf])
8 AC_CONFIG_SRCDIR([src/config/stds.h])
9 AM_INIT_AUTOMAKE([foreign])
10
11 AC_CONFIG_HEADER([src/config/afsconfig.h])
12 MACOS_VERSION=1.5.76
13 #LINUX_PKGREL=0.pre3
14 LINUX_PKGREL=1.1
15
16 AC_SUBST([MACOS_VERSION])
17
18 dnl If the user hasn't specified CFLAGS don't let configure pick -g -O2
19 AS_IF([test -z "$CFLAGS"], [CFLAGS=" "])
20
21 AC_USE_SYSTEM_EXTENSIONS
22
23 LT_INIT
24
25 AC_PROG_CC
26 AC_PROG_LIBTOOL
27
28 AC_PATH_PROGS([PATH_CPP], [cpp], [${CC-cc} -E], [$PATH:/lib:/usr/ccs/lib])
29 AC_SUBST([PATH_CPP])
30 OPENAFS_CONFIGURE_COMMON
31
32 dnl Probe for Kerberos.  We have a few platform-specific overrides due to
33 dnl weird Kerberos implementations and installation locations.
34 AS_CASE([$AFS_SYSNAME],
35     [*_obsd*],
36     [KRB5_CPPFLAGS="-I/usr/include/kerberosV"],
37
38     [ppc_darwin_70],
39     [KRB5_CPPFLAGS="-I/usr/include"
40      KRB5_LDFLAGS="-L/usr/lib -Wl,-search_paths_first"])
41 RRA_LIB_KRB5_OPTIONAL
42 AS_CASE([$AFS_SYSNAME],
43     [hp_ux*|*_hpux*],
44     [KRB5_LIBS="-l:libkrb5.sl -l:libcom_err.sl"])
45
46 dnl Check for the characteristics of whatever Kerberos we found, if we found
47 dnl one.
48 BUILD_KRB5=no
49 MAKE_KRB5="#"
50 AS_IF([test x"$KRB5_LIBS" != x],
51     [BUILD_KRB5=yes
52      MAKE_KRB5=
53      RRA_LIB_KRB5_SWITCH
54      AC_CHECK_FUNCS([add_error_table \
55         add_to_error_table \
56         encode_krb5_enc_tkt_part \
57         encode_krb5_ticket \
58         krb5_524_conv_principal \
59         krb5_allow_weak_crypto \
60         krb5_c_encrypt \
61         krb5_decode_ticket \
62         krb5_enctype_enable \
63         krb5_get_init_creds_opt_alloc \
64         krb5_get_prompt_types \
65         krb5_princ_size \
66         krb5_principal_get_comp_string])
67      AC_CHECK_FUNCS([krb5_524_convert_creds], [],
68         [AC_CHECK_FUNCS([krb524_convert_creds_kdc], [],
69             [AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
70                 [LIBS="-lkrb524 $LIBS"
71                  KRB5_LIBS="-lkrb524 $KRB5_LIBS"
72                  AC_CHECK_LIB([krb524], [krb5_524_conv_principal],
73                      [AC_DEFINE([HAVE_KRB5_524_CONV_PRINCIPAL], [1],
74                          [Define to 1 if you have the `krb5_524_conv_principal' function.])
75                  ])
76                  AC_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], [1],
77                      [Define to 1 if you have the `krb524_convert_creds_kdc' function.])
78             ])
79         ])
80      ])
81      AC_CHECK_HEADERS([kerberosIV/krb.h])
82      AC_CHECK_HEADERS([kerberosV/heim_err.h])
83      AC_CHECK_HEADERS([com_err.h et/com_err.h krb5/com_err.h])
84      AS_IF([test x"$ac_cv_header_com_err_h" != xyes \
85              && test x"$ac_cv_header_et_com_err_h" != xyes \
86              && test x"$ac_cv_header_krb5_com_err_h" != xyes],
87        [AC_MSG_ERROR([Cannot find a usable com_err.h])])
88      AC_CHECK_MEMBERS([krb5_creds.keyblock, krb5_creds.keyblock.enctype, krb5_creds.session,
89                        krb5_prompt.type], [], [], [#include <krb5.h>])
90 dnl If we have krb5_creds.session, we are using heimdal
91 dnl If we're using heimdal, aklog needs libasn1 for encode_EncTicketPart and a
92 dnl few other functions. But just aklog; not any of the other stuff that uses
93 dnl krb5.
94      AS_IF([test x"$ac_cv_member_krb5_creds_session" = xyes],
95            [AC_CHECK_LIB([asn1], [encode_EncTicketPart],
96                [AKLOG_KRB5_LIBS="-lasn1"])
97      ])
98      RRA_LIB_KRB5_RESTORE
99 ])
100 AC_SUBST([BUILD_KRB5])
101 AC_SUBST([MAKE_KRB5])
102 AC_SUBST([AKLOG_KRB5_LIBS])
103
104 dnl Probe for GSSAPI
105 RRA_LIB_GSSAPI
106 dnl Check for the characteristics of whatever GSSAPI we found, if we found one
107 BUILD_GSSAPI=no
108 AS_IF([test x"$GSSAPI_LIBS" != x],
109     [BUILD_GSSAPI=yes
110      RRA_LIB_GSSAPI_SWITCH
111      AC_CHECK_FUNCS([gss_pseudo_random \
112         krb5_gss_register_acceptor_identity \
113         gss_krb5_ccache_name \
114      ])
115 dnl We only need gssapi for rxgk (at this point).  rxgk requires pseudo_random.
116      AS_IF([test x"$ac_cv_func_gss_pseudo_random" != xyes],
117            [BUILD_GSSAPI=no])
118      RRA_LIB_GSSAPI_RESTORE
119 ])
120 AC_SUBST([BUILD_GSSAPI])
121
122 dnl Checks for summary
123 OPENAFS_SUMMARY_CHECK_NAMEI
124
125 AS_IF([test -d 'doc/man-pages'],
126     [MAN_MAKEFILE="doc/man-pages/Makefile doc/man-pages/install-man"],
127     [MAN_MAKEFILE=])
128 AS_IF([test -f 'doc/xml/AdminGuide/Makefile.in'],
129     [ADMINGUIDE_MAKEFILE="doc/xml/AdminGuide/Makefile"],
130     [ADMINGUIDE_MAKEFILE=])
131 AS_IF([test -f 'doc/xml/QuickStartUnix/Makefile.in'],
132     [QSUNIX_MAKEFILE="doc/xml/QuickStartUnix/Makefile"],
133     [QSUNIX_MAKEFILE=])
134 AS_IF([test -f 'doc/xml/UserGuide/Makefile.in'],
135     [USERGUIDE_MAKEFILE="doc/xml/UserGuide/Makefile"],
136     [USERGUIDE_MAKEFILE=])
137 AS_IF([test -f 'doc/xml/AdminRef/Makefile.in'],
138     [ADMINREF_MAKEFILE="doc/xml/AdminRef/Makefile"],
139     [ADMINREF_MAKEFILE=])
140 AS_IF([test -f 'doc/xml/mobi-fixup.xsl.in'],
141     [MOBI_FIXUP_XSL="doc/xml/mobi-fixup.xsl"],
142     [MOBI_FIXUP_XSL=])
143 AS_IF([test -f 'doc/doxygen/Doxyfile.in'],
144     [DOXYFILE="doc/doxygen/Doxyfile"],
145     [DOXYFILE=])
146
147 AC_OUTPUT([
148     Makefile
149     ${MAN_MAKEFILE}
150     ${ADMINGUIDE_MAKEFILE}
151     ${QSUNIX_MAKEFILE}
152     ${USERGUIDE_MAKEFILE}
153     ${ADMINREF_MAKEFILE}
154     ${MOBI_FIXUP_XSL}
155     ${DOXYFILE}
156     src/afs/Makefile
157     src/afsd/Makefile
158     src/afsmonitor/Makefile
159     src/afsweb/Makefile
160     src/aklog/Makefile
161     src/audit/Makefile
162     src/auth/Makefile
163     src/auth/test/Makefile
164     src/bozo/Makefile
165     src/bozo/test/Makefile
166     src/bu_utils/Makefile
167     src/bubasics/Makefile
168     src/bucoord/Makefile
169     src/budb/Makefile
170     src/tbudb/Makefile
171     src/butc/Makefile
172     src/butm/Makefile
173     src/cmd/Makefile
174     src/cmd/test/Makefile
175     src/comerr/Makefile
176     src/comerr/test/Makefile
177     src/config/Makefile
178     src/config/Makefile.config
179     src/config/Makefile.libtool
180     src/config/Makefile.lwp
181     src/config/Makefile.lwptool
182     src/config/Makefile.pthread
183     src/config/Makefile.version-CML
184     src/config/Makefile.version-NOCML
185     src/config/shlib-build
186     src/config/shlib-install
187     src/crypto/hcrypto/Makefile
188     src/crypto/rfc3961/Makefile
189     src/dir/Makefile
190     src/dir/test/Makefile
191     src/dviced/Makefile
192     src/dvolser/Makefile
193     src/export/Makefile
194     src/finale/Makefile
195     src/fsint/Makefile
196     src/fsprobe/Makefile
197     src/gtx/Makefile
198     src/JAVA/libjafs/Makefile
199     src/kauth/Makefile
200     src/kauth/test/Makefile
201     src/kopenafs/Makefile
202     src/libacl/Makefile
203     src/libacl/test/Makefile
204     src/libadmin/Makefile
205     src/libadmin/adminutil/Makefile
206     src/libadmin/bos/Makefile
207     src/libadmin/cfg/Makefile
208     src/libadmin/cfg/test/Makefile
209     src/libadmin/client/Makefile
210     src/libadmin/kas/Makefile
211     src/libadmin/pts/Makefile
212     src/libadmin/samples/Makefile
213     src/libadmin/test/Makefile
214     src/libadmin/vos/Makefile
215     src/libafs/Makefile.common
216     src/libafs/MakefileProto.${MKAFS_OSTYPE}
217     ${DARWIN_PLIST}
218     src/libafsauthent/Makefile
219     src/libafsrpc/Makefile
220     src/libuafs/Makefile.common
221     src/libuafs/MakefileProto.${MKAFS_OSTYPE}
222     src/log/Makefile
223     src/log/test/Makefile
224     src/lwp/Makefile
225     src/lwp/test/Makefile
226     src/opr/Makefile
227     src/packaging/MacOS/OpenAFS-debug.Description.plist
228     src/packaging/MacOS/OpenAFS-debug.Info.plist
229     src/packaging/MacOS/OpenAFS.Description.plist
230     src/packaging/MacOS/OpenAFS.Info.plist
231     src/packaging/MacOS/OpenAFS.info
232     src/packaging/MacOS/buildpkg.sh
233     src/pam/Makefile
234     src/platform/Makefile
235     src/platform/${MKAFS_OSTYPE}/Makefile
236     src/platform/DARWIN/growlagent/Makefile
237     src/procmgmt/Makefile
238     src/procmgmt/test/Makefile
239     src/ptserver/Makefile
240     src/tptserver/Makefile
241     src/roken/Makefile
242     src/rx/Makefile
243     src/rx/bulk.example/Makefile
244     src/rx/bulktest/Makefile
245     src/rx/multi.example/Makefile
246     src/rx/simple.example/Makefile
247     src/rx/test/Makefile
248     src/rxdebug/Makefile
249     src/rxgen/Makefile
250     src/rxgk/Makefile
251     src/rxkad/Makefile
252     src/rxkad/test/Makefile
253     src/rxosd/Makefile
254     src/rxstat/Makefile
255     src/scout/Makefile
256     src/sys/Makefile
257     src/tbutc/Makefile
258     src/tests/Makefile
259     src/tests/run-tests
260     src/tools/Makefile
261     src/tools/dumpscan/Makefile
262     src/tools/rxperf/Makefile
263     src/tsalvaged/Makefile
264     src/tsm41/Makefile
265     src/tvolser/Makefile
266     src/ubik/Makefile
267     src/tubik/Makefile
268     src/update/Makefile
269     src/usd/Makefile
270     src/usd/test/Makefile
271     src/uss/Makefile
272     src/util/Makefile
273     src/util/test/Makefile
274     src/libafscp/Makefile
275     src/venus/Makefile
276     src/venus/test/Makefile
277     src/vfsck/Makefile
278     src/viced/Makefile
279     src/vlserver/Makefile
280     src/tvlserver/Makefile
281     src/vol/Makefile
282     src/vol/test/Makefile
283     src/volser/Makefile
284     src/xstat/Makefile
285     src/helper-splint.sh
286     tests/Makefile
287     tests/auth/Makefile
288     tests/cmd/Makefile
289     tests/common/Makefile
290     tests/opr/Makefile
291     tests/rpctestlib/Makefile
292     tests/rx/Makefile
293     tests/tap/Makefile
294     tests/util/Makefile
295     tests/volser/Makefile],
296 [chmod a+x src/config/shlib-build
297  chmod a+x src/config/shlib-install])
298
299 # print a final summary
300 OPENAFS_SUMMARY