+# AT_CHECK_SPACES([FILE])
+# -----------------------
+# Make sure we did not introduce bad spaces. Checked here because all
+# the skeletons are (or should be) exercized here.
+m4_define([AT_CHECK_SPACES],
+[# No initial empty lines.
+AT_CHECK([sed -ne '/./q;=;p;' $1])
+# No trailing spaces.
+AT_CHECK([sed -ne '/[ ]$/{=;p;}' $1])
+# No tabulations.
+AT_CHECK([sed -ne '/[ ]/{=;p;}' $1])
+# No final empty lines.
+AT_CHECK([sed -ne '${/^$/{=;p;};}' $1])
+])
+
+