diff --git a/src/run_autoconfig b/src/run_autoconfig
index f0e24f897e65bebe75a3132f6f3e3c8694044c08..a20499883d0654a93b7512da714b4dc0d3a7fb81 100755
--- a/src/run_autoconfig
+++ b/src/run_autoconfig
@@ -8,7 +8,7 @@ fix()
 {
   if [ -f $1/acconfig.h ]; then
     echo "Running autoheader in $1"
-    ( cd $1 ; autoheader && echo foo >$1/stamp-h.in )
+    ( cd $1 ; autoheader && echo foo >stamp-h.in )
   fi
 
   if [ -f $1/configure.in ]; then