[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using result of AC_PROG_SED as sed program in config.status
From: |
Albert Chin |
Subject: |
Re: Using result of AC_PROG_SED as sed program in config.status |
Date: |
Fri, 7 Jan 2005 17:18:23 -0600 |
User-agent: |
Mutt/1.5.6i |
On Sun, Jan 02, 2005 at 08:51:51AM -0800, Paul Eggert wrote:
> Albert Chin <address@hidden> writes:
>
> > 2004-12-29 Albert Chin-A-Young <address@hidden>
> > Stepan Kasal <address@hidden>
> >
> > * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS,
> > _AC_OUTPUT_FILES): Use the "best" sed as determined by
> > AC_PROG_SED to perform substitutions to work around
> > limitation on some systems by the default sed when
> > the input file contains very long lines. Even if no
> > substitutions are made on these lines, the default sed
> > command might truncate them.
>
> That change caused numerous test failures "make check" because
> config.status used $SED without defining it. So I didn't install it.
> I assume it can be fixed fairly easily.
Oops, patch below.
> Also, Albert, if you're going to make significant changes to Autoconf,
> can you please sign copyright papers with the FSF? That way we can
> incorporate the changes. I'll send you the appropriate info via
> private mail if you don't have it already.
We already have a corporate assignment on file for Autoconf.
--
albert chin (address@hidden)
-- snip snip
2005-01-07 Albert Chin-A-Young <address@hidden>
Stepan Kasal <address@hidden>
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS,
_AC_OUTPUT_FILES): Use the "best" sed as determined by
AC_PROG_SED to perform substitutions to work around
limitation on some systems by the default sed when
the input file contains very long lines. Even if no
substitutions are made on these lines, the default sed
command might truncate them.
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.48
diff -u -3 -p -r1.48 status.m4
--- lib/autoconf/status.m4 21 Dec 2004 14:24:01 -0000 1.48
+++ lib/autoconf/status.m4 7 Jan 2005 23:09:59 -0000
@@ -918,9 +918,9 @@ dnl Here, there are 2 cmd per line, and
(echo [':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b'] && cat "$tmp/subs.frag")
>"$tmp/subs-$ac_sed_frag.sed"
if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f '$tmp/subs-$ac_sed_frag.sed'"
+ ac_sed_cmds="$SED -f '$tmp/subs-$ac_sed_frag.sed'"
else
- ac_sed_cmds="$ac_sed_cmds | sed -f '$tmp/subs-$ac_sed_frag.sed'"
+ ac_sed_cmds="$ac_sed_cmds | $SED -f '$tmp/subs-$ac_sed_frag.sed'"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
@@ -999,7 +999,7 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
dnl Neutralize VPATH when `$srcdir' = `.'.
- sed "$ac_vpsub
+ \$SED "$ac_vpsub
dnl Shell code in configure.ac might set extrasub.
dnl FIXME: do we really want to maintain this feature?
$extrasub
@@ -1273,8 +1273,9 @@ AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [
# Produce config.status. Called by AC_OUTPUT.
# Pay special attention not to have too long here docs: some old
# shells die. Unfortunately the limit is not known precisely...
-m4_define([_AC_OUTPUT_CONFIG_STATUS],
-[AC_MSG_NOTICE([creating $CONFIG_STATUS])
+AC_DEFUN([_AC_OUTPUT_CONFIG_STATUS],
+[AC_REQUIRE([AC_PROG_SED])dnl
+AC_MSG_NOTICE([creating $CONFIG_STATUS])
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
@@ -1285,6 +1286,7 @@ cat >$CONFIG_STATUS <<_ACEOF
debug=false
ac_cs_recheck=false
ac_cs_silent=false
+SED="$SED"
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF