Stepan Kasal wrote: > 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.
And that's the goal, of course... > 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. Not acceptable for us. > 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. A bit convoluted, but EXPSYMS.extra is empty for most systems and I would prefer if it didn't need to exist. Do you know if it need to exist to not trigger some make error/warning in the above 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<------ Automake complains with: configure.in:1545: required file `EXPSYMS.in$expsyms_extra' not found for the 2nd of these, I believe it would complain for the others as well for similar reasons. Do you know of a way to silence that warning? But it works! > I hope some of the above solutions helps. 4) Write code in configure.ac to concatenate the desired EXPSYMS file directly w/o help from AC_SUBST* (@EXTRA_SYMBOLS@ is the only substituted symbol). Thanks for your effort! Cheers, Peter
