+# The actual test programs.
+tests_plugin_heimdal_t_CPPFLAGS = $(KRB5_CPPFLAGS)
+tests_plugin_heimdal_t_LDADD = tests/tap/libtap.a portable/libportable.la \
+ $(KRB5_LIBS) $(CDB_LIBS) $(DL_LIBS)
+tests_plugin_mit_t_CPPFLAGS = $(KRB5_CPPFLAGS)
+tests_plugin_mit_t_LDADD = tests/tap/libtap.a portable/libportable.la \
+ $(KRB5_LIBS) $(CDB_LIBS) $(DL_LIBS)
+tests_portable_asprintf_t_SOURCES = tests/portable/asprintf-t.c \
+ tests/portable/asprintf.c
+tests_portable_asprintf_t_LDADD = tests/tap/libtap.a portable/libportable.la
+tests_portable_mkstemp_t_SOURCES = tests/portable/mkstemp-t.c \
+ tests/portable/mkstemp.c
+tests_portable_mkstemp_t_LDADD = tests/tap/libtap.a portable/libportable.la
+tests_portable_snprintf_t_SOURCES = tests/portable/snprintf-t.c \
+ tests/portable/snprintf.c
+tests_portable_snprintf_t_LDADD = tests/tap/libtap.a portable/libportable.la
+tests_portable_strndup_t_SOURCES = tests/portable/strndup-t.c \
+ tests/portable/strndup.c
+tests_portable_strndup_t_LDADD = tests/tap/libtap.a portable/libportable.la
+tests_util_messages_t_LDADD = tests/tap/libtap.a util/libutil.a \
+ portable/libportable.la
+tests_util_messages_krb5_t_LDADD = tests/tap/libtap.a util/libutil.a \
+ portable/libportable.la $(KRB5_LIBS)
+tests_util_xmalloc_LDADD = util/libutil.a portable/libportable.la
+
+# The dictionary is used by the tests and needs to be built first.
+if EMBEDDED_CRACKLIB
+tests/data/dictionary.pwd: cracklib/packer $(srcdir)/cracklib/mkdict \
+ $(srcdir)/tests/data/wordlist
+ mkdir -p tests/data
+ $(srcdir)/cracklib/mkdict $(srcdir)/tests/data/wordlist \
+ | cracklib/packer tests/data/dictionary
+else
+tests/data/dictionary.pwd: $(srcdir)/tests/data/wordlist
+ mkdir -p tests/data
+ cracklib-format $(srcdir)/tests/data/wordlist \
+ | cracklib-packer tests/data/dictionary
+endif