diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-05 09:47:42 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-04-05 09:48:35 -0600 |
commit | 237cb75c4babfad37e7cce63907cddc039fcd996 (patch) | |
tree | 2ad30383d88d9a650110c1eac83a00a323d077bc /lib | |
parent | eb06dd76c9abf946a7e44c846c7e7206d5d94e89 (diff) | |
download | autoconf-237cb75c4babfad37e7cce63907cddc039fcd996.tar.gz |
Work around CR EOL markers on OS/2 (www.ecomstation.com Ecs v2 rc4)
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When CR
is the EOL marker, skip a step that would remove and translate
carriage return bytes.
* THANKS: Update.
Reported by Elbert Pol.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/autoconf/status.m4 | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index b4dec08f..d7b95a73 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -539,8 +539,22 @@ m4_ifdef([_AC_SUBST_FILES], [\$ac_cs_awk_pipe_fini]) _ACAWK _ACEOF +dnl See if CR is the EOL marker. If not, remove any EOL-related +dnl ^M bytes and escape any remaining ones. If so, just use mv. +dnl In case you're wondering how ^M bytes can make it into subs1.awk, +dnl [from Ralf Wildenhues] one way is if you have e.g., +dnl AC_SUBST([variable_that_contains_cr], [" +dnl "]) +dnl The original aim was that users should be able to substitute any +dnl characters they like (except for \0). And the above is not so +dnl unlikely if the configure script itself happens to be converted +dnl to w32 text mode. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || AC_MSG_ERROR([could not setup config files machinery]) _ACEOF |