File: configure.in

package info (click to toggle)
krb5 1.12.1+dfsg-19+deb8u4
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 67,680 kB
  • ctags: 34,155
  • sloc: ansic: 309,213; cpp: 15,753; exp: 13,257; makefile: 7,652; python: 7,228; sh: 6,457; perl: 3,514; asm: 1,544; yacc: 1,187; awk: 396; xml: 368; csh: 147; lisp: 104; sed: 43
file content (1434 lines) | stat: -rw-r--r-- 46,461 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
K5_AC_INIT([aclocal.m4])

# If $runstatedir isn't set by autoconf (<2.70), set it manually.
if test x"$runstatedir" == x; then
  runstatedir=$localstatedir/run
fi
AC_SUBST(runstatedir)

# Don't make duplicate profile path entries for /etc/krb5.conf if
# $sysconfdir is /etc
if test "$sysconfdir" == /etc; then
  SYSCONFCONF=""
else
  SYSCONFCONF=":${sysconfdir}/krb5.conf"
fi
AC_SUBST(SYSCONFCONF)

CONFIG_RULES
KRB5_VERSION=K5_VERSION
AC_SUBST(KRB5_VERSION)


AC_REQUIRE_CPP

AC_CACHE_CHECK(if va_copy is available, krb5_cv_va_copy,
[AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <stdarg.h>
void f(va_list ap) {
  va_list ap2;
  va_copy(ap2, ap);
  va_end(ap2);
}
va_list x;
int main()
{
  f(x);
  return 0;
}])], krb5_cv_va_copy=yes, krb5_cv_va_copy=no)])
if test "$krb5_cv_va_copy" = yes; then
  AC_DEFINE(HAS_VA_COPY,1,[Define if va_copy macro or function is available.])
fi

# Note that this isn't checking if the copied value *works*, just
# whether the C language constraints permit the copying.  If
# va_list is defined as an array type, it can't be assigned.
AC_CACHE_CHECK(if va_list objects can be copied by assignment,
	       krb5_cv_va_simple_copy,
[AC_COMPILE_IFELSE([
AC_LANG_SOURCE([#include <stdarg.h>
void f(va_list va2) {
  va_list va1;
  va1 = va2;
}])], krb5_cv_va_simple_copy=yes, krb5_cv_va_simple_copy=no)])
if test "$krb5_cv_va_simple_copy" = yes; then
  AC_DEFINE(CAN_COPY_VA_LIST,1,[Define if va_list objects can be simply copied by assignment.])
fi

# The following lines are so that configure --help gives some global 
# configuration options.

KRB5_LIB_AUX
AC_KRB5_TCL
AC_ARG_ENABLE([athena],
[  --enable-athena         build with MIT Project Athena configuration],,)

# Begin autoconf tests for the Makefiles generated out of the top-level
# configure.in...

KRB5_BUILD_LIBOBJS
KRB5_BUILD_LIBRARY
KRB5_BUILD_PROGRAM
# for slave
AC_TYPE_MODE_T
AC_PROG_INSTALL
KRB5_AC_NEED_DAEMON
KRB5_GETSOCKNAME_ARGS
KRB5_GETPEERNAME_ARGS
LIBUTIL=
AC_CHECK_LIB(util,main,[AC_DEFINE(HAVE_LIBUTIL,1,[Define if the util library is available])
LIBUTIL=-lutil
])
AC_SUBST(LIBUTIL)

AC_CHECK_HEADER(libintl.h, [
	AC_SEARCH_LIBS(dgettext, intl, [
		AC_DEFINE(ENABLE_NLS, 1,
			[Define if translation functions should be used.])])])

AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt)
po=
if test x"$MSGFMT" != x; then
	po=po
fi
AC_SUBST(po)

# for kdc
AC_CHECK_HEADERS(syslog.h sys/sockio.h ifaddrs.h unistd.h fnmatch.h)
AC_CHECK_FUNCS(openlog syslog closelog strftime vsprintf vasprintf vsnprintf)
AC_CHECK_FUNCS(strlcpy fnmatch)

EXTRA_SUPPORT_SYMS=
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"])
AC_SUBST(STRLCPY_OBJ)
AC_SUBST(STRLCPY_ST_OBJ)

AC_CHECK_FUNC(fnmatch,
[FNMATCH_ST_OBJ=
FNMATCH_OBJ=],
[FNMATCH_ST_OBJ=fnmatch.o
FNMATCH_OBJ='$(OUTPRE)fnmatch.$(OBJEXT)'
EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_fnmatch"])
AC_SUBST(FNMATCH_OBJ)
AC_SUBST(FNMATCH_ST_OBJ)

AC_CHECK_FUNC(vasprintf,
[PRINTF_ST_OBJ=
PRINTF_OBJ=],
[PRINTF_ST_OBJ=printf.o
PRINTF_OBJ='$(OUTPRE)printf.$(OBJEXT)'
EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_asprintf krb5int_vasprintf"])
AC_SUBST(PRINTF_OBJ)
AC_SUBST(PRINTF_ST_OBJ)
KRB5_NEED_PROTO([#include <stdarg.h>
#include <stdio.h>
],vasprintf)
KRB5_NEED_PROTO([#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
/* Solaris 8 declares swab in stdlib.h.  */
#include <stdlib.h>
],swab,1)

AC_PROG_AWK
KRB5_AC_INET6
KRB5_SOCKADDR_SA_LEN
CHECK_SIGNALS

# --with-vague-errors disables useful error messages.

AC_ARG_WITH([vague-errors],
AC_HELP_STRING([--with-vague-errors],[Do not @<:@do@:>@ send helpful errors to client]), , withval=no)
if test "$withval" = yes; then
	AC_MSG_NOTICE(Supplying vague error messages to KDC clients)
	AC_DEFINE(KRBCONF_VAGUE_ERRORS,1,[Define if the KDC should return only vague error codes to clients])
fi

# Check which (if any) audit plugin to build
audit_plugin=""
AC_ARG_ENABLE([audit-plugin],
AC_HELP_STRING([--enable-audit-plugin=IMPL],
               [use audit plugin @<:@ do not use audit @:>@]), , enableval=no)
if test "$enableval" != no; then
    case "$enableval" in
    simple)
        # if audit_log_user_message is found, we assume
        # that audit_open and audit_close are also defined.
        AC_CHECK_LIB(audit, audit_log_user_message,
                     [AUDIT_IMPL_LIBS=-laudit
                     K5_GEN_MAKEFILE(plugins/audit/simple)
                     audit_plugin=plugins/audit/simple ],
                     AC_MSG_ERROR([libaudit not found or undefined symbol audit_log_user_message]))
        ;;
    *)
        AC_MSG_ERROR([Unknown audit plugin implementation $enableval.])
        ;;
    esac
fi
AC_SUBST(AUDIT_IMPL_LIBS)
AC_SUBST(audit_plugin)

# WITH_CRYPTO_IMPL

CRYPTO_IMPL="builtin"
AC_ARG_WITH([crypto-impl],
AC_HELP_STRING([--with-crypto-impl=IMPL], [use specified crypto implementation @<:@builtin@:>@]),
[CRYPTO_IMPL=$withval
AC_MSG_NOTICE(k5crypto will use '$withval')
], withval=builtin)
case "$withval" in
builtin)
  ;;
openssl)
  AC_CHECK_LIB(crypto, PKCS7_get_signer_info)
  ;;
nss)
  if test "${CRYPTO_IMPL_CFLAGS+set}" != set; then
    CRYPTO_IMPL_CFLAGS=`pkg-config --cflags nss`
  fi
  if test "${CRYPTO_IMPL_LIBS+set}" != set; then
    CRYPTO_IMPL_LIBS="-lnss3 $(pkg-config --libs nss-util)"
  fi
  AC_DEFINE(CRYPTO_IMPL_NSS,1,[Define if crypto implementation is NSS])
  save_CFLAGS=$CFLAGS
  CFLAGS="$CFLAGS $CRYPTO_IMPL_CFLAGS"
  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <nss.h>
#if NSS_VMAJOR < 3 || (NSS_VMAJOR == 3 && NSS_VMINOR < 13)
#error
#endif
  ])], [], [AC_MSG_ERROR([NSS version 3.13 or later required.])])
  CFLAGS=$save_CFLAGS
  ;;
*)
  AC_MSG_ERROR([Unknown crypto implementation $withval])
  ;;
esac
AC_CONFIG_COMMANDS(CRYPTO_IMPL, , CRYPTO_IMPL=$CRYPTO_IMPL)
AC_SUBST(CRYPTO_IMPL)
AC_SUBST(CRYPTO_IMPL_CFLAGS)
AC_SUBST(CRYPTO_IMPL_LIBS)

if test "$CRYPTO_IMPL" = nss; then
	PRNG_ALG="nss"
else
AC_ARG_WITH([prng-alg],
AC_HELP_STRING([--with-prng-alg=ALG], [use specified PRNG algorithm. Ignored for nss. @<:@fortuna@:>@]),
[PRNG_ALG=$withval
AC_MSG_NOTICE(k5crypto will use '$withval')
], PRNG_ALG=fortuna)
fi
AC_CONFIG_COMMANDS(PRNG_ALG, , PRNG_ALG=$PRNG_ALG)
AC_SUBST(PRNG_ALG)
if test "$PRNG_ALG" = fortuna; then
	AC_DEFINE(FORTUNA,1,[Define if Fortuna PRNG is selected])
fi

# WITH_PKINIT_CRYPTO_IMPL

PKINIT_CRYPTO_IMPL="$CRYPTO_IMPL"
AC_ARG_WITH([pkinit-crypto-impl],
AC_HELP_STRING([--with-pkinit-crypto-impl=IMPL], [use specified pkinit crypto implementation @<:@openssl@:>@]),
[PKINIT_CRYPTO_IMPL=$withval
AC_MSG_NOTICE(pkinit will use '$withval')
], withval=$PKINIT_CRYPTO_IMPL)
case "$withval" in
builtin|openssl)
  AC_CHECK_LIB(crypto, PKCS7_get_signer_info, PKINIT_CRYPTO_IMPL_LIBS=-lcrypto)
  PKINIT_CRYPTO_IMPL=openssl
  ;;
nss)
  if test "${PKINIT_CRYPTO_IMPL_CFLAGS+set}" != set; then
    PKINIT_CRYPTO_IMPL_CFLAGS=`pkg-config --cflags nss`
  fi
  if test "${PKINIT_CRYPTO_IMPL_LIBS+set}" != set; then
    PKINIT_CRYPTO_IMPL_LIBS=`pkg-config --libs nss`
  fi
  AC_DEFINE(PKINIT_CRYPTO_IMPL_NSS,1,[Define if pkinit crypto implementation is NSS])
  save_CFLAGS=$CFLAGS
  CFLAGS="$CFLAGS $PKINIT_CRYPTO_IMPL_CFLAGS"
  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <nss.h>
#if NSS_VMAJOR < 3 || (NSS_VMAJOR == 3 && NSS_VMINOR < 12)
#error
#elif NSS_VMAJOR == 3 && NSS_VMINOR == 12 && NSS_VPATCH < 11
#error
#endif
  ])], [], [AC_MSG_ERROR([NSS version 3.12.11 or later required.])])
  CFLAGS=$save_CFLAGS
  ;;
*)
  AC_MSG_ERROR([Unknown crypto implementation $withval])
  ;;
esac
AC_CONFIG_COMMANDS(PKINIT_CRYPTO_IMPL,,PKINIT_CRYPTO_IMPL=$PKINIT_CRYPTO_IMPL)
AC_SUBST(PKINIT_CRYPTO_IMPL)
AC_SUBST(PKINIT_CRYPTO_IMPL_CFLAGS)
AC_SUBST(PKINIT_CRYPTO_IMPL_LIBS)

AC_ARG_ENABLE([aesni],
AC_HELP_STRING([--disable-aesni],[Do not build with AES-NI support]), ,
enable_aesni=check)
if test "$CRYPTO_IMPL" = builtin -a "x$enable_aesni" != xno; then
    case "$host" in
    i686-*)
	aesni_obj=iaesx86.o
	aesni_machine=x86
	;;
    x86_64-*)
	aesni_obj=iaesx64.o
	aesni_machine=amd64
	;;
    esac
    case "$host" in
    *-*-linux* | *-*-gnu* | *-*-*bsd* | *-*-solaris*)
	# All Unix-like platforms need -D__linux__ for iaesx64.s to
	# use the System V x86-64 calling convention.
	aesni_flags="-D__linux__ -f elf -m $aesni_machine"
	;;
    esac
    if test "x$aesni_obj" != x && test "x$aesni_flags" != x; then
	AC_CHECK_PROG(YASM,yasm,yasm)
	AC_CHECK_HEADERS(cpuid.h)
	if test x"$YASM" != x -a "x$ac_cv_header_cpuid_h" = xyes; then
	    AESNI_OBJ=$aesni_obj
	    AESNI_FLAGS=$aesni_flags
	    AC_DEFINE(AESNI,1,[Define if AES-NI support is enabled])
	    AC_MSG_NOTICE([Building with AES-NI support])
	fi
    fi
    if test "x$enable_aesni" = xyes -a "x$AESNI_OBJ" = x; then
	AC_MSG_ERROR([AES-NI support requested but cannot be built])
    fi
fi
AC_SUBST(AESNI_OBJ)
AC_SUBST(AESNI_FLAGS)

AC_ARG_ENABLE([kdc-lookaside-cache],
AC_HELP_STRING([--disable-kdc-lookaside-cache],
               [Disable the cache which detects client retransmits]), ,
               enableval=yes)
if test "$enableval" = no ; then
	AC_DEFINE(NOCACHE,1,[Define if the KDC should use no lookaside cache])
fi
KRB5_RUN_FLAGS

AC_TYPE_SIGNAL

# from old include/configure.in
AH_TEMPLATE([HAVE_STRUCT_SOCKADDR_STORAGE], 
[Define if "struct sockaddr_storage" is available.])

AC_CONFIG_HEADERS(include/autoconf.h, [echo timestamp > include/autoconf.stamp])
AC_PROG_LEX
AC_C_CONST
AC_HEADER_DIRENT
AC_CHECK_FUNCS(strdup setvbuf seteuid setresuid setreuid setegid setresgid setregid setsid flock fchmod chmod strftime strptime geteuid setenv unsetenv getenv gmtime_r localtime_r bswap16 bswap64 mkstemp getusershell access getcwd srand48 srand srandom stat strchr strerror strerror_r timegm)

AC_CHECK_FUNC(mkstemp,
[MKSTEMP_ST_OBJ=
MKSTEMP_OBJ=],
[MKSTEMP_ST_OBJ='mkstemp.o'
MKSTEMP_OBJ='$(OUTPRE)mkstemp.$(OBJEXT)'
EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_mkstemp"])
AC_SUBST(MKSTEMP_OBJ)
AC_SUBST(MKSTEMP_ST_OBJ)

AC_CHECK_FUNC(gettimeofday,
	[GETTIMEOFDAY_ST_OBJ=
	GETTIMEOFDAY_OBJ=
	AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Have the gettimeofday function])
],
	[GETTIMEOFDAY_ST_OBJ='gettimeofday.o'
	GETTIMEOFDAY_OBJ='$(OUTPRE)gettimeofday.$(OBJEXT)'
	EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_gettimeofday"])
AC_SUBST(GETTIMEOFDAY_OBJ)
AC_SUBST(GETTIMEOFDAY_ST_OBJ)
AC_SUBST(EXTRA_SUPPORT_SYMS)

DECLARE_SYS_ERRLIST
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)
AC_CHECK_HEADER(regexp.h, [], [],
[#define INIT char *sp = instring;
#define GETC() (*sp++)
#define PEEKC() (*sp)
#define UNGETC(c) (--sp)
#define RETURN(c) return(c)
#define ERROR(c)
])
AC_CHECK_MEMBERS([struct sockaddr_in.sin_len, struct sockaddr.sa_len], , ,
  [#include <sys/types.h>
#include <netinet/in.h>])
AC_CHECK_MEMBERS([struct stat.st_mtimensec,struct stat.st_mtimespec.tv_nsec,struct stat.st_mtim.tv_nsec],,,[#include <sys/types.h>
#include <sys/stat.h>])
KRB5_AC_REGEX_FUNCS
AC_TYPE_OFF_T

# Fancy caching of perror result...
AC_MSG_CHECKING(for perror declaration)
AC_CACHE_VAL(krb5_cv_decl_perror,
[AC_EGREP_HEADER(perror, errno.h, 
  krb5_cv_decl_perror=yes, krb5_cv_decl_perror=no)])
AC_MSG_RESULT($krb5_cv_decl_perror)
if test $krb5_cv_decl_perror = yes; then
	AC_DEFINE(HDR_HAS_PERROR,1,[Define if errno.h declares perror])
fi

KRB5_NEED_PROTO([#include <time.h>],strptime)
CHECK_WAIT_TYPE
CHECK_SIGPROCMASK
AC_TYPE_GETGROUPS
CHECK_SETJMP

# *rpcent return types needed for lib/rpc

AC_MSG_CHECKING([return type of setrpcent])
AC_CACHE_VAL(k5_cv_type_setrpcent,
[AC_TRY_COMPILE([#include <netdb.h>
#ifdef __cplusplus
extern "C"
#endif
extern void setrpcent();],
[int i;], k5_cv_type_setrpcent=void, k5_cv_type_setrpcent=int)])
AC_MSG_RESULT($k5_cv_type_setrpcent)
AC_DEFINE_UNQUOTED(SETRPCENT_TYPE, $k5_cv_type_setrpcent, [Define as return type of setrpcent])

AC_MSG_CHECKING([return type of endrpcent])
AC_CACHE_VAL(k5_cv_type_endrpcent,
[AC_TRY_COMPILE([#include <netdb.h>
#ifdef __cplusplus
extern "C"
#endif
extern void endrpcent();],
[int i;], k5_cv_type_endrpcent=void, k5_cv_type_endrpcent=int)])
AC_MSG_RESULT($k5_cv_type_endrpcent)
AC_DEFINE_UNQUOTED(ENDRPCENT_TYPE, $k5_cv_type_endrpcent, [Define as return type of endrpcent])


# bswap_16 is a macro in byteswap.h under GNU libc
AC_MSG_CHECKING(for bswap_16)
AC_CACHE_VAL(krb5_cv_bswap_16,[
AC_TRY_LINK([#if HAVE_BYTESWAP_H
#include <byteswap.h>
#endif],[bswap_16(37);],krb5_cv_bswap_16=yes,krb5_cv_bswap_16=no)])
AC_MSG_RESULT($krb5_cv_bswap_16)
if test "$krb5_cv_bswap_16" = yes; then
  AC_DEFINE(HAVE_BSWAP_16,1,[Define to 1 if bswap_16 is available via byteswap.h])
fi
AC_MSG_CHECKING(for bswap_64)
AC_CACHE_VAL(krb5_cv_bswap_64,[
AC_TRY_LINK([#if HAVE_BYTESWAP_H
#include <byteswap.h>
#endif],[bswap_64(37);],krb5_cv_bswap_64=yes,krb5_cv_bswap_64=no)])
AC_MSG_RESULT($krb5_cv_bswap_64)
if test "$krb5_cv_bswap_64" = yes; then
  AC_DEFINE(HAVE_BSWAP_64,1,[Define to 1 if bswap_64 is available via byteswap.h])
fi

# Needed for ksu and some appl stuff.

case $krb5_cv_host in
alpha*-dec-osf*)
	AC_CHECK_LIB(security,setluid,
		AC_DEFINE(HAVE_SETLUID,1,[Define if setluid provided in OSF/1 security library])
		KSU_LIBS="-lsecurity"
	)
	;;
esac
AC_SUBST(KSU_LIBS)

if test $ac_cv_func_setenv = no || test $ac_cv_func_unsetenv = no \
  || test $ac_cv_func_getenv = no; then
  SETENVOBJ=setenv.o
else
  SETENVOBJ=
fi
AC_SUBST(SETENVOBJ)

# Check what the return types for gethostbyname_r and getservbyname_r are.

AC_CHECK_FUNC(gethostbyname_r,[
ac_cv_func_gethostbyname_r=yes
if test "$ac_cv_func_gethostbyname_r" = yes; then
  AC_MSG_CHECKING([if gethostbyname_r returns an int])
  AC_CACHE_VAL(krb5_cv_gethostbyname_r_returns_int,
  [AC_TRY_COMPILE([#include <netdb.h>
  extern int gethostbyname_r ();], [1;],
  krb5_cv_gethostbyname_r_returns_int=yes,
  krb5_cv_gethostbyname_r_returns_int=no)])
  AC_MSG_RESULT($krb5_cv_gethostbyname_r_returns_int)

  AC_MSG_CHECKING([if gethostbyname_r returns a pointer])
  AC_CACHE_VAL(krb5_cv_gethostbyname_r_returns_ptr,
  [AC_TRY_COMPILE([#include <netdb.h>
  extern struct hostent *gethostbyname_r ();], [1;],
  krb5_cv_gethostbyname_r_returns_ptr=yes,
  krb5_cv_gethostbyname_r_returns_ptr=no)])
  AC_MSG_RESULT($krb5_cv_gethostbyname_r_returns_ptr)

  if test "$krb5_cv_gethostbyname_r_returns_int" = "$krb5_cv_gethostbyname_r_returns_ptr"; then
    AC_MSG_WARN(cannot determine return type of gethostbyname_r -- disabling)
    ac_cv_func_gethostbyname_r=no
  fi
  if test "$krb5_cv_gethostbyname_r_returns_int" = yes; then
    AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT, 1, [Define if gethostbyname_r returns int rather than struct hostent * ])
  fi
fi
if test "$ac_cv_func_gethostbyname_r" = yes; then
  AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1, [Define if gethostbyname_r exists and its return type is known])
  AC_CHECK_FUNC(gethostbyaddr_r)
fi
])


AC_CHECK_FUNC(getpwnam_r,ac_cv_func_getpwnam_r=yes,ac_cv_func_getpwnam_r=no)
AC_CHECK_FUNC(getpwuid_r,ac_cv_func_getpwuid_r=yes,ac_cv_func_getpwuid_r=no)
if test "$ac_cv_func_getpwnam_r" = yes; then
  AC_MSG_CHECKING([return type of getpwnam_r])
  AC_CACHE_VAL(krb5_cv_getpwnam_r_return_type,
  [AC_TRY_COMPILE([#include <pwd.h>
   extern int getpwnam_r();], [1;],
   getpwnam_r_returns_int=yes,getpwnam_r_returns_int=no)
   AC_TRY_COMPILE([#include <pwd.h>
   extern struct passwd *getpwnam_r();], [1;],
   getpwnam_r_returns_ptr=yes,getpwnam_r_returns_ptr=no)
   case "$getpwnam_r_returns_int/$getpwnam_r_returns_ptr" in
     yes/no) krb5_cv_getpwnam_r_return_type=int ;;
     no/yes) krb5_cv_getpwnam_r_return_type=ptr ;;
     *) krb5_cv_getpwnam_r_return_type=unknown ;;
   esac])
  AC_MSG_RESULT($krb5_cv_getpwnam_r_return_type)
  if test $krb5_cv_getpwnam_r_return_type = int; then
    AC_DEFINE(GETPWNAM_R_RETURNS_INT, 1, [Define if getpwnam_r returns an int])
  elif test $krb5_cv_getpwnam_r_return_type = unknown; then
    AC_MSG_WARN([Cannot determine getpwnam_r return type, disabling getpwnam_r])
    ac_cv_func_getpwnam_r=no
  fi
fi
if test "$ac_cv_func_getpwnam_r" = yes; then
  AC_MSG_CHECKING([number of arguments to getpwnam_r])
  AC_CACHE_VAL(krb5_cv_getpwnam_r_args,
  [AC_TRY_COMPILE([#include <pwd.h>
   struct passwd pwx; char buf[1024];],
   [getpwnam_r("", &pwx, buf, sizeof(buf));], args4=yes, args4=no)
   AC_TRY_COMPILE([#include <pwd.h>
   struct passwd pwx, *p; char buf[1024];],
   [getpwnam_r("", &pwx, buf, sizeof(buf), &p);], args5=yes, args5=no)
   case $args4/$args5 in
     yes/no) krb5_cv_getpwnam_r_args=4 ;;
     no/yes) krb5_cv_getpwnam_r_args=5 ;;
     *) krb5_cv_getpwnam_r_args=unknown ;;
   esac])
  AC_MSG_RESULT($krb5_cv_getpwnam_r_args)
  if test "$krb5_cv_getpwnam_r_args" = unknown; then
    AC_MSG_WARN([Cannot determine number of arguments to getpwnam_r, disabling its use.])
    ac_cv_func_getpwnam_r=no
  else
    AC_DEFINE(HAVE_GETPWNAM_R,1,[Define if getpwnam_r is available and useful.])
    if test "$krb5_cv_getpwnam_r_args" = 4; then
      AC_DEFINE(GETPWNAM_R_4_ARGS,1,[Define if getpwnam_r exists but takes only 4 arguments (e.g., POSIX draft 6 implementations like some Solaris releases).])
    fi
  fi
fi

if test "$ac_cv_func_getpwnam_r" = no && test "$ac_cv_func_getpwuid_r" = yes; then
  # Actually, we could do this check, and the corresponding checks
  # for return type and number of arguments, but I doubt we'll run
  # into a system where we'd get to use getpwuid_r but not getpwnam_r.
  AC_MSG_NOTICE([getpwnam_r not useful, so disabling getpwuid_r too])
  ac_cv_func_getpwuid_r=no
fi
if test "$ac_cv_func_getpwuid_r" = yes; then
  AC_DEFINE(HAVE_GETPWUID_R,1,[Define if getpwuid_r is available and useful.])
  # Hack: Assume getpwuid_r is the shorter form if getpwnam_r is.
  if test "$krb5_cv_getpwnam_r_args" = 4; then
    AC_DEFINE(GETPWUID_R_4_ARGS,1,[Define if getpwuid_r exists but takes only 4 arguments (e.g., POSIX draft 6 implementations like some Solaris releases).])
  fi
fi

if test "$ac_cv_func_gmtime_r" = yes; then
  AC_MSG_CHECKING([whether gmtime_r returns int])
  AC_CACHE_VAL(krb5_cv_gmtime_r_returns_int,
  [AC_TRY_COMPILE([#include <time.h>
   extern int gmtime_r ();], [1;], return_int=yes, return_int=no)
   AC_TRY_COMPILE([#include <time.h>
   extern struct tm *gmtime_r ();], [1;], return_ptr=yes, return_ptr=no)
   case $return_int/$return_ptr in
     yes/no) krb5_cv_gmtime_r_returns_int=yes ;;
     no/yes) krb5_cv_gmtime_r_returns_int=no ;;
     *)      # Can't figure it out, punt the function.
             ac_cv_func_gmtime_r=no ;;
   esac])
  if test "$ac_cv_func_gmtime_r" = no; then
    AC_MSG_RESULT(unknown -- ignoring gmtime_r)
  else
    AC_MSG_RESULT($krb5_cv_gmtime_r_returns_int)
    if test "$krb5_cv_gmtime_r_returns_int" = yes; then
      AC_DEFINE(GMTIME_R_RETURNS_INT,1,[Define if gmtime_r returns int instead of struct tm pointer, as on old HP-UX systems.])
    fi
  fi
fi

AC_CHECK_FUNC(getservbyname_r,[
ac_cv_func_getservbyname_r=yes
if test "$ac_cv_func_getservbyname_r" = yes; then
  AC_MSG_CHECKING([if getservbyname_r returns an int])
  AC_CACHE_VAL(krb5_cv_getservbyname_r_returns_int,
  [AC_TRY_COMPILE([#include <netdb.h>
  extern int getservbyname_r ();], [1;],
  krb5_cv_getservbyname_r_returns_int=yes,
  krb5_cv_getservbyname_r_returns_int=no)])
  AC_MSG_RESULT($krb5_cv_getservbyname_r_returns_int)

  AC_MSG_CHECKING([if getservbyname_r returns a pointer])
  AC_CACHE_VAL(krb5_cv_getservbyname_r_returns_ptr,
  [AC_TRY_COMPILE([#include <netdb.h>
  extern struct servent *getservbyname_r ();], [1;],
  krb5_cv_getservbyname_r_returns_ptr=yes,
  krb5_cv_getservbyname_r_returns_ptr=no)])
  AC_MSG_RESULT($krb5_cv_getservbyname_r_returns_ptr)

  if test "$krb5_cv_getservbyname_r_returns_int" = "$krb5_cv_getservbyname_r_returns_ptr"; then
    AC_MSG_WARN(cannot determine return type of getservbyname_r -- disabling)
    ac_cv_func_getservbyname_r=no
  fi
  if test "$krb5_cv_getservbyname_r_returns_int" = yes; then
    AC_DEFINE(GETSERVBYNAME_R_RETURNS_INT, 1, [Define if getservbyname_r returns int rather than struct servent * ])
  fi
fi
if test "$ac_cv_func_getservbyname_r" = yes; then
  AC_DEFINE(HAVE_GETSERVBYNAME_R, 1, [Define if getservbyname_r exists and its return type is known])
  AC_CHECK_FUNC(getservbyport_r)
fi
])

HAVE_YYLINENO
CHECK_DIRENT
AC_TYPE_UID_T

AC_CHECK_HEADER(termios.h,
[AC_CHECK_FUNC([tcsetattr],
  AC_DEFINE(POSIX_TERMIOS,1,[Define if termios.h exists and tcsetattr exists]))])

KRB5_SIGTYPE
AC_CHECK_HEADERS(poll.h stdlib.h string.h stddef.h sys/types.h sys/file.h sys/param.h sys/stat.h sys/time.h netinet/in.h sys/uio.h sys/filio.h sys/select.h time.h paths.h errno.h)

# If compiling with IPv6 support, test if in6addr_any functions.
# Irix 6.5.16 defines it, but lacks support in the C library.
if test $krb5_cv_inet6 = yes || test "$krb5_cv_inet6_with_dinet6" = yes ; then
AC_CACHE_CHECK([for in6addr_any definition in library], 
  krb5_cv_var_in6addr_any,
[AC_TRY_LINK([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
],[
  struct sockaddr_in6 in;
  in.sin6_addr = in6addr_any;
  printf("%x", &in);
],krb5_cv_var_in6addr_any=yes, krb5_cv_var_in6addr_any=no)])
  if test $krb5_cv_var_in6addr_any = no; then
    AC_DEFINE(NEED_INSIXADDR_ANY,1,[Define if in6addr_any is not defined in libc])
  fi
fi



# check for ANSI stdio, esp "b" option to fopen().  This (unfortunately)
# requires a run check...

AC_MSG_CHECKING([for ANSI stdio])
AC_CACHE_VAL(krb5_cv_has_ansi_stdio,
[AC_TRY_RUN(
[#include <stdio.h>
int main()
{
  FILE *conftest;
  if ((conftest = fopen("conftest.dat", "w")) == NULL) exit(1);
  if (fclose(conftest)) exit(1);
  if ((conftest = fopen("conftest.dat", "rb+")) == NULL) exit(1);
  if (fputs("testing ANSI for stdio\n", conftest) == EOF) exit(1);
  exit(0);
}],
krb5_cv_has_ansi_stdio=yes, krb5_cv_has_ansi_stdio=no,
krb5_cv_has_ansi_stdio=yes)])# assume ANSI in cross environment
AC_MSG_RESULT($krb5_cv_has_ansi_stdio)
if test $krb5_cv_has_ansi_stdio = yes; then
AC_DEFINE(ANSI_STDIO,1,[Define if ANSI stdio is present (in particular "b" option to fopen)])
fi

# then from osconf.h, we have

AC_HEADER_TIME
AC_CHECK_TYPE(time_t, long)

# Determine where to put the replay cache.

AC_MSG_CHECKING([for replay cache directory])
AC_CACHE_VAL(krb5_cv_sys_rcdir,
[
for t_dir in /var/tmp /usr/tmp /var/usr/tmp /tmp ; do
	test -d $t_dir || continue
	krb5_cv_sys_rcdir=$t_dir
	break
done])
AC_MSG_RESULT($krb5_cv_sys_rcdir)
KRB5_RCTMPDIR=$krb5_cv_sys_rcdir
AC_SUBST(KRB5_RCTMPDIR)


AC_MSG_CHECKING(for socklen_t)
AC_CACHE_VAL(krb5_cv_has_type_socklen_t,
[AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>
],[sizeof (socklen_t);],
krb5_cv_has_type_socklen_t=yes,krb5_cv_has_type_socklen_t=no)])
AC_MSG_RESULT($krb5_cv_has_type_socklen_t)
if test $krb5_cv_has_type_socklen_t = yes; then
    AC_DEFINE(HAVE_SOCKLEN_T,1,[Define if there is a socklen_t type. If not, probably use size_t])
fi

AC_MSG_CHECKING(for struct lifconf)
AC_CACHE_VAL(krb5_cv_has_struct_lifconf,
[AC_TRY_COMPILE(
[#include <sys/socket.h>
#include <net/if.h>
],[sizeof (struct lifconf);],
krb5_cv_has_struct_lifconf=yes,krb5_cv_has_struct_lifconf=no)])
AC_MSG_RESULT($krb5_cv_has_struct_lifconf)
if test $krb5_cv_has_struct_lifconf = yes; then
    AC_DEFINE(HAVE_STRUCT_LIFCONF,1,[Define if there is a struct lifconf.])
fi
# HP-UX 11 uses stuct if_laddrconf
AC_MSG_CHECKING(for struct if_laddrconf)
AC_CACHE_VAL(krb5_cv_has_struct_if_laddrconf,
[AC_TRY_COMPILE(
[#include <sys/socket.h>
#include <net/if.h>
#include <net/if6.h>
],[sizeof (struct if_laddrconf);],
krb5_cv_has_struct_if_laddrconf=yes,krb5_cv_has_struct_if_laddrconf=no)])
AC_MSG_RESULT($krb5_cv_has_struct_if_laddrconf)
if test $krb5_cv_has_struct_if_laddrconf = yes; then
    AC_DEFINE(HAVE_STRUCT_IF_LADDRCONF,1,[Define if there is a struct if_laddrconf.])
fi


AC_MSG_CHECKING([for h_errno in netdb.h])
AC_CACHE_VAL(krb5_cv_header_netdb_h_h_errno,
[AC_TRY_COMPILE(
	[#include <netdb.h>],
	[int x = h_errno;], krb5_cv_header_netdb_h_h_errno=yes,
	krb5_cv_header_netdb_h_h_errno=no)])
AC_MSG_RESULT($krb5_cv_header_netdb_h_h_errno)
if test $krb5_cv_header_netdb_h_h_errno = yes; then
    AC_DEFINE([HAVE_NETDB_H_H_ERRNO], 1,
	[Define if netdb.h declares h_errno])
fi


AC_ARG_ENABLE([athena],
[  --enable-athena         build with MIT Project Athena configuration],
AC_DEFINE(KRB5_ATHENA_COMPAT,1,[Define if MIT Project Athena default configuration should be used]),)


AC_C_INLINE
AH_TOP([
#ifndef KRB5_AUTOCONF_H
#define KRB5_AUTOCONF_H
])
AH_BOTTOM([
#if defined(__GNUC__) && !defined(inline)
/* Silence gcc pedantic warnings about ANSI C.  */
# define inline __inline__
#endif
#endif /* KRB5_AUTOCONF_H */
])

# Not used yet, but let's find out what we've got on the platforms
# we're working with....
AC_CHECK_HEADERS(inttypes.h stdint.h)
AC_CHECK_TYPES([uint32_t, int32_t, uint64_t, int64_t, uint_least32_t, uintptr_t, uintmax_t, long long], , , [
#ifdef HAVE_STDINT_H
# include <stdint.h>
#elif defined(HAVE_INTTYPES_H)
# include <inttypes.h>
#endif
])
AC_CHECK_TYPES([struct cmsghdr, struct in_pktinfo, struct in6_pktinfo, struct sockaddr_storage], , , [
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
])
AC_CHECK_TYPES([struct rt_msghdr], , , [
#include <sys/socket.h>
#include <net/if.h>
#include <net/route.h>
])

# stuff for util/profile

# AC_KRB5_TCL already done
DO_TCL=
test "$TCL_LIBS" != "" && DO_TCL=ok
AC_SUBST(DO_TCL)

# types libdb2 wants

AC_CHECK_TYPES([ssize_t, u_char, u_int, u_long, u_int8_t, u_int16_t, u_int32_t, int8_t, int16_t, int32_t])

# Some libdb2 test programs want a shell that supports functions.
FCTSH=false
AC_PATH_PROG(SH,sh,false)
AC_PATH_PROG(SH5,sh5,false)
AC_PATH_PROG(BASH,bash,false)
for prog in $SH $SH5 $BASH; do
  AC_MSG_CHECKING(if $prog supports functions)
  if $prog -c 'foo() { true; }; foo' >/dev/null 2>&1; then
    AC_MSG_RESULT(yes)
    FCTSH=$prog
    break
  else
    AC_MSG_RESULT(no)
  fi
done
AC_SUBST(FCTSH)

# Test for POSIX 2001 *printf support (X/Open System Interfaces extension
# to ANSI/ISO C 1999 specification).  Specifically, positional
# specifications; not checking for other features like %zx at present.
AC_MSG_CHECKING(for POSIX printf positional specification support)
AC_CACHE_VAL(ac_cv_printf_positional,[
AC_TRY_RUN([
#include <stdio.h>
#include <string.h>
const char expected[] = "200 100";
int main () {
    char buf[30];
    sprintf(buf, "%2\$x %1\$d", 100, 512);
    if (strcmp(expected, buf)) {
	fprintf(stderr,"bad result: <%s> wanted: <%s>\n", buf, expected);
	return 1;
    }
    return 0;
}],
  ac_cv_printf_positional=yes,
  ac_cv_printf_positional=no,
  AC_MSG_ERROR([Cannot test for printf positional argument support when cross compiling]))])
# Nothing for autoconf.h for now.
AC_MSG_RESULT($ac_cv_printf_positional)


# for t_locate_kdc test

AC_PATH_PROG(DIG, dig, false)
AC_PATH_PROG(NSLOOKUP, nslookup, false)

# for kadmin

AC_PROG_YACC
ath_compat=
AC_ARG_ENABLE([athena],
[  --enable-athena         build with MIT Project Athena configuration],
ath_compat=compat,)
# The following are tests for the presence of programs required for
# kadmin testing.
AC_CHECK_PROG(have_RUNTEST,runtest,runtest)
AC_CHECK_PROG(have_PERL,perl,perl)
if test "$have_PERL" = perl -a "$have_RUNTEST" = runtest -a "$TCL_LIBS" != ""; then
 	DO_TEST=ok
fi
AC_SUBST(DO_TEST) 

# The following are substituted into kadmin/testing/scripts/env-setup.sh
RBUILD=`pwd`
AC_SUBST(RBUILD)
case "$srcdir" in
/*)	S_TOP=$srcdir ;;
*)	S_TOP=`pwd`/$srcdir ;;
esac
AC_SUBST(S_TOP)
AC_PATH_PROG(PERL_PATH,perl)
AC_PATH_PROG(EXPECT,expect)
# For kadmin/testing/util/Makefile.in
if test "$TCL_LIBS" != "" ;  then
	DO_ALL=tcl
fi
AC_SUBST(DO_ALL)
KRB5_AC_PRIOCNTL_HACK
K5_GEN_FILE(kadmin/testing/scripts/env-setup.sh:kadmin/testing/scripts/env-setup.shin)
# for lib/kadm5
AC_CHECK_PROG(RUNTEST,runtest,runtest)
AC_CHECK_PROG(PERL,perl,perl)

# lib/gssapi
AC_CHECK_HEADER(stdint.h,[
	include_stdint='awk '\''END{printf("%cinclude <stdint.h>\n", 35);}'\'' < /dev/null'],
	include_stdint='echo "/* no stdint.h */"')
AC_SUBST(include_stdint)
AC_CHECK_HEADER(inttypes.h,[
	include_inttypes='awk '\''END{printf("%cinclude <inttypes.h>\n", 35);}'\'' < /dev/null'],
	include_inttypes='echo "/* no inttypes.h */"')
AC_SUBST(include_inttypes)
AC_CHECK_HEADER(xom.h,[
	include_xom='awk '\''END{printf("%cinclude <xom.h>\n", 35);}'\'' < /dev/null'], [
	include_xom='echo "/* no xom.h */"'])
AC_SUBST(include_xom)


# lib/rpc
### Check where struct rpcent is declared.

# This is necessary to determine:
# 1. If /usr/include/netdb.h declares struct rpcent
# 2. If /usr/include/rpc/netdb.h declares struct rpcent

# We have our own rpc/netdb.h, and if /usr/include/netdb.h includes
# rpc/netdb.h, then nastiness could happen.

# Logic: If /usr/include/netdb.h declares struct rpcent, then check
# rpc/netdb.h.  If /usr/include/rpc/netdb.h declares struct rpcent,
# then define STRUCT_RPCENT_IN_RPC_NETDB_H, otherwise do not.  If
# neither netdb.h nor rpc/netdb.h declares struct rpcent, then define
# STRUCT_RPCENT_IN_RPC_NETDB_H anyway.

AC_MSG_CHECKING([where struct rpcent is declared])
AC_TRY_COMPILE([#include <netdb.h>],
[struct rpcent e;
char c = e.r_name[0];
int i = e.r_number;],
[AC_TRY_COMPILE([#include <rpc/netdb.h>],
[struct rpcent e;
char c = e.r_name[0];
int i = e.r_number;],
[AC_MSG_RESULT([rpc/netdb.h])
rpcent_define='#define STRUCT_RPCENT_IN_RPC_NETDB_H'],
[AC_MSG_RESULT([netdb.h])])],
[AC_MSG_RESULT([nowhere])
rpcent_define='#define STRUCT_RPCENT_IN_RPC_NETDB_H'])
AC_SUBST(rpcent_define)

AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h)
if test $ac_cv_header_sys_select_h = yes; then
  GSSRPC__SYS_SELECT_H='#include <sys/select.h>'
else
  GSSRPC__SYS_SELECT_H='/* #include <sys/select.h> */'
fi
AC_SUBST(GSSRPC__SYS_SELECT_H)
if test $ac_cv_header_sys_time_h = yes; then
  GSSRPC__SYS_TIME_H='#include <sys/time.h>'
else
  GSSRPC__SYS_TIME_H='/* #include <sys/time.h> */'
fi
AC_SUBST(GSSRPC__SYS_TIME_H)
if test $ac_cv_header_unistd_h = yes; then
  GSSRPC__UNISTD_H='#include <unistd.h>'
else
  GSSRPC__UNISTD_H='/* #include <unistd.h> */'
fi
AC_SUBST(GSSRPC__UNISTD_H)

AC_CACHE_CHECK([for MAXHOSTNAMELEN in sys/param.h],
  [krb5_cv_header_sys_param_h_maxhostnamelen],
  [AC_TRY_COMPILE([#include <sys/param.h>],
    [int i = MAXHOSTNAMELEN;],
    [krb5_cv_header_sys_param_h_maxhostnamelen=yes],
    [krb5_cv_header_sys_param_h_maxhostnamelen=no])])
AC_CACHE_CHECK([for MAXHOSTNAMELEN in netdb.h],
  [krb5_cv_header_netdb_h_maxhostnamelen],
  [AC_TRY_COMPILE([#include <netdb.h>],
    [int i = MAXHOSTNAMELEN;],
    [krb5_cv_header_netdb_h_maxhostnamelen=yes],
    [krb5_cv_header_netdb_h_maxhostnamelen=no])])

GSSRPC__SYS_PARAM_H='/* #include <sys/param.h> */'
GSSRPC__NETDB_H='/* #include <netdb.h> */'
if test $krb5_cv_header_sys_param_h_maxhostnamelen = yes; then
  GSSRPC__SYS_PARAM_H='#include <sys/param.h>'
else
  if test $krb5_cv_header_netdb_h_maxhostnamelen = yes; then
    GSSRPC__NETDB_H='#include <netdb.h>'
  else
    AC_MSG_WARN([can't find MAXHOSTNAMELEN definition; faking it])
  fi
fi
AC_SUBST(GSSRPC__SYS_PARAM_H)
AC_SUBST(GSSRPC__NETDB_H)

AC_CACHE_CHECK([for uint32_t in sys/types.h],
  [krb5_cv_header_sys_types_h_uint32_t],
  [AC_TRY_COMPILE([#include <sys/types.h>],
      [uint32_t i = 0;],
      [krb5_cv_header_sys_types_h_uint32_t=yes],
      [krb5_cv_header_sys_types_h_uint32_t=no])])
AC_CACHE_CHECK([for uint32_t in stdint.h],
  [krb5_cv_header_stdint_h_uint32_t],
  [AC_TRY_COMPILE([#include <stdint.h>],
      [uint32_t i = 0;],
      [krb5_cv_header_stdint_h_uint32_t=yes],
      [krb5_cv_header_stdint_h_uint32_t=no])])
AC_CACHE_CHECK([for uint32_t in inttypes.h],
  [krb5_cv_header_inttypes_h_uint32_t],
  [AC_TRY_COMPILE([#include <inttypes.h>],
      [uint32_t i = 0;],
      [krb5_cv_header_inttypes_h_uint32_t=yes],
      [krb5_cv_header_inttypes_h_uint32_t=no])])
GSSRPC__STDINT_H='/* #include <stdint.h> */'
GSSRPC__INTTYPES_H='/* #include <inttypes.h> */'
GSSRPC__FAKE_UINT32='/* #undef GSSRPC__FAKE_INT32 */'
if test $krb5_cv_header_sys_types_h_uint32_t = yes; then
  : # already included sys/types.h
else
  if test $krb5_cv_header_stdint_h_uint32_t = yes; then
    GSSRPC__STDINT_H='#include <stdint.h>'
  else
    if test $krb5_cv_header_inttypes_h_uint32_t = yes; then
      GSSRPC__INTTYPES_H='#include <inttypes.h>'
    else
      AC_MSG_WARN([can't find a fixed-width 32-bit type anywhere; faking it])
      GSSRPC__FAKE_UINT32='#define GSSRPC__FAKE_UINT32 1'
    fi
  fi
fi
AC_SUBST(GSSRPC__STDINT_H)
AC_SUBST(GSSRPC__INTTYPES_H)
AC_SUBST(GSSRPC__FAKE_UINT32)

AC_CACHE_CHECK([for BSD type aliases], [krb5_cv_type_bsdaliases],
  [AC_TRY_COMPILE(
    [#include <sys/types.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif],
    [u_char c;
u_int i;
u_long l;], [krb5_cv_type_bsdaliases=yes], [krb5_cv_type_bsdaliases=no])])
if test $krb5_cv_type_bsdaliases = yes; then
  GSSRPC__BSD_TYPEALIASES='/* #undef GSSRPC__BSD_TYPEALIASES */'
else
  GSSRPC__BSD_TYPEALIASES='#define GSSRPC__BSD_TYPEALIASES 1'
fi
AC_SUBST(GSSRPC__BSD_TYPEALIASES)

# sockaddr length field checks

AC_CHECK_MEMBERS([struct sockaddr_in.sin_len], , ,
  [#include <sys/types.h>
@%:@include <netinet/in.h>])
AC_CHECK_MEMBERS([struct sockaddr.sa_len], , ,
  [#include <sys/types.h>
@%:@include <sys/socket.h>])

AC_MSG_CHECKING([return type of setrpcent])
AC_CACHE_VAL(k5_cv_type_setrpcent,
[AC_TRY_COMPILE([#include <netdb.h>
#ifdef __cplusplus
extern "C"
#endif
extern void setrpcent();],
[int i;], k5_cv_type_setrpcent=void, k5_cv_type_setrpcent=int)])
AC_MSG_RESULT($k5_cv_type_setrpcent)
AC_DEFINE_UNQUOTED(SETRPCENT_TYPE, $k5_cv_type_setrpcent, [Define as return type of setrpcent])

AC_MSG_CHECKING([return type of endrpcent])
AC_CACHE_VAL(k5_cv_type_endrpcent,
[AC_TRY_COMPILE([#include <netdb.h>
#ifdef __cplusplus
extern "C"
#endif
extern void endrpcent();],
[int i;], k5_cv_type_endrpcent=void, k5_cv_type_endrpcent=int)])
AC_MSG_RESULT($k5_cv_type_endrpcent)
AC_DEFINE_UNQUOTED(ENDRPCENT_TYPE, $k5_cv_type_endrpcent, [Define as return type of endrpcent])
K5_GEN_FILE(include/gssrpc/types.h:include/gssrpc/types.hin)
PASS=tcp
AC_SUBST(PASS)

# for pkinit
AC_ARG_ENABLE([pkinit],
[  --disable-pkinit        disable PKINIT plugin support],,
enable_pkinit=try)
if test "$enable_pkinit" = yes || test "$enable_pkinit" = try; then
  AC_CACHE_CHECK(for a recent enough OpenSSL, k5_cv_openssl_version_okay,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER < 0x00908000L
# error openssl is too old, need 0.9.8
#endif
int i = 1;
])], k5_cv_openssl_version_okay=yes, k5_cv_openssl_version_okay=no)])
  old_LIBS="$LIBS"
  AC_CHECK_LIB(crypto, PKCS7_get_signer_info)
  LIBS="$old_LIBS"
fi
if test "$k5_cv_openssl_version_okay" = yes && (test "$enable_pkinit" = yes || test "$enable_pkinit" = try); then
  K5_GEN_MAKEFILE(plugins/preauth/pkinit)
  PKINIT=yes
elif test "$k5_cv_openssl_version_okay" = no && test "$enable_pkinit" = yes; then
  AC_MSG_ERROR([Version of OpenSSL is too old; cannot enable PKINIT.])
else
  AC_DEFINE([DISABLE_PKINIT], 1, [Define to disable PKINIT plugin support])
  AC_MSG_NOTICE([Disabling PKINIT support.])
  PKINIT=no
fi
AC_SUBST(PKINIT)

# for lib/apputils
AC_REPLACE_FUNCS(daemon)

# for tests/
if test x"$RUNTEST" != x; then
	HAVE_RUNTEST=yes
else
	HAVE_RUNTEST=no
fi
AC_SUBST(HAVE_RUNTEST)

# For Python tests.
AC_CHECK_PROG(PYTHON,python,python)
HAVE_PYTHON=no
if test x"$PYTHON" != x; then
	# k5test.py requires python 2.4 (for the subprocess module).
    	vercheck="import sys;sys.exit((sys.hexversion < 0x2040000) and 1 or 0)"
	if python -c "$vercheck"; then
		HAVE_PYTHON=yes
	fi
fi
AC_SUBST(HAVE_PYTHON)

# for plugins/kdb/db2

# AIX is unusual in that it wants all symbols resolved at link time
#  Fortunately, it will allow us to link the kdb library now, even if
# it is linked again later.
case $krb5_cv_host in
*-*-aix*)
	DB_EXTRA_LIBS=-ldb
	;;
*)
	DB_EXTRA_LIBS=
	;;
esac
AC_SUBST(DB_EXTRA_LIBS)



# Check for thread safety issues.
# (Is there a better place for this?)
# tsfuncs="getpwnam_r getpwuid_r gethostbyname_r getservbyname_r gmtime_r localtime_r"
# Removed getpwnam_r and getpwuid_r because include/configure.in has some
# more careful checks, and may decide to pretend that they're not found if
# the function signatures can't be figured out.
tsfuncs="gethostbyname_r getservbyname_r gmtime_r localtime_r"
AC_CHECK_FUNCS($tsfuncs)
if test "$enable_thread_support" = yes; then
  tsmissing=""
  for ts in $tsfuncs; do
    if eval "test \"\${ac_cv_func_$ts}\" != yes"; then
      tsmissing="$tsmissing $ts"
    fi
  done
  if test "$ac_cv_func_res_nsearch/$ac_cv_lib_resolv_res_nsearch" = "no/no"; then
    tsmissing="$tsmissing res_nsearch"
  fi
  if test "$tsmissing" != ""; then
    AC_MSG_WARN([Some functions that are needed for library thread])
    AC_MSG_WARN([safety appear to be missing.])
    for ts in $tsmissing; do
      AC_MSG_WARN([  missing thread-safe function: $ts])
    done
    AC_MSG_WARN([Without these functions, the installed libraries])
    AC_MSG_WARN([may not be thread-safe.])
  fi # tsmissing not empty
fi # enable_thread_support

# Sadly, we seem to have accidentally committed ourselves in 1.4 to
# an ABI that includes the existence of libkrb5support.0 even
# though random apps should never use anything from it.  And on
# the Mac, to which that didn't apply, we can't use major version 0.

case $krb5_cv_host in
*-*-darwin* | *-*-rhapsody*) SUPPORTLIB_MAJOR=1 ;;
*)			     SUPPORTLIB_MAJOR=0 ;;
esac
AC_SUBST(SUPPORTLIB_MAJOR)


if test "$COM_ERR_VERSION" = k5 ; then
  K5_GEN_MAKEFILE(util/et)
fi
if test "$SS_VERSION" = k5 ; then
  K5_GEN_MAKEFILE(util/ss)
fi


ldap_plugin_dir=""
ldap_lib=""
if test -n "$OPENLDAP_PLUGIN"; then
  AC_CHECK_HEADERS(ldap.h lber.h, :, [AC_MSG_ERROR($ac_header not found)])
  AC_CHECK_LIB(ldap, ldap_init, :, [AC_MSG_ERROR(libldap not found or missing ldap_init)])
  old_LIBS="$LIBS"
  LIBS="$LIBS -lldap"
  AC_CHECK_FUNCS(ldap_initialize ldap_url_parse_nodn ldap_unbind_ext_s ldap_str2dn ldap_explode_dn)
  LIBS="$old_LIBS"

  BER_OKAY=0
  AC_CHECK_LIB(ldap, ber_init, [BER_OKAY=1])
  if test "$BER_OKAY" = "1"; then 
    LDAP_LIBS='-lldap'
  else
    AC_CHECK_LIB(lber, ber_init, [BER_OKAY=1], [AC_MSG_WARN([libber not found])])
    if test "$BER_OKAY" = "1"; then 
      LDAP_LIBS='-lldap -llber'
    else
      AC_ERROR("BER library missing - cannot build LDAP database module")
    fi
  fi
  AC_DEFINE([ENABLE_LDAP], 1, [Define if LDAP KDB support within the Kerberos library (mainly ASN.1 code) should be enabled.])
  AC_SUBST(LDAP_LIBS)

  K5_GEN_MAKEFILE(plugins/kdb/ldap)
  K5_GEN_MAKEFILE(plugins/kdb/ldap/ldap_util)
  K5_GEN_MAKEFILE(plugins/kdb/ldap/libkdb_ldap)
  ldap_plugin_dir='plugins/kdb/ldap plugins/kdb/ldap/ldap_util'
  LDAP=yes
else
  LDAP=no
fi
AC_SUBST(ldap_plugin_dir)
AC_SUBST(LDAP)
# This check is for plugins/preauth/securid_sam2
sam2_plugin=""
old_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_CHECK_LIB(aceclnt, sd_init, [
	     AC_MSG_NOTICE([Enabling RSA securID support])
	     sam2_plugin=plugins/preauth/securid_sam2
	     ])
AC_SUBST(sam2_plugin)
CFLAGS=$old_CFLAGS

# This checks is for plugins/locate/python, which isn't built by
# default, so it's not a big deal that it isn't very good.  We should
# use python-config instead.
PYTHON_LIB=
AC_CHECK_HEADERS(Python.h python2.3/Python.h python2.5/Python.h)
AC_CHECK_LIB(python2.3,main,[PYTHON_LIB=-lpython2.3],
  AC_CHECK_LIB(python2.5,main,[PYTHON_LIB=-lpython2.5]))
AC_SUBST(PYTHON_LIB)


# Kludge for simple server --- FIXME is this the best way to do this?

if test "$ac_cv_lib_socket" = "yes" -a "$ac_cv_lib_nsl" = "yes"; then
	AC_DEFINE(BROKEN_STREAMS_SOCKETS,1,[Define if socket can't be bound to 0.0.0.0])
fi

# Compile with libedit support in ss by default if available.  Compile
# with readline only if asked, to avoid a default GPL dependency.
# Building with readline also breaks the dejagnu test suite.
AC_ARG_WITH([libedit],
	    AC_HELP_STRING([--without-libedit], [do not compile with libedit]),
	    [], [with_libedit=default])
AC_ARG_WITH([readline],
	    AC_HELP_STRING([--with-readline], [compile with GNU Readline]),
	    [], [with_readline=no])
AC_MSG_CHECKING([for readline support])
if test "x$with_readline" = xyes; then
  with_libedit=no
fi
RL_CFLAGS=
RL_LIBS=
if test "x$with_libedit" != xno; then
  if rl_cflags=`pkg-config --cflags libedit 2>&1`; then
    RL_CFLAGS=$rl_cflags
    RL_LIBS=`pkg-config --libs libedit`
    AC_DEFINE([HAVE_LIBEDIT], 1, [Define if building with libedit.])
    AC_MSG_RESULT([using libedit])
  elif test "x$with_libedit" = yes; then
    # We were explicitly asked for libedit and couldn't find it.
    AC_MSG_ERROR([Could not detect libedit with pkg-config.])
  else
    AC_MSG_RESULT([not using any])
  fi
elif test "x$with_readline" = xyes; then
  AC_MSG_RESULT([using GNU Readline])
  AC_CHECK_LIB([readline], [main], :,
	       AC_MSG_FAILURE([Cannot find readline library.]), [-lncurses])
  AC_DEFINE([HAVE_READLINE], 1, [Define if building with GNU Readline.])
  RL_LIBS='-lreadline -lhistory -lncurses'
else
  AC_MSG_RESULT([not using any])
fi
AC_SUBST([RL_CFLAGS])
AC_SUBST([RL_LIBS])

AC_ARG_WITH([system-verto],
  [AC_HELP_STRING([--with-system-verto], [always use system verto library])],
  [], [with_system_verto=default])
VERTO_CFLAGS=
VERTO_LIBS="-lverto"
VERTO_VERSION=k5
if test "x$with_system_verto" != xno; then
  if verto_cflags=`pkg-config --cflags libverto 2>&1`; then
    VERTO_CFLAGS=$verto_cflags
    VERTO_LIBS=`pkg-config --libs libverto`
    VERTO_VERSION=sys
  else
    AC_CHECK_LIB([verto], [verto_set_flags], [VERTO_VERSION=sys],
      [if test "x$with_system_verto" = xyes; then
        AC_MSG_ERROR([cannot detect system libverto])
      fi])
  fi
fi
if test "x$VERTO_VERSION" = xsys; then
  AC_MSG_NOTICE([Using system libverto])
else
  AC_MSG_RESULT([Using built-in libverto])
fi
AC_SUBST([VERTO_CFLAGS])
AC_SUBST([VERTO_LIBS])
AC_SUBST([VERTO_VERSION])

AC_PATH_PROG(GROFF, groff)

# Make localedir work in autoconf 2.5x.
if test "${localedir+set}" != set; then
    localedir='$(datadir)/locale'
fi
AC_SUBST(localedir)

# Build-time default ccache, keytab, and client keytab names.  These
# can be given as variable arguments DEFCCNAME, DEFKTNAME, and
# DEFCKTNAME.  Otherwise, we try to get the OS defaults from
# krb5-config if we can, or fall back to hardcoded defaults.
AC_ARG_VAR(DEFCCNAME, [Default ccache name])
AC_ARG_VAR(DEFKTNAME, [Default keytab name])
AC_ARG_VAR(DEFCKTNAME, [Default client keytab name])
AC_ARG_WITH([krb5-config],
	AC_HELP_STRING([--with-krb5-config=PATH],
		[path to existing krb5-config program for defaults]), ,
        [with_krb5_config=krb5-config])
if test "x$with_krb5_config" != xno; then
	if test "x$with_krb5_config" = xyes; then
		with_krb5_config=krb5-config
	fi
	if $with_krb5_config --help 2>&1 | grep defccname >/dev/null; then
		AC_MSG_NOTICE([Using $with_krb5_config for build defaults])
		: "${DEFCCNAME=`$with_krb5_config --defccname`}"
		: "${DEFKTNAME=`$with_krb5_config --defktname`}"
		: "${DEFCKTNAME=`$with_krb5_config --defcktname`}"
	fi
fi
if test "${DEFCCNAME+set}" != set; then
	DEFCCNAME=FILE:/tmp/krb5cc_%{uid}
fi
if test "${DEFKTNAME+set}" != set; then
	DEFKTNAME=FILE:/etc/krb5.keytab
fi
if test "${DEFCKTNAME+set}" != set; then
	adl_RECURSIVE_EVAL($localstatedir, exp_localstatedir)
	DEFCKTNAME=FILE:$exp_localstatedir/krb5/user/%{euid}/client.keytab
fi
AC_MSG_NOTICE([Default ccache name: $DEFCCNAME])
AC_MSG_NOTICE([Default keytab name: $DEFKTNAME])
AC_MSG_NOTICE([Default client keytab name: $DEFCKTNAME])
AC_DEFINE_UNQUOTED(DEFCCNAME, ["$DEFCCNAME"], [Define to default ccache name])
AC_DEFINE_UNQUOTED(DEFKTNAME, ["$DEFKTNAME"], [Define to default keytab name])
AC_DEFINE_UNQUOTED(DEFCKTNAME, ["$DEFCKTNAME"],
                   [Define to default client keytab name])

AC_CONFIG_FILES([build-tools/krb5-config], [chmod +x build-tools/krb5-config])
AC_CONFIG_FILES([build-tools/kadm-server.pc
	build-tools/kadm-client.pc
	build-tools/kdb.pc
	build-tools/krb5.pc
	build-tools/krb5-gssapi.pc
	build-tools/mit-krb5.pc
	build-tools/mit-krb5-gssapi.pc
	build-tools/gssrpc.pc
])
V5_AC_OUTPUT_MAKEFILE(.

	util util/support util/profile util/profile/testmod util/send-pr
	util/verto

	lib lib/kdb

	lib/crypto lib/crypto/krb lib/crypto/$CRYPTO_IMPL
	lib/crypto/$CRYPTO_IMPL/enc_provider
	lib/crypto/$CRYPTO_IMPL/hash_provider
	lib/crypto/$CRYPTO_IMPL/des
	lib/crypto/$CRYPTO_IMPL/md4 lib/crypto/$CRYPTO_IMPL/md5
        lib/crypto/$CRYPTO_IMPL/sha1 lib/crypto/$CRYPTO_IMPL/sha2
	lib/crypto/$CRYPTO_IMPL/aes lib/crypto/$CRYPTO_IMPL/camellia
	lib/crypto/crypto_tests

	lib/krb5 lib/krb5/error_tables lib/krb5/asn.1 lib/krb5/ccache
dnl	lib/krb5/ccache/ccapi
	lib/krb5/keytab lib/krb5/krb lib/krb5/rcache lib/krb5/os
	lib/krb5/unicode

	lib/gssapi lib/gssapi/generic lib/gssapi/krb5 lib/gssapi/spnego
	lib/gssapi/mechglue

	lib/rpc lib/rpc/unit-test

	lib/kadm5 lib/kadm5/clnt lib/kadm5/srv lib/kadm5/unit-test
	lib/krad
	lib/apputils

dnl	ccapi ccapi/lib ccapi/lib/unix ccapi/server ccapi/server/unix ccapi/test

	kdc slave config-files build-tools man doc include

	plugins/hostrealm/test
	plugins/locate/python
	plugins/localauth/test
	plugins/kadm5_hook/test
	plugins/pwqual/test
	plugins/audit
	plugins/audit/test
	plugins/kdb/db2
	plugins/kdb/db2/libdb2
	plugins/kdb/db2/libdb2/hash
	plugins/kdb/db2/libdb2/btree
	plugins/kdb/db2/libdb2/db
	plugins/kdb/db2/libdb2/mpool
	plugins/kdb/db2/libdb2/recno
	plugins/kdb/db2/libdb2/test
	plugins/kdb/hdb
	plugins/preauth/cksum_body
	plugins/preauth/otp
	plugins/preauth/securid_sam2
	plugins/preauth/wpse
	plugins/authdata/greet
	plugins/authdata/greet_client
	plugins/authdata/greet_server

	clients clients/klist clients/kinit clients/kvno
	clients/kdestroy clients/kpasswd clients/ksu clients/kswitch

	kadmin kadmin/cli kadmin/dbutil kadmin/ktutil kadmin/server
	kadmin/testing kadmin/testing/scripts kadmin/testing/util

	appl
	appl/sample appl/sample/sclient appl/sample/sserver
	appl/simple appl/simple/client appl/simple/server
	appl/gss-sample appl/user_user

	tests tests/resolve tests/asn.1 tests/create tests/hammer
	tests/verify tests/gssapi tests/dejagnu tests/threads tests/shlib
	tests/gss-threads tests/misc tests/mkeystash_compat
	util/gss-kernel-lib util/collected-client-lib
	po
)