bug-autoconf
[Top][All Lists]
Advanced

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

Re: AC_SUBST_FILE regression in -cvs


From: Stepan Kasal
Subject: Re: AC_SUBST_FILE regression in -cvs
Date: Mon, 11 Jul 2005 18:06:49 +0200
User-agent: Mutt/1.4.1i

Hello,

On Mon, Jul 11, 2005 at 01:53:09PM +0200, Peter Ekberg wrote:
> With autoconf-cvs the @EXTRA_SYMBOLS@ is no longer found
> [...]  Moving @EXTRA_SYMBOLS@ to a line of its own is not
> a solution here since the EXPSYMS file should not have
> any blank lines.

with autoconf-cvs, @EXTRA_SYMBOLS@ has to be on a line of its own.
The whole line is deleted and replaced by the contents of the file.

So, actually, if EXPSYMS.in were
------8<------
foo
bar
@EXTRA_SYMBOLS@
------8<------
you'd get exactly what you want.

I believe this behaviour is more intuitive than the previous one
(delete @EXTRA_SYMBOLS@ from the line and add the contents of the file
after that line).

The problem is that if the resulting file is sensitive about extra
whitespace, you cannot construct configure.ac which would work with
both versions.

I see several possible solutions:

1) All your developers (those who don't get their configure from the
dist tarball) switch to autoconf-cvs and you can use the simple solution
suggested above.

2) If @EXTRA_SYMBOLS@ is the only substituted symbol in EXPSYMS.in,
you could use a makefile rule to create EXPSYMS:
------8<------
EXPSYMS: EXPSYMS.in EXPSYMS.extra
        cat EXPSYMS.in EXPSYMS.extra >$@
------8<------
EXPSYMS.extra can be generated either by ./configure, or by another
make rule.

3) If there are more AC_SUBSTs in EXPSYMS.in, you can make use of the
fact that EXPSYMS can have more sources, not only EXPSYMS.in.

For example:
------8<------
rm -f EXPSYMS.extra
if text $extra = yes; then
        echo '_foo
_bar' >EXPSYMS.extra
else
        >EXPSYMS.extra
fi
AC_CONFIG_FILES([EXPSYMS:EXPSYMS.in:EXPSYMS.extra])
------8<------
or perhaps
------8<------
expsyms_extra=
if text $extra = yes; then
        expsyms_extra=:EXPSYMS.extra
        rm -f EXPSYMS.extra
        echo '_foo
_bar' >EXPSYMS.extra
fi
AC_CONFIG_FILES([EXPSYMS:EXPSYMS.in$expsyms_extra])
------8<------
or
------8<------
if text $extra = no; then
        expsyms_src=EXPSYMS.in
else
        expsyms_src=EXPSYMS.in:EXPSYMS.extra
        rm -f EXPSYMS.extra
        echo '_foo
_bar' >EXPSYMS.extra
fi
AC_CONFIG_FILES([EXPSYMS:$expsyms_src])
------8<------

I hope some of the above solutions helps.

Have a nice day,
        Stepan Kasal




reply via email to

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