aklog: can't assume krb5_524_conv_principal based on convert_creds
[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.5.76
9 #LINUX_PKGREL=0.pre3
10 LINUX_PKGREL=1.1
11
12 dnl Debian wants the release candidate version in the main upstream version,
13 dnl and wants ~ before it.
14 DEB_PKGVER=m4_esyscmd([build-tools/git-version .])
15 if echo "$LINUX_PKGREL" | grep pre >/dev/null 2>/dev/null ; then
16     DEB_PKGVER="$DEB_PKGVER"`echo "$LINUX_PKGREL" | sed 's/0.pre/~rc/'`
17 fi
18
19 AC_SUBST(MACOS_VERSION)
20 AC_SUBST(DEB_PKGVER)
21
22 dnl If the user hasn't specified CFLAGS don't let configure pick -g -O2
23 AS_IF([test -z "$CFLAGS"], [CFLAGS=" "], [])
24
25 AC_USE_SYSTEM_EXTENSIONS
26
27 AC_PROG_CC
28
29 AC_PATH_PROGS([PATH_CPP], [cpp], [${CC-cc} -E], [$PATH:/lib:/usr/ccs/lib])
30 AC_SUBST([PATH_CPP])
31 OPENAFS_CONFIGURE_COMMON
32
33 dnl Probe for Kerberos.  We have a few platform-specific overrides due to
34 dnl weird Kerberos implementations and installation locations.
35 AS_CASE([$AFS_SYSNAME],
36     [*_obsd*],
37     [KRB5_CPPFLAGS="-I/usr/include/kerberosV"],
38
39     [ppc_darwin_70],
40     [KRB5_CPPFLAGS="-I/usr/include"
41      KRB5_LDFLAGS="-L/usr/lib -Wl,-search_paths_first"])
42 RRA_LIB_KRB5_OPTIONAL
43 AS_CASE([$AFS_SYSNAME],
44     [hp_ux*|*_hpux*],
45     [KRB5_LIBS="-l:libkrb5.sl -l:libcom_err.sl"])
46
47 dnl Check for the characteristics of whatever Kerberos we found, if we found
48 dnl one.
49 BUILD_KRB5=no
50 MAKE_KRB5="#"
51 AS_IF([test x"$KRB5_LIBS" != x],
52     [BUILD_KRB5=yes
53      MAKE_KRB5=
54      RRA_LIB_KRB5_SWITCH
55      AC_CHECK_FUNCS([add_error_table \
56         add_to_error_table \
57         encode_krb5_enc_tkt_part \
58         encode_krb5_ticket \
59         krb5_524_conv_principal \
60         krb5_allow_weak_crypto \
61         krb5_c_encrypt \
62         krb5_decode_ticket \
63         krb5_enctype_enable \
64         krb5_get_init_creds_opt_alloc \
65         krb5_get_prompt_types \
66         krb5_princ_size \
67         krb5_principal_get_comp_string])
68      AC_CHECK_FUNCS([krb5_524_convert_creds], ,
69          [AC_CHECK_FUNCS([krb524_convert_creds_kdc], ,
70              [AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
71                  [LIBS="-lkrb524 $LIBS"
72                   KRB5_LIBS="-lkrb524 $KRB5_LIBS"
73                   AC_CHECK_LIB([krb524], [krb5_524_conv_principal],
74                   [AC_DEFINE([HAVE_KRB5_524_CONV_PRINCIPAL], 1,
75                      [Define to 1 if you have the `krb5_524_conv_principal' function.])])
76                   AC_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], 1,
77                      [Define to 1 if you have the `krb524_convert_creds_kdc' function.])])])])
78      AC_CHECK_HEADERS([kerberosIV/krb.h])
79      AC_CHECK_HEADERS([kerberosV/heim_err.h])
80      AC_CHECK_MEMBERS([krb5_creds.keyblock, krb5_creds.keyblock.enctype, krb5_creds.session,
81                        krb5_prompt.type], , , [#include <krb5.h>])
82      RRA_LIB_KRB5_RESTORE])
83 AC_SUBST([BUILD_KRB5])
84 AC_SUBST([MAKE_KRB5])
85
86 dnl Probe for GSSAPI
87 RRA_LIB_GSSAPI
88
89 if test -d 'doc/man-pages' ; then
90     MAN_MAKEFILE="doc/man-pages/Makefile doc/man-pages/install-man"
91 else
92     MAN_MAKEFILE=
93 fi
94 if test -f 'doc/xml/AdminGuide/Makefile.in' ; then
95    ADMINGUIDE_MAKEFILE="doc/xml/AdminGuide/Makefile"
96 else
97    ADMINGUIDE_MAKEFILE=
98 fi
99 if test -f 'doc/xml/QuickStartUnix/Makefile.in' ; then
100    QSUNIX_MAKEFILE="doc/xml/QuickStartUnix/Makefile"
101 else
102    QSUNIX_MAKEFILE=
103 fi
104 if test -f 'doc/xml/UserGuide/Makefile.in' ; then
105    USERGUIDE_MAKEFILE="doc/xml/UserGuide/Makefile"
106 else
107    USERGUIDE_MAKEFILE=
108 fi
109 if test -f 'doc/xml/AdminRef/Makefile.in' ; then
110    ADMINREF_MAKEFILE="doc/xml/AdminRef/Makefile"
111 else
112    ADMINREF_MAKEFILE=
113 fi
114 if test -f 'doc/xml/mobi-fixup.xsl.in' ; then
115    MOBI_FIXUP_XSL="doc/xml/mobi-fixup.xsl"
116 else
117    MOBI_FIXUP_XSL=
118 fi
119
120 AC_OUTPUT(             \
121 Makefile               \
122 ${MAN_MAKEFILE} \
123 ${ADMINGUIDE_MAKEFILE} \
124 ${QSUNIX_MAKEFILE} \
125 ${USERGUIDE_MAKEFILE} \
126 ${ADMINREF_MAKEFILE} \
127 ${MOBI_FIXUP_XSL} \
128 src/afs/Makefile \
129 src/afsd/Makefile \
130 src/afsmonitor/Makefile \
131 src/afsweb/Makefile \
132 src/aklog/Makefile \
133 src/audit/Makefile \
134 src/auth/Makefile \
135 src/auth/test/Makefile \
136 src/bozo/Makefile \
137 src/bozo/test/Makefile \
138 src/bu_utils/Makefile \
139 src/bubasics/Makefile \
140 src/bucoord/Makefile \
141 src/budb/Makefile \
142 src/tbudb/Makefile \
143 src/butc/Makefile \
144 src/butm/Makefile \
145 src/cmd/Makefile \
146 src/cmd/test/Makefile \
147 src/comerr/Makefile \
148 src/comerr/test/Makefile \
149 src/config/Makefile \
150 src/config/Makefile.config \
151 src/config/Makefile.lwp \
152 src/config/Makefile.pthread \
153 src/config/Makefile.shared \
154 src/config/Makefile.version-CML \
155 src/config/Makefile.version-NOCML \
156 src/config/shlib-build \
157 src/config/shlib-install \
158 src/crypto/hcrypto/Makefile \
159 src/crypto/rfc3961/Makefile \
160 src/dir/Makefile \
161 src/dir/test/Makefile \
162 src/dviced/Makefile \
163 src/dvolser/Makefile \
164 src/export/Makefile \
165 src/finale/Makefile \
166 src/fsint/Makefile \
167 src/fsprobe/Makefile \
168 src/gtx/Makefile \
169 src/JAVA/libjafs/Makefile \
170 src/kauth/Makefile \
171 src/kauth/test/Makefile \
172 src/kopenafs/Makefile \
173 src/libacl/Makefile \
174 src/libacl/test/Makefile \
175 src/libadmin/Makefile \
176 src/libadmin/adminutil/Makefile \
177 src/libadmin/bos/Makefile \
178 src/libadmin/cfg/Makefile \
179 src/libadmin/cfg/test/Makefile \
180 src/libadmin/client/Makefile \
181 src/libadmin/kas/Makefile \
182 src/libadmin/pts/Makefile \
183 src/libadmin/samples/Makefile \
184 src/libadmin/test/Makefile \
185 src/libadmin/vos/Makefile \
186 src/libafs/Makefile.common \
187 src/libafs/MakefileProto.${MKAFS_OSTYPE} \
188 ${DARWIN_PLIST} \
189 src/libafsauthent/Makefile \
190 src/libafsrpc/Makefile \
191 src/libuafs/Makefile.common \
192 src/libuafs/MakefileProto.${MKAFS_OSTYPE} \
193 src/log/Makefile \
194 src/log/test/Makefile \
195 src/lwp/Makefile \
196 src/lwp/test/Makefile \
197 src/opr/Makefile \
198 src/packaging/Debian/changelog \
199 src/packaging/MacOS/OpenAFS-debug.Description.plist \
200 src/packaging/MacOS/OpenAFS-debug.Info.plist \
201 src/packaging/MacOS/OpenAFS.Description.plist \
202 src/packaging/MacOS/OpenAFS.Info.plist \
203 src/packaging/MacOS/OpenAFS.info \
204 src/packaging/MacOS/buildpkg.sh \
205 src/pam/Makefile \
206 src/platform/Makefile \
207 src/platform/${MKAFS_OSTYPE}/Makefile \
208 src/platform/DARWIN/growlagent/Makefile \
209 src/procmgmt/Makefile \
210 src/procmgmt/test/Makefile \
211 src/ptserver/Makefile \
212 src/tptserver/Makefile \
213 src/roken/Makefile \
214 src/rx/Makefile \
215 src/rx/bulk.example/Makefile \
216 src/rx/bulktest/Makefile \
217 src/rx/multi.example/Makefile \
218 src/rx/simple.example/Makefile \
219 src/rx/test/Makefile \
220 src/rxdebug/Makefile \
221 src/rxgen/Makefile \
222 src/rxkad/Makefile \
223 src/rxkad/test/Makefile \
224 src/rxosd/Makefile \
225 src/rxstat/Makefile \
226 src/scout/Makefile \
227 src/sgistuff/Makefile \
228 src/shlibafsauthent/Makefile \
229 src/shlibafsrpc/Makefile \
230 src/sys/Makefile \
231 src/tbutc/Makefile \
232 src/tests/Makefile \
233 src/tests/run-tests \
234 src/tools/Makefile \
235 src/tools/dumpscan/Makefile \
236 src/tools/rxperf/Makefile \
237 src/tsalvaged/Makefile \
238 src/tsm41/Makefile \
239 src/tvolser/Makefile \
240 src/ubik/Makefile \
241 src/tubik/Makefile \
242 src/update/Makefile \
243 src/usd/Makefile \
244 src/usd/test/Makefile \
245 src/uss/Makefile \
246 src/util/Makefile \
247 src/util/test/Makefile \
248 src/libafscp/Makefile \
249 src/venus/Makefile \
250 src/venus/test/Makefile \
251 src/vfsck/Makefile \
252 src/viced/Makefile \
253 src/vlserver/Makefile \
254 src/tvlserver/Makefile \
255 src/vol/Makefile \
256 src/vol/test/Makefile \
257 src/volser/Makefile \
258 src/xstat/Makefile \
259 src/helper-splint.sh \
260 tests/Makefile \
261 tests/auth/Makefile \
262 tests/cmd/Makefile \
263 tests/common/Makefile \
264 tests/opr/Makefile \
265 tests/rpctestlib/Makefile \
266 tests/rx/Makefile \
267 tests/tap/Makefile \
268 tests/util/Makefile \
269 tests/volser/Makefile,
270
271 [chmod a+x src/config/shlib-build
272  chmod a+x src/config/shlib-install])
273
274 # print a final summary
275 SUMMARY