Fix typo in kaserver appendix
[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_free_keytab_entry_contents \
64         krb5_free_unparsed_name \
65         krb5_get_init_creds_opt_alloc \
66         krb5_get_prompt_types \
67         krb5_princ_size \
68         krb5_principal_get_comp_string])
69      AC_CHECK_FUNCS([krb5_524_convert_creds], [],
70         [AC_CHECK_FUNCS([krb524_convert_creds_kdc], [],
71             [AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
72                 [LIBS="-lkrb524 $LIBS"
73                  KRB5_LIBS="-lkrb524 $KRB5_LIBS"
74                  AC_CHECK_LIB([krb524], [krb5_524_conv_principal],
75                      [AC_DEFINE([HAVE_KRB5_524_CONV_PRINCIPAL], [1],
76                          [Define to 1 if you have the `krb5_524_conv_principal' function.])
77                  ])
78                  AC_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], [1],
79                      [Define to 1 if you have the `krb524_convert_creds_kdc' function.])
80             ])
81         ])
82      ])
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, krb5_creds.session,
91                        krb5_prompt.type], [], [], [#include <krb5.h>])
92      AC_CHECK_MEMBERS([krb5_keytab_entry.key, krb5_keytab_entry.keyblock],
93                       [], [], [#include <krb5.h>])
94 dnl If we have krb5_creds.session, we are using heimdal
95 dnl If we're using heimdal, aklog needs libasn1 for encode_EncTicketPart and a
96 dnl few other functions. But just aklog; not any of the other stuff that uses
97 dnl krb5.
98      AS_IF([test x"$ac_cv_member_krb5_creds_session" = xyes],
99            [AC_CHECK_LIB([asn1], [encode_EncTicketPart],
100                [AKLOG_KRB5_LIBS="-lasn1"])
101      ])
102      RRA_LIB_KRB5_RESTORE
103 ])
104 AC_SUBST([BUILD_KRB5])
105 AC_SUBST([MAKE_KRB5])
106 AC_SUBST([AKLOG_KRB5_LIBS])
107
108 dnl Probe for GSSAPI
109 RRA_LIB_GSSAPI
110 dnl Check for the characteristics of whatever GSSAPI we found, if we found one
111 BUILD_GSSAPI=no
112 AS_IF([test x"$GSSAPI_LIBS" != x],
113     [BUILD_GSSAPI=yes
114      RRA_LIB_GSSAPI_SWITCH
115      AC_CHECK_FUNCS([gss_pseudo_random \
116         krb5_gss_register_acceptor_identity \
117         gss_krb5_ccache_name \
118      ])
119 dnl We only need gssapi for rxgk (at this point).  rxgk requires pseudo_random.
120      AS_IF([test x"$ac_cv_func_gss_pseudo_random" != xyes],
121            [BUILD_GSSAPI=no])
122      RRA_LIB_GSSAPI_RESTORE
123 ])
124 AC_SUBST([BUILD_GSSAPI])
125
126 dnl Checks for summary
127 OPENAFS_SUMMARY_CHECK_NAMEI
128
129 AS_IF([test -d 'doc/man-pages'],
130     [MAN_MAKEFILE="doc/man-pages/Makefile doc/man-pages/install-man"],
131     [MAN_MAKEFILE=])
132 AS_IF([test -f 'doc/xml/AdminGuide/Makefile.in'],
133     [ADMINGUIDE_MAKEFILE="doc/xml/AdminGuide/Makefile"],
134     [ADMINGUIDE_MAKEFILE=])
135 AS_IF([test -f 'doc/xml/QuickStartUnix/Makefile.in'],
136     [QSUNIX_MAKEFILE="doc/xml/QuickStartUnix/Makefile"],
137     [QSUNIX_MAKEFILE=])
138 AS_IF([test -f 'doc/xml/UserGuide/Makefile.in'],
139     [USERGUIDE_MAKEFILE="doc/xml/UserGuide/Makefile"],
140     [USERGUIDE_MAKEFILE=])
141 AS_IF([test -f 'doc/xml/AdminRef/Makefile.in'],
142     [ADMINREF_MAKEFILE="doc/xml/AdminRef/Makefile"],
143     [ADMINREF_MAKEFILE=])
144 AS_IF([test -f 'doc/xml/mobi-fixup.xsl.in'],
145     [MOBI_FIXUP_XSL="doc/xml/mobi-fixup.xsl"],
146     [MOBI_FIXUP_XSL=])
147 AS_IF([test -f 'doc/doxygen/Doxyfile.in'],
148     [DOXYFILE="doc/doxygen/Doxyfile"],
149     [DOXYFILE=])
150
151 AC_OUTPUT([
152     Makefile
153     ${MAN_MAKEFILE}
154     ${ADMINGUIDE_MAKEFILE}
155     ${QSUNIX_MAKEFILE}
156     ${USERGUIDE_MAKEFILE}
157     ${ADMINREF_MAKEFILE}
158     ${MOBI_FIXUP_XSL}
159     ${DOXYFILE}
160     src/afs/Makefile
161     src/afsd/Makefile
162     src/afsmonitor/Makefile
163     src/afsweb/Makefile
164     src/aklog/Makefile
165     src/audit/Makefile
166     src/auth/Makefile
167     src/auth/test/Makefile
168     src/bozo/Makefile
169     src/bozo/test/Makefile
170     src/bu_utils/Makefile
171     src/bubasics/Makefile
172     src/bucoord/Makefile
173     src/budb/Makefile
174     src/tbudb/Makefile
175     src/butc/Makefile
176     src/butm/Makefile
177     src/cmd/Makefile
178     src/cmd/test/Makefile
179     src/comerr/Makefile
180     src/comerr/test/Makefile
181     src/config/Makefile
182     src/config/Makefile.config
183     src/config/Makefile.libtool
184     src/config/Makefile.lwp
185     src/config/Makefile.lwptool
186     src/config/Makefile.pthread
187     src/config/Makefile.version-CML
188     src/config/Makefile.version-NOCML
189     src/config/shlib-build
190     src/config/shlib-install
191     src/crypto/hcrypto/Makefile
192     src/crypto/rfc3961/Makefile
193     src/dir/Makefile
194     src/dir/test/Makefile
195     src/dviced/Makefile
196     src/dvolser/Makefile
197     src/export/Makefile
198     src/finale/Makefile
199     src/fsint/Makefile
200     src/fsprobe/Makefile
201     src/gtx/Makefile
202     src/JAVA/libjafs/Makefile
203     src/kauth/Makefile
204     src/kauth/test/Makefile
205     src/kopenafs/Makefile
206     src/libacl/Makefile
207     src/libacl/test/Makefile
208     src/libadmin/Makefile
209     src/libadmin/adminutil/Makefile
210     src/libadmin/bos/Makefile
211     src/libadmin/cfg/Makefile
212     src/libadmin/cfg/test/Makefile
213     src/libadmin/client/Makefile
214     src/libadmin/kas/Makefile
215     src/libadmin/pts/Makefile
216     src/libadmin/samples/Makefile
217     src/libadmin/test/Makefile
218     src/libadmin/vos/Makefile
219     src/libafs/Makefile.common
220     src/libafs/MakefileProto.${MKAFS_OSTYPE}
221     ${DARWIN_PLIST}
222     src/libafsauthent/Makefile
223     src/libafsrpc/Makefile
224     src/libuafs/Makefile.common
225     src/libuafs/MakefileProto.${MKAFS_OSTYPE}
226     src/log/Makefile
227     src/log/test/Makefile
228     src/lwp/Makefile
229     src/lwp/test/Makefile
230     src/opr/Makefile
231     src/packaging/MacOS/OpenAFS-debug.Description.plist
232     src/packaging/MacOS/OpenAFS-debug.Info.plist
233     src/packaging/MacOS/OpenAFS.Description.plist
234     src/packaging/MacOS/OpenAFS.Info.plist
235     src/packaging/MacOS/OpenAFS.info
236     src/packaging/MacOS/buildpkg.sh
237     src/pam/Makefile
238     src/platform/Makefile
239     src/platform/${MKAFS_OSTYPE}/Makefile
240     src/platform/DARWIN/growlagent/Makefile
241     src/procmgmt/Makefile
242     src/procmgmt/test/Makefile
243     src/ptserver/Makefile
244     src/tptserver/Makefile
245     src/roken/Makefile
246     src/rx/Makefile
247     src/rx/bulk.example/Makefile
248     src/rx/bulktest/Makefile
249     src/rx/multi.example/Makefile
250     src/rx/simple.example/Makefile
251     src/rx/test/Makefile
252     src/rxdebug/Makefile
253     src/rxgen/Makefile
254     src/rxgk/Makefile
255     src/rxkad/Makefile
256     src/rxkad/test/Makefile
257     src/rxosd/Makefile
258     src/rxstat/Makefile
259     src/scout/Makefile
260     src/sys/Makefile
261     src/tbutc/Makefile
262     src/tests/Makefile
263     src/tests/run-tests
264     src/tools/Makefile
265     src/tools/dumpscan/Makefile
266     src/tools/rxperf/Makefile
267     src/tsalvaged/Makefile
268     src/tsm41/Makefile
269     src/tvolser/Makefile
270     src/ubik/Makefile
271     src/tubik/Makefile
272     src/update/Makefile
273     src/usd/Makefile
274     src/usd/test/Makefile
275     src/uss/Makefile
276     src/util/Makefile
277     src/util/test/Makefile
278     src/libafscp/Makefile
279     src/venus/Makefile
280     src/venus/test/Makefile
281     src/vfsck/Makefile
282     src/viced/Makefile
283     src/vlserver/Makefile
284     src/tvlserver/Makefile
285     src/vol/Makefile
286     src/vol/test/Makefile
287     src/volser/Makefile
288     src/xstat/Makefile
289     src/helper-splint.sh
290     tests/Makefile
291     tests/auth/Makefile
292     tests/cmd/Makefile
293     tests/common/Makefile
294     tests/opr/Makefile
295     tests/rpctestlib/Makefile
296     tests/rx/Makefile
297     tests/tap/Makefile
298     tests/util/Makefile
299     tests/volser/Makefile],
300 [chmod a+x src/config/shlib-build
301  chmod a+x src/config/shlib-install])
302
303 # print a final summary
304 OPENAFS_SUMMARY