* Alexandre Julliard wrote on Wed, Jun 21, 2006 at 09:00:45PM CEST:
> Ralf Wildenhues <[EMAIL PROTECTED]> writes:
> > * Paul Eggert wrote on Tue, Jun 20, 2006 at 10:43:04PM CEST:
> >> OK, but the new test he added (marked '+' below):
> >>
> >> { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; }
> >> &&
> >> + { ac_out=`sed -n '/^[[ ]]*datarootdir[[ ]]*:*=/p' "$tmp/out"`;
> >> test -z "$ac_out"; } &&
> >>
> >> looks pretty portable to me. If it breaks, then I'd expect the
> >> existing sed-based test to break too.
> >
> > Well. This change causes us to issue a warning for an empty .in file.
> > So, apologies for rejecting it for the wrong reason. ;-)
>
> The change only adds an extra condition that must be fulfilled,
No. The previous post-sed check tested for presence of literal
${datarootdir}
You test checks for _absence_ of something that resembles an
initialization of the `datarootdir' variable.
> so all
> it can do is silence the existing warning, I don't see how it can
> possibly cause an extra warning (and I certainly don't see one here
> with an empty .in file).
Apply your patch, rebuild and reinstall Autoconf, then:
cat >configure.ac <<EOF
AC_INIT
AC_CONFIG_FILES(foo)
AC_OUTPUT
EOF
touch foo.in
autoconf
./configure
| configure: creating ./config.status
| config.status: creating foo
| config.status: WARNING: foo contains a reference to the variable `datarootdir'
| which seems to be undefined. Please make sure it is defined.
Cheers,
Ralf