diff --git a/m4/libtool.m4 b/m4/libtool.m4
index ee292af..1fd3720 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -723,7 +723,9 @@ _LT_CONFIG_SAVE_COMMANDS([
 
     cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
+    if test -e "$cfgfile" ; then
+      $RM "$cfgfile"
+    fi
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
