diff --git a/.travis.yml b/.travis.yml
index 3f133782d19496b16588f6882473745d4009e95c..8dcbf1fe9d8ed0c7e0f6e9fd433e274485bd54e0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -145,7 +145,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index a126986f3a2599e811c972541c0a9410c4e993a8..4d2d9d222adf58f6b1635497ad7043d6911e63e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -247,3 +247,12 @@ mostlyclean-local:
 clean-local:
 	rm -rf $(top_builddir)/src/rust/target
 	rm -rf $(top_builddir)/src/rust/.cargo/registry
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+	@if test -d "$(distdir)/_build/sub"; then \
+	  cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+	else \
+	  cat $(distdir)/_build/$(TEST_SUITE_LOG); fi