bug-autoconf
[Top][All Lists]
Advanced

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

Re: "The `-a', `-o', `(', and `)' operands are not portable": please cla


From: Reuben Thomas
Subject: Re: "The `-a', `-o', `(', and `)' operands are not portable": please clarify
Date: Fri, 7 Aug 2009 12:34:54 +0100

2009/8/7 Paolo Bonzini <address@hidden>:
> If you write a script with
>
> #! /bin/sh
>
> then yes, you cannot program to _any_ standard.

That's pretty pessimistic then. I hope that we still aspire to one day
finding a POSIX shell in /bin/sh? Solutions like m4sh are all very
well, but they have two problems:

1. They are specific to the systems in which they are embedded (here, autoconf).

2. They are Yet Another Thing to learn.

Working to make /bin/sh be a POSIX shell is a much bigger win in the
long term, so I hope that M4sh doesn't come at the expense of that.
(Of course I appreciate that the advantage of M4sh is that it can be
made to work irrespective of anything outside the autoconf
environment, so that it makes it possible to write portable code
today, without external support.)

> If you use M4sh, then you have access to almost all useful functionality
> (e.g. shell functions).

I see that the sentence "For the time being it is not mature enough to
be widely used" has been removed as of autoconf 2.64, which is good
news.

So does that mean that shell code written in autoconf should use M4sh
now? The documentation for M4sh is a bit unclear on matters like
exactly what features one can rely on without needing M4sh, and which
features would need M4sh support but don't yet have it. In short, it's
not clear what the language is that one is writing in when using M4sh.
Does one have to call AS_INIT in configure.ac before using other M4sh
functions? AS_INIT's documentation is a bit odd, because AS_INIT
doesn't provide a portable version of a shell function, whereas most
of the other macros documented do. Similarly, it's unclear what the
use of AS_BOURNE_COMPATIBLE is: what does "more compatible" mean? Why
isn't it always implied in AS_INIT? &c.

In summary, M4sh looks promising, but confusing. Now that it's no
longer marked for internal use only, I hope the documentation that
will enable users to use it will follow; however, I hope also that
autoconf will continue to recommend and encourage the use of standards
wherever possible, and not prefer proprietary solutions like M4sh.

-- 
http://rrt.sc3d.org
L’art des vers est de transformer en beautés les faiblesses (Aragon)




reply via email to

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