diff --git a/Makefile b/Makefile
index b15003f9d21c47117431e8cc40d5c7c5e8f83a97..073f18b3f29d4e033ef70b1474926679b8ffd51e 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,14 @@ CONFIG_ALL=y
 include $(SRC_PATH)/rules.mak
 config-host.mak: $(SRC_PATH)/configure
 	@echo $@ is out-of-date, running configure
-	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
+	@# TODO: The next lines include code which supports a smooth
+	@# transition from old configurations without config.status.
+	@# This code can be removed after QEMU 1.7.
+	@if test -x config.status; then \
+	    ./config.status; \
+        else \
+	    sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \
+	fi
 else
 config-host.mak:
 ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
diff --git a/configure b/configure
index 9addff190a2f0fa8c25540d9c7d9a305cab02216..a1cc5be69ead3fb9988608fa241cf2458d7c4190 100755
--- a/configure
+++ b/configure
@@ -27,6 +27,19 @@ printf " '%s'" "$0" "$@" >> config.log
 echo >> config.log
 echo "#" >> config.log
 
+# Save the configure command line for later reuse.
+cat <<EOD >config.status
+#!/bin/sh
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+EOD
+printf "exec" >>config.status
+printf " '%s'" "$0" "$@" >>config.status
+echo >>config.status
+chmod +x config.status
+
 error_exit() {
     echo
     echo "ERROR: $1"
@@ -3757,8 +3770,6 @@ config_host_mak="config-host.mak"
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
 
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
-printf "# Configured with:" >> $config_host_mak
-printf " '%s'" "$0" "$@" >> $config_host_mak
 echo >> $config_host_mak
 
 echo all: >> $config_host_mak