On Fri, Oct 05, 2001 at 10:56:04AM +0200, Akim Demaille wrote: > > People, the question is: > > If we look for a reasonable shell and re-exec configure once > we found one, are you OK with keeping $LINENO used in > configure, even if the shell does not treat $LINENO specially? > > *And*, keep in mind the decision involves M4sh too (i.e., Autotest > scripts, M4sh-AdHoC scripts and so on).
There might be problems with re-execing to get a shell that has a feature that you want... invariably, the shell that you use will be *lacking* a feature that someone else wants. I wrote a section about finding a shell that supports functions for the Goat Book: http://sources.redhat.com/autobook/autobook/autobook_214.html#SEC214 But when I tried to add this to libtool, it conflicted with libtool's requirement for a shell that doesn;t mangle backslash escapes. ISTR that there were several systems that couldn;t provide a shell that supplied both :-( In this instance I could have fallen back on using libtool's --fallback-echo, but it felt as though this was moving in the wrong direction... As far as shell functions are concerned, it seems to me that m4sh could provide shell function wrapper macros which expand to a function/function call if that is supported by the shell, or else an inline function if not... although `trap DEBUG' doesn't work very well for functions, so my bashdb debugger will be considerably less effective if shell functions come into common use for configury. Then again, perhaps I am the only one who finds symbolic debugging of shell scripts to be useful ;-) Cheers, Gary. -- ())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org) ( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____ / )= GNU Hacker http://www.gnu.org/software/libtool \' `& `(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
