dir: do not leak contents of deleted directory entries
[openafs.git] / configure.ac
1 AC_PREREQ([2.60])
2 AC_INIT([OpenAFS], m4_esyscmd([build-tools/git-version .]))
3 AC_CONFIG_AUX_DIR([build-tools])
4 AC_CONFIG_SRCDIR([src/config/stds.h])
5 AM_INIT_AUTOMAKE
6
7 AC_CONFIG_HEADER(src/config/afsconfig.h)
8 MACOS_VERSION=1.6.20
9 LINUX_PKGVER=1.6.20
10
11 dnl Debian wants the release candidate version in the main upstream version,
12 dnl and wants ~ before it.
13 DEB_PKGVER=m4_esyscmd([build-tools/git-version .])
14 if echo "$LINUX_PKGREL" | grep pre >/dev/null 2>/dev/null ; then
15     DEB_PKGVER="$DEB_PKGVER"`echo "$LINUX_PKGREL" | sed 's/0.pre/~rc/'`
16 fi
17
18 AC_SUBST(MACOS_VERSION)
19 AC_SUBST(DEB_PKGVER)
20
21 dnl If the user hasn't specified CFLAGS don't let configure pick -g -O2
22 AS_IF([test -z "$CFLAGS"], [CFLAGS=" "], [])
23
24 AC_USE_SYSTEM_EXTENSIONS
25
26 AC_PROG_CC
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      AC_DEFINE([USE_RXKAD_KEYTAB], 1,
54                [Define to 1 if krb5 libraries are available and rxkad can use keytabs])
55      RRA_LIB_KRB5_SWITCH
56      AC_CHECK_FUNCS([add_error_table \
57         add_to_error_table \
58         encode_krb5_enc_tkt_part \
59         encode_krb5_ticket \
60         krb5_524_conv_principal \
61         krb5_allow_weak_crypto \
62         krb5_c_decrypt \
63         krb5_c_encrypt \
64         krb5_crypto_init \
65         krb5_decode_ticket \
66         krb5_decrypt_tkt_part \
67         krb5_encrypt_tkt_part \
68         krb5_enctype_enable \
69         krb5_get_init_creds_opt_alloc \
70         krb5_get_prompt_types \
71         krb5_princ_size \
72         krb5_principal_get_comp_string])
73      AC_CHECK_FUNCS([krb5_524_convert_creds], ,
74          [AC_CHECK_FUNCS([krb524_convert_creds_kdc], ,
75              [AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
76                  [LIBS="-lkrb524 $LIBS"
77                   KRB5_LIBS="-lkrb524 $KRB5_LIBS"
78                   AC_CHECK_LIB([krb524], [krb5_524_conv_principal],
79                   [AC_DEFINE([HAVE_KRB5_524_CONV_PRINCIPAL], 1,
80                      [Define to 1 if you have the `krb5_524_conv_principal' function.])])
81                   AC_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], 1,
82                      [Define to 1 if you have the `krb524_convert_creds_kdc' function.])])])])
83      AC_CHECK_HEADERS([kerberosIV/krb.h])
84      AC_CHECK_HEADERS([kerberosV/heim_err.h])
85      AC_CHECK_HEADERS([com_err.h et/com_err.h krb5/com_err.h])
86      AS_IF([test x"$ac_cv_header_com_err_h" != xyes \
87              && test x"$ac_cv_header_et_com_err_h" != xyes \
88              && test x"$ac_cv_header_krb5_com_err_h" != xyes],
89        [AC_MSG_ERROR([Cannot find a usable com_err.h])])
90      AC_CHECK_MEMBERS([krb5_creds.keyblock, krb5_creds.keyblock.enctype,
91                        krb5_creds.session, krb5_keytab_entry.key,
92                        krb5_keytab_entry.keyblock, krb5_keyblock.enctype,
93                        krb5_keyblock.keytype, krb5_prompt.type], , ,
94                        [#include <krb5.h>])
95 dnl If we have krb5_creds.session, we are using heimdal
96 dnl If we're using heimdal, aklog needs libasn1 for encode_EncTicketPart and a
97 dnl few other functions. But just aklog; not any of the other stuff that uses
98 dnl krb5.
99      AS_IF([test x"$ac_cv_member_krb5_creds_session" = xyes],
100            [AC_CHECK_LIB([asn1], [encode_EncTicketPart],
101                         [AKLOG_KRB5_LIBS="-lasn1"])])
102      AC_CHECK_DECLS([krb5_free_keytab_entry_contents, krb5_kt_free_entry,
103                     KRB5_KU_TICKET], [], [], [#include <krb5.h>])
104      RRA_LIB_KRB5_RESTORE])
105 AC_SUBST([BUILD_KRB5])
106 AC_SUBST([MAKE_KRB5])
107 AC_SUBST([AKLOG_KRB5_LIBS])
108
109 if test -d 'doc/man-pages' ; then
110     MAN_MAKEFILE="doc/man-pages/Makefile doc/man-pages/install-man"
111 else
112     MAN_MAKEFILE=
113 fi
114 if test -f 'doc/xml/AdminGuide/Makefile.in' ; then
115    ADMINGUIDE_MAKEFILE="doc/xml/AdminGuide/Makefile"
116 else
117    ADMINGUIDE_MAKEFILE=
118 fi
119 if test -f 'doc/xml/QuickStartUnix/Makefile.in' ; then
120    QSUNIX_MAKEFILE="doc/xml/QuickStartUnix/Makefile"
121 else
122    QSUNIX_MAKEFILE=
123 fi
124 if test -f 'doc/xml/UserGuide/Makefile.in' ; then
125    USERGUIDE_MAKEFILE="doc/xml/UserGuide/Makefile"
126 else
127    USERGUIDE_MAKEFILE=
128 fi
129
130 AC_OUTPUT(             \
131 Makefile               \
132 ${MAN_MAKEFILE} \
133 ${ADMINGUIDE_MAKEFILE} \
134 ${QSUNIX_MAKEFILE} \
135 ${USERGUIDE_MAKEFILE} \
136 src/afs/Makefile \
137 src/afsd/Makefile \
138 src/afsmonitor/Makefile \
139 src/afsweb/Makefile \
140 src/aklog/Makefile \
141 src/audit/Makefile \
142 src/auth/Makefile \
143 src/auth/test/Makefile \
144 src/bozo/Makefile \
145 src/bozo/test/Makefile \
146 src/bu_utils/Makefile \
147 src/bubasics/Makefile \
148 src/bucoord/Makefile \
149 src/budb/Makefile \
150 src/tbudb/Makefile \
151 src/butc/Makefile \
152 src/butm/Makefile \
153 src/cmd/Makefile \
154 src/cmd/test/Makefile \
155 src/comerr/Makefile \
156 src/comerr/test/Makefile \
157 src/config/Makefile \
158 src/config/Makefile.config \
159 src/config/Makefile.version-CML \
160 src/config/Makefile.version-NOCML \
161 src/config/shlib-build \
162 src/config/shlib-install \
163 src/des/Makefile \
164 src/des/test/Makefile \
165 src/dir/Makefile \
166 src/dir/test/Makefile \
167 src/dviced/Makefile \
168 src/dvolser/Makefile \
169 src/export/Makefile \
170 src/finale/Makefile \
171 src/fsint/Makefile \
172 src/fsprobe/Makefile \
173 src/gtx/Makefile \
174 src/JAVA/libjafs/Makefile \
175 src/kauth/Makefile \
176 src/kauth/test/Makefile \
177 src/kopenafs/Makefile \
178 src/libacl/Makefile \
179 src/libacl/test/Makefile \
180 src/libadmin/Makefile \
181 src/libadmin/adminutil/Makefile \
182 src/libadmin/bos/Makefile \
183 src/libadmin/cfg/Makefile \
184 src/libadmin/cfg/test/Makefile \
185 src/libadmin/client/Makefile \
186 src/libadmin/kas/Makefile \
187 src/libadmin/pts/Makefile \
188 src/libadmin/samples/Makefile \
189 src/libadmin/test/Makefile \
190 src/libadmin/vos/Makefile \
191 src/libafs/Makefile.common \
192 src/libafs/MakefileProto.${MKAFS_OSTYPE} \
193 ${DARWIN_PLIST} \
194 src/libafsauthent/Makefile \
195 src/libafsrpc/Makefile \
196 src/libuafs/Makefile.common \
197 src/libuafs/MakefileProto.${MKAFS_OSTYPE} \
198 src/log/Makefile \
199 src/log/test/Makefile \
200 src/lwp/Makefile \
201 src/lwp/test/Makefile \
202 src/packaging/Debian/changelog \
203 src/packaging/MacOS/OpenAFS-debug.Description.plist \
204 src/packaging/MacOS/OpenAFS-debug.Info.plist \
205 src/packaging/MacOS/OpenAFS.Description.plist \
206 src/packaging/MacOS/OpenAFS.Info.plist \
207 src/packaging/MacOS/OpenAFS.info \
208 src/packaging/MacOS/buildpkg.sh \
209 src/packaging/MacOS/pkgbuild.sh \
210 src/pam/Makefile \
211 src/platform/Makefile \
212 src/platform/${MKAFS_OSTYPE}/Makefile \
213 src/platform/DARWIN/growlagent/Makefile \
214 src/procmgmt/Makefile \
215 src/procmgmt/test/Makefile \
216 src/ptserver/Makefile \
217 src/tptserver/Makefile \
218 src/rx/Makefile \
219 src/rx/bulk.example/Makefile \
220 src/rx/bulktest/Makefile \
221 src/rx/multi.example/Makefile \
222 src/rx/simple.example/Makefile \
223 src/rx/test/Makefile \
224 src/rxdebug/Makefile \
225 src/rxgen/Makefile \
226 src/rxkad/Makefile \
227 src/rxkad/test/Makefile \
228 src/rxstat/Makefile \
229 src/scout/Makefile \
230 src/sgistuff/Makefile \
231 src/shlibafsauthent/Makefile \
232 src/shlibafsrpc/Makefile \
233 src/sys/Makefile \
234 src/tbutc/Makefile \
235 src/tests/Makefile \
236 src/tests/run-tests \
237 src/tsalvaged/Makefile \
238 src/tsm41/Makefile \
239 src/tviced/Makefile \
240 src/tvolser/Makefile \
241 src/ubik/Makefile \
242 src/tubik/Makefile \
243 src/update/Makefile \
244 src/usd/Makefile \
245 src/usd/test/Makefile \
246 src/uss/Makefile \
247 src/util/Makefile \
248 src/util/test/Makefile \
249 src/libafscp/Makefile \
250 src/venus/Makefile \
251 src/venus/test/Makefile \
252 src/vfsck/Makefile \
253 src/viced/Makefile \
254 src/vlserver/Makefile \
255 src/tvlserver/Makefile \
256 src/vol/Makefile \
257 src/vol/test/Makefile \
258 src/volser/Makefile \
259 src/xstat/Makefile \
260 src/helper-splint.sh \
261 tests/Makefile \
262 tests/rpctestlib/Makefile \
263 tests/tap/Makefile \
264 tests/util/Makefile,
265
266 [chmod a+x src/config/shlib-build
267  chmod a+x src/config/shlib-install])
268
269 # print a final summary
270 SUMMARY