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