diff --git a/ChangeLog b/ChangeLog
index 32a2775c469f1e0e8786dff9f8719e84a93a4bd8..38f85c1611e69950175d2910cd123c746a535b71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2008-09-08  Niels M�ller  <nisse@lysator.liu.se>
 
+	* Makefile.in (stamp-h.in): Use $(AUTOHEADER).
+
 	* x86_64/sha1-compress.asm: New x86_64 assembler, based on the x86
 	version.	
 
diff --git a/Makefile.in b/Makefile.in
index cbf3de1c9e834157d25b81f0062db2e5acde8680..666642952aeb449a591f5cc7b4185e486986af0d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -226,7 +226,7 @@ configure: configure.ac aclocal.m4
 # autoheader might not change config.h.in, so touch a stamp file.
 config.h.in: stamp-h.in
 stamp-h.in: configure.ac aclocal.m4
-	cd $(srcdir) && autoheader
+	cd $(srcdir) && $(AUTOHEADER)
 	echo timestamp > $(srcdir)/stamp-h.in
 
 config.status: configure