[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 02-lineno.patch
From: |
Akim Demaille |
Subject: |
Re: 02-lineno.patch |
Date: |
27 Sep 2001 10:36:52 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
Here is my fix. Thanks a brand lot!
I have still not understood your srcdir comment. configure does not
pay attention to $0, does it?
Index: ChangeLog
from Akim Demaille <address@hidden>
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix bugs spotted by
Raja R Harinath:
Be sure to detect when $LINENO always returns the same value.
Look for the original script, basename($0) is certainly not
enough.
Pass the CLI arguments to $as_me.lineno.
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvs/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.50
diff -u -u -r1.50 m4sh.m4
--- lib/m4sugar/m4sh.m4 2001/09/22 15:20:45 1.50
+++ lib/m4sugar/m4sh.m4 2001/09/27 08:26:11
@@ -120,15 +120,26 @@
# configure. Hence a useless rewrite (not to mention the risk of
# ``infinite'' rewrites. Merely check that LINENO is incremented
# between two lines, which is a property guaranteed for _oline_, hence
-# it protects us from repetitive rewrites.
+# it protects us from repetitive rewrites. Be sure to have a test
+# that does detect non LINENO support...
as_lineno_1=$LINENO
as_lineno_2=$LINENO
-# Compute as_lineno_1 in two steps: some shells restart LINENO for
-# subshells.
-as_lineno_1=`(expr $as_lineno_1 + 1) 2>/dev/null`
-if test "x$as_lineno_1" != "x$as_lineno_2"; then
+as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+if test "x$as_lineno_1" = "x$as_lineno_2" ||
+ test "x$as_lineno_3" != "x$as_lineno_2";
+ then
+ # Find who we are.
+ case $[0] in
+ *[[\\/]]* | ?:[[\\/]]* ) as_myself=$[0] ;;
+ *) _AS_PATH_WALK([],
+ [test -r "$as_dir/$[0]" && as_myself=$as_dir/$[0] && break])
+ ;;
+ esac
+ if test ! -f $as_myself; then
+ AS_ERROR([cannot find myself; rerun with an absolute path])
+ fi
if test ! -f $as_me.lineno ||
- test x`ls -1dt $as_me.lineno $as_me 2>/dev/null | sed 1q` \
+ test x`ls -1dt $as_me.lineno $as_myself 2>/dev/null | sed 1q` \
!= x$as_me.lineno; then
# Be sure to write the pattern so that it doesn't replace itself:
# it must not match itself.
@@ -137,10 +148,10 @@
while (sub (/[[$]]LINENO/, NR))
continue
print
- }' <$as_me >$as_me.lineno
+ }' <$as_myself >$as_me.lineno
chmod +x $as_me.lineno
fi
- exec ${SHELL-/bin/sh} ./$as_me.lineno
+ exec ${SHELL-/bin/sh} ./$as_me.lineno ${1+"address@hidden"}
fi
_AS_CR_PREPARE
- Re: 02-lineno.patch, (continued)
- Re: 02-lineno.patch, Alexandre Duret-Lutz, 2001/09/23
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/25
- Re: 02-lineno.patch, Akim Demaille, 2001/09/27
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/27
- Re: 02-lineno.patch, Akim Demaille, 2001/09/27
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/27
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/27
- Re: 02-lineno.patch, Akim Demaille, 2001/09/29
- Re: 02-lineno.patch, Akim Demaille, 2001/09/27
Re: 02-lineno.patch,
Akim Demaille <=