CFLAGS="-D_GNU_SOURCE -include config-host.h"
BUILD_CFLAGS=""
+cmdstr=$(printf " '%s'" "$0" "$@")
# Print configure header at the top of $config_host_h
-echo "/*" > $config_host_h
-echo " * Automatically generated by configure - do not modify" >> $config_host_h
-printf " * Configured with:" >> $config_host_h
-printf " * '%s'" "$0" "$@" >> $config_host_h
-echo "" >> $config_host_h
-echo " */" >> $config_host_h
-
-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
+cat > $config_host_h <<EOF
+/*
+ * Automatically generated by configure - do not modify
+ * Configured with:
+ * $cmdstr
+ */
+EOF
+
+cat > $config_host_mak <<EOF
+# Automatically generated by configure - do not modify
+# Configured with:
+# $cmdstr
+EOF
do_cc() {
# Run the compiler, capturing its output to the log.