From: Akim Demaille <[EMAIL PROTECTED]>
   Date: 25 Feb 2000 15:58:47 +0100

   Ian> The point of autoconf is portability to all machines, not just to
   Ian> all recent machines.

   Please, Ian, give me a little more trust.  I'm looking for wrong
   hypotheses, I'm not trying to make Autoconf selective.

I did not mean to imply that I didn't trust you.  I apologize for the
implication.

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.

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.

   Ian> This machine is a DECstation 3100 running Ultrix 4.0.

   I'm really surprised it doesn't support functions, IIRC I've already
   talked to someone about this precise architecture, and he told me that
   the simple

   #! /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
to use ${toto}.

So Ultrix /bin/sh5 does support functions.  You would still want to
put in the auto-reexec stuff.


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.

Ian

Reply via email to