autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

carriage return line endings vs. literal ^M in status.m4


From: Jim Meyering
Subject: carriage return line endings vs. literal ^M in status.m4
Date: Sat, 05 Apr 2008 11:48:49 +0200

Hi,

I've been working through some odd problems related to a user's
attempt to build recent coreutils snapshots on a Maemo/OS2008 system.
So far I've hit two problems:
The first affected coreutils only (configure.in):
The second (discovered minutes ago) affects the very latest autoconf:

For context, here's the coreutils patch:

        Accommodate building on Maemo
        * configure.in: Also filter out carriage returns from the value
        of $no_install_progs_default.  Reported by Elbert Pol.

diff --git a/configure.ac b/configure.ac
index 0e101a1..36fc0cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,7 +268,7 @@ done
 v=no_install__progs
 t=`sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
     | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
-    | tr -s '\\012\\\\' '  '`
+    | tr -s '\\015\\012\\\\' '   '`
 # Remove any trailing space.
 no_install_progs_default=`echo "$t"|sed 's/ $//'`

--
1.5.5.rc3.1.gaece

Here's the proposed autoconf patch:


>From 98629eebc4cd905af0484ca8275390f94f3a0da3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 5 Apr 2008 11:27:06 +0200
Subject: [PATCH] Do not use a literal carriage return (it may be the EOL 
marker).

* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Rather than
a literal ^M, derive the byte using echo and tr.
Using the literal would not work on a system using carriage
return as end-of-line marker.  Reported by Elbert Pol.

Signed-off-by: Jim Meyering <address@hidden>
---
 ChangeLog              |    8 ++++++++
 lib/autoconf/status.m4 |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index df454bc..6703cc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-05  Jim Meyering  <address@hidden>
+
+       Do not use a literal carriage return (it may be the EOL marker).
+       * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Rather than
+       a literal ^M, derive the byte using echo and tr.
+       Using the literal would not work on a system using carriage
+       return as end-of-line marker.
+
 2008-04-03  Eric Blake  <address@hidden>

        Fix version number generation in man pages.
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index b4dec08..d6b81fe 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -368,7 +368,7 @@ else
   # The final `:' finishes the AND list.
   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
 fi]])
-ac_cr='
'
+ac_cr=`echo .|tr . '\015'`
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
   ac_cs_awk_cr='\\r'
--
1.5.5.rc3.1.gaece




reply via email to

[Prev in Thread] Current Thread [Next in Thread]