libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Add an XSI replacement for func_split_short_opt.


From: Gary V. Vaughan
Subject: Re: [PATCH] Add an XSI replacement for func_split_short_opt.
Date: Tue, 29 Jun 2010 22:09:29 +0700

Hi Eric,

On 29 Jun 2010, at 21:03, Eric Blake wrote:
> On 06/29/2010 12:52 AM, Gary V. Vaughan wrote:
>>>>> i=$((i+1))
>> 
>> I think we can't rely on the availability of $((expr)) :(
> 
> Is there any shell that supports XSI but not $(()), seeing as how both
> are mandated by POSIX?  But we've already come up with better
> alternatives, so this is a moot point.

I have no idea, but you make a good point.  Currently libtool is testing
for every non-basic feature it uses - which is still a giant leap forward
from just a few years ago where we were still afraid to use functions!

>> However, I think that will be considerably slower than the ${1:0:2}/${1:2}
>> approach.  But we're probably talking microseconds... so I'm open to
>> advice on whether to use bash/ksh variable substrings exclusively (as per
>> current master); XSI exclusively (although we make heavy use of += already
>> if it is available, so not really exclusively); or to prefer substring
>> syntax over the XSI syntax if either or both are available, falling back
>> on sed if necessary?
> 
> Ultimately, I'd like to fix m4sh to make it easier to probe/require XSI
> support, but that will have to wait until after autoconf 2.66.

While that might turn out to be useful elsewhere (I wrote a quick esyscmd
to check for the things that Libtool needs, so it's not difficult in
principle), it's not useful for Autotools as things stand right now, since
m4sh generally runs on the developers machine to generate scripts that are
shipped and executed on the user's shell.

It might be nice if a future Autotools does the m4sh->sh generation from
some AC_macros that expand at distribution time but are still executed on
the user's machine - but then we are requiring that the user have modern
GNU m4 available, which might not be smart.

Cheers,
-- 
Gary V. Vaughan (address@hidden)



reply via email to

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