diff --git a/.gitattributes b/.gitattributes
index 6f7c6d8ba52..3639ebcfe55 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -33,3 +33,13 @@ ChangeLog       merge=merge-changelog
 *.[cChH] whitespace=space-before-tab,indent-with-non-tab,trailing-space
 *.exp whitespace=space-before-tab,indent-with-non-tab,trailing-space
 *.tcl whitespace=space-before-tab,indent-with-non-tab,trailing-space
+
+# Autoconf.
+
+*.ac	whitespace=space-before-tab,indent-with-non-tab,trailing-space
+*.m4	whitespace=space-before-tab,indent-with-non-tab,trailing-space
+
+# Generated files.
+
+configure   -whitespace
+aclocal.m4  -whitespace
