69
AC_CHECK_HEADER(libintl.h, [
70
AC_SEARCH_LIBS(dgettext, intl, [
71
AC_DEFINE(ENABLE_NLS, 1,
72
[Define if translation functions should be used.])])])
74
AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt)
76
if test x"$MSGFMT" != x; then
77
AC_CHECK_HEADERS(syslog.h stdarg.h sys/select.h sys/sockio.h ifaddrs.h unistd.h)
82
AC_CHECK_HEADERS(syslog.h sys/sockio.h ifaddrs.h unistd.h fnmatch.h)
78
83
AC_CHECK_FUNCS(openlog syslog closelog strftime vsprintf vasprintf vsnprintf)
79
AC_CHECK_FUNCS(strlcpy)
84
AC_CHECK_FUNCS(strlcpy fnmatch)
80
86
EXTRA_SUPPORT_SYMS=
81
AC_CHECK_FUNC(strlcpy, [STRLCPY_ST_OBJ= STRLCPY_OBJ=], [STRLCPY_ST_OBJ=strlcpy.o STRLCPY_OBJ='$(OUTPRE)strlcpy.$(OBJEXT)' EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_strlcpy krb5int_strlcat"])
87
AC_CHECK_FUNC(strlcpy,
90
[STRLCPY_ST_OBJ=strlcpy.o
91
STRLCPY_OBJ='$(OUTPRE)strlcpy.$(OBJEXT)'
92
EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_strlcpy krb5int_strlcat"])
82
93
AC_SUBST(STRLCPY_OBJ)
83
94
AC_SUBST(STRLCPY_ST_OBJ)
96
AC_CHECK_FUNC(fnmatch,
99
[FNMATCH_ST_OBJ=fnmatch.o
100
FNMATCH_OBJ='$(OUTPRE)fnmatch.$(OBJEXT)'
101
EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_fnmatch"])
102
AC_SUBST(FNMATCH_OBJ)
103
AC_SUBST(FNMATCH_ST_OBJ)
84
105
AC_CHECK_FUNC(vasprintf,
161
180
if test "$CRYPTO_IMPL" = nss; then
165
183
AC_ARG_WITH([prng-alg],
166
AC_HELP_STRING([--with-prng-alg=ALG], [use specified PRNG algorithm. Ignored for nss. @<:@yarrow@:>@]),
184
AC_HELP_STRING([--with-prng-alg=ALG], [use specified PRNG algorithm. Ignored for nss. @<:@fortuna@:>@]),
167
185
[PRNG_ALG=$withval
168
186
AC_MSG_RESULT("k5crypto will use \'$withval\'")
171
189
AC_CONFIG_COMMANDS(PRNG_ALG, , PRNG_ALG=$PRNG_ALG)
172
190
AC_SUBST(PRNG_ALG)
173
if test "$withval" = fortuna; then
191
if test "$PRNG_ALG" = fortuna; then
174
192
AC_DEFINE(FORTUNA,1,[Define if Fortuna PRNG is selected])
177
AC_ARG_ENABLE([fortuna-test],
178
[ --enable-fortuna-test build to test Fortuna PRNG],,enableval=no)
179
if test "$enableval" = yes ; then
180
PRNG_FORTUNA_TEST="yes"
181
AC_DEFINE(TEST_FORTUNA,1,[Create a special build to test Fortuna PRNG])
182
AC_CONFIG_COMMANDS(PRNG_FORTUNA_TEST, , PRNG_FORTUNA_TEST=$PRNG_FORTUNA_TEST)
183
AC_SUBST(PRNG_FORTUNA_TEST)
195
# WITH_PKINIT_CRYPTO_IMPL
197
PKINIT_CRYPTO_IMPL="$CRYPTO_IMPL"
198
AC_ARG_WITH([pkinit-crypto-impl],
199
AC_HELP_STRING([--with-pkinit-crypto-impl=IMPL], [use specified pkinit crypto implementation @<:@openssl@:>@]),
200
[PKINIT_CRYPTO_IMPL=$withval
201
AC_MSG_RESULT("pkinit will use \'$withval\'")
202
], withval=$PKINIT_CRYPTO_IMPL)
205
AC_CHECK_LIB(crypto, PKCS7_get_signer_info, PKINIT_CRYPTO_IMPL_LIBS=-lcrypto)
206
PKINIT_CRYPTO_IMPL=openssl
209
if test "${PKINIT_CRYPTO_IMPL_CFLAGS+set}" != set; then
210
PKINIT_CRYPTO_IMPL_CFLAGS=`pkg-config --cflags nss`
212
if test "${PKINIT_CRYPTO_IMPL_LIBS+set}" != set; then
213
PKINIT_CRYPTO_IMPL_LIBS=`pkg-config --libs nss`
215
AC_DEFINE(PKINIT_CRYPTO_IMPL_NSS,1,[Define if pkinit crypto implementation is NSS])
217
CFLAGS="$CFLAGS $PKINIT_CRYPTO_IMPL_CFLAGS"
218
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
220
#if NSS_VMAJOR < 3 || (NSS_VMAJOR == 3 && NSS_VMINOR < 12)
222
#elif NSS_VMAJOR == 3 && NSS_VMINOR == 12 && NSS_VPATCH < 11
225
])], [], [AC_MSG_ERROR([NSS version 3.12.11 or later required.])])
229
AC_MSG_ERROR([Unknown crypto implementation $withval])
232
AC_CONFIG_COMMANDS(PKINIT_CRYPTO_IMPL,,PKINIT_CRYPTO_IMPL=$PKINIT_CRYPTO_IMPL)
233
AC_SUBST(PKINIT_CRYPTO_IMPL)
234
AC_SUBST(PKINIT_CRYPTO_IMPL_CFLAGS)
235
AC_SUBST(PKINIT_CRYPTO_IMPL_LIBS)
186
237
# --with-kdc-kdb-update makes the KDC update the database with last request
187
238
# information and failure information.
224
273
EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_mkstemp"])
225
274
AC_SUBST(MKSTEMP_OBJ)
226
275
AC_SUBST(MKSTEMP_ST_OBJ)
277
AC_CHECK_FUNC(gettimeofday,
278
[GETTIMEOFDAY_ST_OBJ=
280
AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Have the gettimeofday function])
282
[GETTIMEOFDAY_ST_OBJ='gettimeofday.o'
283
GETTIMEOFDAY_OBJ='$(OUTPRE)gettimeofday.$(OBJEXT)'
284
EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_gettimeofday"])
285
AC_SUBST(GETTIMEOFDAY_OBJ)
286
AC_SUBST(GETTIMEOFDAY_ST_OBJ)
227
287
AC_SUBST(EXTRA_SUPPORT_SYMS)
230
289
DECLARE_SYS_ERRLIST
231
AC_CHECK_HEADERS(unistd.h paths.h regex.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h byteswap.h machine/endian.h machine/byte_order.h sys/bswap.h endian.h pwd.h arpa/inet.h alloca.h dlfcn.h limits.h pthread.h semaphore.h)
290
AC_CHECK_HEADERS(unistd.h paths.h regex.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h byteswap.h machine/endian.h machine/byte_order.h sys/bswap.h endian.h pwd.h arpa/inet.h alloca.h dlfcn.h limits.h)
232
291
AC_CHECK_HEADER(regexp.h, [], [],
233
292
[#define INIT char *sp = instring;
234
293
#define GETC() (*sp++)
948
1003
enable_pkinit=try)
949
1004
if test "$enable_pkinit" = yes || test "$enable_pkinit" = try; then
950
1005
AC_CACHE_CHECK(for a recent enough OpenSSL, k5_cv_openssl_version_okay,
951
[AC_COMPILE_IFELSE([#include <openssl/opensslv.h>
1006
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <openssl/opensslv.h>
952
1007
#if OPENSSL_VERSION_NUMBER < 0x00908000L
953
1008
# error openssl is too old, need 0.9.8
956
], k5_cv_openssl_version_okay=yes, k5_cv_openssl_version_okay=no)])
1011
])], k5_cv_openssl_version_okay=yes, k5_cv_openssl_version_okay=no)])
957
1012
old_LIBS="$LIBS"
958
1013
AC_CHECK_LIB(crypto, PKCS7_get_signer_info)
959
1014
LIBS="$old_LIBS"
1125
1173
AC_DEFINE(BROKEN_STREAMS_SOCKETS,1,[Define if socket can't be bound to 0.0.0.0])
1176
# Compile with libedit support in ss by default if available. Compile
1177
# with readline only if asked, to avoid a default GPL dependency.
1178
# Building with readline also breaks the dejagnu test suite.
1179
AC_ARG_WITH([libedit],
1180
AC_HELP_STRING([--without-libedit], [do not compile with libedit]),
1181
[], [with_libedit=default])
1182
AC_ARG_WITH([readline],
1183
AC_HELP_STRING([--with-readline], [compile with GNU Readline]),
1184
[], [with_readline=no])
1185
AC_MSG_CHECKING([for readline support])
1186
if test "x$with_readline" = xyes; then
1191
if test "x$with_libedit" != xno; then
1192
if rl_cflags=`pkg-config --cflags libedit 2>&1`; then
1193
RL_CFLAGS=$rl_cflags
1194
RL_LIBS=`pkg-config --libs libedit`
1195
AC_DEFINE([HAVE_LIBEDIT], 1, [Define if building with libedit.])
1196
AC_MSG_RESULT([using libedit])
1197
elif test "x$with_libedit" = yes; then
1198
# We were explicitly asked for libedit and couldn't find it.
1199
AC_MSG_ERROR([Could not detect libedit with pkg-config.])
1201
AC_MSG_RESULT([not using any])
1203
elif test "x$with_readline" = xyes; then
1204
AC_MSG_RESULT([using GNU Readline])
1205
AC_CHECK_LIB([readline], [main], :,
1206
AC_MSG_FAILURE([Cannot find readline library.]), [-lncurses])
1207
AC_DEFINE([HAVE_READLINE], 1, [Define if building with GNU Readline.])
1208
RL_LIBS='-lreadline -lhistory -lncurses'
1210
AC_MSG_RESULT([not using any])
1212
AC_SUBST([RL_CFLAGS])
1215
AC_ARG_WITH([system-verto],
1216
[AC_HELP_STRING([--with-system-verto], [always use system verto library])],
1217
[], [with_system_verto=default])
1219
VERTO_LIBS="-lverto-k5ev -lverto"
1221
if test "x$with_system_verto" != xno; then
1222
if verto_cflags=`pkg-config --cflags libverto 2>&1`; then
1223
VERTO_CFLAGS=$verto_cflags
1224
VERTO_LIBS=`pkg-config --libs libverto`
1227
AC_CHECK_LIB([verto], [verto_run], [VERTO_VERSION=sys],
1228
[if test "x$with_system_verto" = xyes; then
1229
AC_MSG_ERROR([cannot detect system libverto])
1233
if test "x$VERTO_VERSION" = xsys; then
1234
AC_MSG_NOTICE([Using system libverto])
1236
AC_MSG_RESULT([Using built-in libverto])
1237
AC_DEFINE([INTERNAL_VERTO],[1],[Define if using bundled libverto])
1239
AC_SUBST([VERTO_CFLAGS])
1240
AC_SUBST([VERTO_LIBS])
1241
AC_SUBST([VERTO_VERSION])
1128
1243
AC_CONFIG_FILES(krb5-config, [chmod +x krb5-config])
1129
1244
V5_AC_OUTPUT_MAKEFILE(.
1131
util util/support util/profile util/send-pr
1246
util util/support util/profile util/profile/testmod util/send-pr
1247
util/verto util/k5ev
1135
lib/crypto lib/crypto/krb lib/crypto/krb/crc32 lib/crypto/$CRYPTO_IMPL/des
1136
lib/crypto/krb/dk lib/crypto/$CRYPTO_IMPL/enc_provider
1137
lib/crypto/$CRYPTO_IMPL/hash_provider lib/crypto/krb/checksum
1138
lib/crypto/krb/prf lib/crypto/krb/rand2key
1139
lib/crypto/$CRYPTO_IMPL lib/crypto/$CRYPTO_IMPL/md4 lib/crypto/$CRYPTO_IMPL/md5
1140
lib/crypto/krb/old lib/crypto/krb/raw
1141
lib/crypto/$CRYPTO_IMPL/sha1
1142
lib/crypto/$CRYPTO_IMPL/sha2
1143
lib/crypto/krb/arcfour lib/crypto/krb/prng
1144
lib/crypto/krb/prng/$PRNG_ALG
1145
lib/crypto/$CRYPTO_IMPL/aes
1146
lib/crypto/$CRYPTO_IMPL/camellia lib/crypto/crypto_tests
1251
lib/crypto lib/crypto/krb lib/crypto/$CRYPTO_IMPL
1252
lib/crypto/$CRYPTO_IMPL/enc_provider
1253
lib/crypto/$CRYPTO_IMPL/hash_provider
1254
lib/crypto/$CRYPTO_IMPL/des
1255
lib/crypto/$CRYPTO_IMPL/md4 lib/crypto/$CRYPTO_IMPL/md5
1256
lib/crypto/$CRYPTO_IMPL/sha1 lib/crypto/$CRYPTO_IMPL/sha2
1257
lib/crypto/$CRYPTO_IMPL/aes lib/crypto/$CRYPTO_IMPL/camellia
1258
lib/crypto/crypto_tests
1148
1260
lib/krb5 lib/krb5/error_tables lib/krb5/asn.1 lib/krb5/ccache
1149
1261
dnl lib/krb5/ccache/ccapi