b7545ff22be3ae8a105ef02595e659cf9eaecb1c
[openafs.git] / configure.in
1 AC_PREREQ([2.60])
2 AC_INIT(src/config/stds.h)
3 AM_INIT_AUTOMAKE(openafs,1.5.74.1)
4 AC_CONFIG_HEADER(src/config/afsconfig.h)
5 MACOS_VERSION=1.5.74f1
6 LINUX_PKGVER=1.5.74.1
7 #LINUX_PKGREL=0.pre3
8 LINUX_PKGREL=1.1
9
10 dnl Debian wants the release candidate version in the main upstream version,
11 dnl and wants ~ before it.
12 if echo "$LINUX_PKGREL" | grep pre >/dev/null 2>/dev/null ; then
13     DEB_PKGVER="$LINUX_PKGVER"`echo "$LINUX_PKGREL" | sed 's/0.pre/~rc/'`
14 else
15     DEB_PKGVER="$LINUX_PKGVER"
16 fi
17
18 AC_SUBST(MACOS_VERSION)
19 AC_SUBST(LINUX_PKGVER)
20 AC_SUBST(LINUX_PKGREL)
21 AC_SUBST(DEB_PKGVER)
22
23 AC_USE_SYSTEM_EXTENSIONS
24 AC_PROG_CC
25 AC_PATH_PROGS([PATH_CPP], [cpp], [${CC-cc} -E], [$PATH:/lib:/usr/ccs/lib])
26 AC_SUBST([PATH_CPP])
27 OPENAFS_CONFIGURE_COMMON
28
29 dnl Probe for Kerberos.  We have a few platform-specific overrides due to
30 dnl weird Kerberos implementations and installation locations.
31 AS_CASE([$AFS_SYSNAME],
32     [*_obsd*],
33     [KRB5_CPPFLAGS="-I/usr/include/kerberosV"],
34
35     [ppc_darwin_70],
36     [KRB5_CPPFLAGS="-I/usr/include"
37      KRB5_LDFLAGS="-L/usr/lib -Wl,-search_paths_first"])
38 RRA_LIB_KRB5_OPTIONAL
39 AS_CASE([$AFS_SYSNAME],
40     [hp_ux*|*_hpux*],
41     [KRB5_LIBS="-l:libkrb5.sl -l:libcom_err.sl"])
42
43 dnl Check for the characteristics of whatever Kerberos we found, if we found
44 dnl one.
45 BUILD_KRB5=no
46 MAKE_KRB5="#"
47 AS_IF([test x"$KRB5_LIBS" != x],
48     [BUILD_KRB5=yes
49      MAKE_KRB5=
50      RRA_LIB_KRB5_SWITCH
51      AC_CHECK_FUNCS([add_error_table \
52         add_to_error_table \
53         encode_krb5_enc_tkt_part \
54         encode_krb5_ticket \
55         krb5_allow_weak_crypto \
56         krb5_c_encrypt \
57         krb5_decode_ticket \
58         krb5_enctype_enable \
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_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], 1,
69                      [Define to 1 if you have the `krb524_convert_creds_kdc' function.])])])])
70      AC_CHECK_HEADERS([kerberosIV/krb.h])
71      AC_CHECK_HEADERS([kerberosV/heim_err.h])
72      AC_CHECK_MEMBERS([krb5_creds.keyblock, krb5_creds.session,
73                        krb5_prompt.type], , , [#include <krb5.h>])
74      RRA_LIB_KRB5_RESTORE])
75 AC_SUBST([BUILD_KRB5])
76 AC_SUBST([MAKE_KRB5])
77
78 if test -d 'doc/man-pages' ; then
79     MAN_MAKEFILE="doc/man-pages/Makefile doc/man-pages/install-man"
80 else
81     MAN_MAKEFILE=
82 fi
83 if test -f 'doc/xml/AdminGuide/Makefile.in' ; then
84    ADMINGUIDE_MAKEFILE="doc/xml/AdminGuide/Makefile"
85 else
86    ADMINGUIDE_MAKEFILE=
87 fi
88 if test -f 'doc/xml/QuickStartUnix/Makefile.in' ; then
89    QSUNIX_MAKEFILE="doc/xml/QuickStartUnix/Makefile"
90 else
91    QSUNIX_MAKEFILE=
92 fi
93 if test -f 'doc/xml/UserGuide/Makefile.in' ; then
94    USERGUIDE_MAKEFILE="doc/xml/UserGuide/Makefile"
95 else
96    USERGUIDE_MAKEFILE=
97 fi
98
99 AC_OUTPUT(             \
100 Makefile               \
101 ${MAN_MAKEFILE} \
102 ${ADMINGUIDE_MAKEFILE} \
103 ${QSUNIX_MAKEFILE} \
104 ${USERGUIDE_MAKEFILE} \
105 src/afs/Makefile \
106 src/afsd/Makefile \
107 src/afsmonitor/Makefile \
108 src/afsweb/Makefile \
109 src/aklog/Makefile \
110 src/audit/Makefile \
111 src/auth/Makefile \
112 src/auth/test/Makefile \
113 src/bozo/Makefile \
114 src/bozo/test/Makefile \
115 src/bu_utils/Makefile \
116 src/bubasics/Makefile \
117 src/bucoord/Makefile \
118 src/budb/Makefile \
119 src/tbudb/Makefile \
120 src/butc/Makefile \
121 src/butm/Makefile \
122 src/cmd/Makefile \
123 src/cmd/test/Makefile \
124 src/comerr/Makefile \
125 src/comerr/test/Makefile \
126 src/config/Makefile \
127 src/config/Makefile.config \
128 src/config/Makefile.version-CML \
129 src/config/Makefile.version-NOCML \
130 src/config/shlib-build \
131 src/config/shlib-install \
132 src/des/Makefile \
133 src/des/test/Makefile \
134 src/dir/Makefile \
135 src/dir/test/Makefile \
136 src/export/Makefile \
137 src/finale/Makefile \
138 src/fsint/Makefile \
139 src/fsprobe/Makefile \
140 src/gtx/Makefile \
141 src/JAVA/libjafs/Makefile \
142 src/kauth/Makefile \
143 src/kauth/test/Makefile \
144 src/kopenafs/Makefile \
145 src/libacl/Makefile \
146 src/libacl/test/Makefile \
147 src/libadmin/Makefile \
148 src/libadmin/adminutil/Makefile \
149 src/libadmin/bos/Makefile \
150 src/libadmin/cfg/Makefile \
151 src/libadmin/cfg/test/Makefile \
152 src/libadmin/client/Makefile \
153 src/libadmin/kas/Makefile \
154 src/libadmin/pts/Makefile \
155 src/libadmin/samples/Makefile \
156 src/libadmin/test/Makefile \
157 src/libadmin/vos/Makefile \
158 src/libafs/Makefile.common \
159 src/libafs/MakefileProto.${MKAFS_OSTYPE} \
160 ${DARWIN_PLIST} \
161 src/libafsauthent/Makefile \
162 src/libafsrpc/Makefile \
163 src/libuafs/Makefile.common \
164 src/libuafs/MakefileProto.${MKAFS_OSTYPE} \
165 src/log/Makefile \
166 src/log/test/Makefile \
167 src/lwp/Makefile \
168 src/lwp/test/Makefile \
169 src/packaging/Debian/changelog \
170 src/packaging/MacOS/OpenAFS-debug.Description.plist \
171 src/packaging/MacOS/OpenAFS-debug.Info.plist \
172 src/packaging/MacOS/OpenAFS.Description.plist \
173 src/packaging/MacOS/OpenAFS.Info.plist \
174 src/packaging/MacOS/OpenAFS.info \
175 src/packaging/MacOS/buildpkg.sh \
176 src/packaging/RedHat/openafs.spec \
177 src/pam/Makefile \
178 src/platform/Makefile \
179 src/platform/${MKAFS_OSTYPE}/Makefile \
180 src/platform/DARWIN/growlagent/Makefile \
181 src/procmgmt/Makefile \
182 src/procmgmt/test/Makefile \
183 src/ptserver/Makefile \
184 src/tptserver/Makefile \
185 src/rx/Makefile \
186 src/rx/bulk.example/Makefile \
187 src/rx/bulktest/Makefile \
188 src/rx/multi.example/Makefile \
189 src/rx/simple.example/Makefile \
190 src/rx/test/Makefile \
191 src/rxdebug/Makefile \
192 src/rxgen/Makefile \
193 src/rxkad/Makefile \
194 src/rxkad/test/Makefile \
195 src/rxstat/Makefile \
196 src/scout/Makefile \
197 src/sgistuff/Makefile \
198 src/shlibafsauthent/Makefile \
199 src/shlibafsrpc/Makefile \
200 src/sys/Makefile \
201 src/tbutc/Makefile \
202 src/tests/Makefile \
203 src/tests/run-tests \
204 src/tsalvaged/Makefile \
205 src/tsm41/Makefile \
206 src/tviced/Makefile \
207 src/tvolser/Makefile \
208 src/ubik/Makefile \
209 src/tubik/Makefile \
210 src/update/Makefile \
211 src/usd/Makefile \
212 src/usd/test/Makefile \
213 src/uss/Makefile \
214 src/util/Makefile \
215 src/util/test/Makefile \
216 src/venus/Makefile \
217 src/venus/test/Makefile \
218 src/vfsck/Makefile \
219 src/viced/Makefile \
220 src/vlserver/Makefile \
221 src/tvlserver/Makefile \
222 src/vol/Makefile \
223 src/vol/test/Makefile \
224 src/volser/Makefile \
225 src/xstat/Makefile \
226 src/helper-splint.sh \
227 tests/Makefile \
228 tests/tap/Makefile \
229 tests/util/Makefile,
230
231 [chmod a+x src/config/shlib-build
232  chmod a+x src/config/shlib-install])