| I did not mean to imply that I didn't trust you. I apologize for the
| implication.
I'm sorry for having inferred something which was not derivable :)
| However, I think we can all agree that there are machines which do not
| have shells which support functions. For example, SVR2 machines.
| Those machines are still running. Whether anybody runs autoconf
| generated configure scripts on them, I don't know. I've done it in
| the past, but not in the last several years.
I don't want to give the impression I don't trust your word here, but
I know by experience that in the Autoconf world there are many legends
and myths. I'd like to see someone really trying the various shells
on this machine and report the status of unset and of functions.
In addition, though I agree to be extremely oldish compatible, we
should not still fight for PDP11. Yet Autoconf, as we have recently
discovered is far from being really portable as compared to
Metaconfig. But in practice, AFAIK, *never* this has been reported.
| The fact that nobody on these mailing lists is reporting any old
| machines does not mean that they don't exist or that they aren't
| running.
Definitely not, hence my configure-embedded test-spy suggestion.
| #! /bin/sh5
|
| foo(){ unset toto }
|
| toto=tata
| foo
| echo "{$toto}"
|
| did what was expected.
|
| Still, the presence of unset is a big relief...
|
| Sorry, I was wrong, you're right. I was testing using the optional
| `function' keyword, which does not work, and I missed it in the man
| page because it doesn't use the keyword. Your example does work,
| after I add a semicolon after the `unset toto' and fix the last line
Arg, yes, sorry.
| to use ${toto}.
I meant to highlight the emptiness of toto :)
| So Ultrix /bin/sh5 does support functions. You would still want to
| put in the auto-reexec stuff.
Correct :)
| I personally don't really see why shell functions and unset matter
| much for autoconf proper. You can already use m4 and weird shell
| constructs to implement the same functionality (e.g., instead of
| unsetting a cache variable, set it to the empty string, and test for
| that when necessary). Sure, these features could make the configure
| (not configure.in) script much more attractive, but in an ideal world
| no ordinary person should have to look at the configure script.
| People do have to look at the configure script in practice, but this
| problem will not be solved by using unset or shell functions.
I have no intention to use big functions, but I must confess I'd enjoy
a verbose function, a mkdir function etc. I don't want
AC_CHECK_HEADER to turn into a function. Yet being able to use small
functions would help a lot.
But the fact that unset might be portable is completely different and
opens new horizons (the heck with CDPATH, LANG etc.).
Akim