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