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