On 07/27/2010 03:37 PM, Stefano Lattarini wrote:
>>> I'm used to this variant, with less typing:
>>> : ${AUTOCONF=autoconf}
>>>
>>> But your way works, too.
> Can you confirm it's as portable as the ways suggested in the autoconf 
> manual?  If yes, do you think it could be an useful addition to that 
> manual?

The autoconf manual already states that ${var:=value} doesn't work, and
that if value occupies more than one word, then you need to use quotes
or an intermediate shell variable.  Then there is the Ultrix bug, where
you need var=${var="$val"} to avoid 8-bit cleanliness issues, and the
Solaris bug where $val containing } causes parse problems, leading to
this recommended construct when you are defaulting to an unknown
intermediate value:

      test "${var+set}" = set || var={value}

But by itself, ${var=value} is portable, where value is not a shell
substitution.

http://www.gnu.org/software/autoconf/manual/autoconf.html#Shell-Substitutions

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to