skip_all 'no krb5.conf found, put one in tests/data/krb5.conf'
fi
+# Check whether we can run the test at all.
+"$BUILD/heimdal/plugin" 'test@EXAMPLE.COM' 'test' >/dev/null 2>&1
+if [ $? = 42 ] ; then
+ rm -f krb5.conf
+ skip_all 'not built against Heimdal libraries'
+fi
+
# Okay, we should be good to run the test suite.
plan 28
int result;
char error[BUFSIZ] = "";
+ /*
+ * If we're not building with Heimdal, we can't run this test. Exit with
+ * a special status to communicate this to the test wrapper.
+ */
+#ifndef HAVE_KRB5_REALM
+ exit(42);
+#endif
+
/* Build the path of the plugin. */
if (argc != 3) {
fprintf(stderr, "Wrong number of arguments\n");