* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Use a portable

combination of Awk and sed to replace $LINENO.
This commit is contained in:
Akim Demaille 2001-10-04 15:24:31 +00:00
parent 41347f082c
commit 42b48aec23
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2001-10-04 Akim Demaille <akim@epita.fr>
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Use a portable
combination of Awk and sed to replace $LINENO.
2001-10-02 Paul Eggert <eggert@twinsun.com>
* doc/autoconf.texi (Limitations of Builtins): You can't use

View File

@ -143,12 +143,12 @@ if test "x$as_lineno_1" = "x$as_lineno_2" ||
!= x$as_me.lineno; then
# Be sure to write the pattern so that it doesn't replace itself:
# it must not match itself.
awk '{
if ($[0] ~ /[[$]]LINENO/)
while (sub (/[[$]]LINENO/, NR))
continue
print
}' <$as_myself >$as_me.lineno
awk <$as_myself '
/[[$]]LINENO/ { printf "%d:", NR }
{ print }
' |
sed ['/[$]LINENO/s/^\([0-9][0-9]*\):\(.*\)[$]LINENO/\2\1/'] \
>$as_me.lineno
chmod +x $as_me.lineno
fi