]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Work around CR EOL markers on OS/2 (www.ecomstation.com Ecs v2 rc4)
authorJim Meyering <meyering@redhat.com>
Sat, 5 Apr 2008 15:47:42 +0000 (09:47 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 5 Apr 2008 15:48:35 +0000 (09:48 -0600)
* 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.

ChangeLog
THANKS
lib/autoconf/status.m4

index b4ceb28c5c9643b9b513288be045c1f4e11bed8d..ffeab3c34c84b47e814a518f073f1fd1a6c97839 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-04-05  Jim Meyering  <meyering@redhat.com>
+       and Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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.
+
 2008-04-05  Eric Blake  <ebb9@byu.net>
 
        Avoid some autoreconf -Wall warnings.
diff --git a/THANKS b/THANKS
index bc6dca2b8386a1064cacb59b5926b59ea0e70f1b..5df250d032326474da022719d454c3626c96804a 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -91,6 +91,7 @@ Dietmar P. Schindler        schd@mra.man.de
 Doug Evans                  dje@canuck.cygnus.com
 Dries Kimpe                 ?
 Edouard Bechetoille         ebecheto@ens-lyon.fr
+Elbert Pol                  elbert.pol@gmail.com
 Eli Zaretskii               eliz@gnu.org
 Elias Pipping               pipping@macports.org
 Enrique Robledo Arnuncio    enrique.robledo@wanadoo.es
index b4dec08f7c3ca6041003fef6f442dd01964081f8..d7b95a7365c8dc9b6fec239d28d36829d0adb558 100644 (file)
@@ -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