Re: AS_ECHO and printf

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

 



On Mon, May 22, 2023, at 5:35 AM, Po Lu wrote:
> When did AS_ECHO start to emit calls to `printf'

Git commit 2b59b6f8a79b8bf77e178ff4e5aa0ede433d39cf, dated 2013 Jan 28.
There was some discussion of the trade-offs involved on the bug-autoconf
mailing list four years before that, see
https://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00025.html
et seq.

> and `AS_UNSET' to `unset'?

Commit 26ba5ebd23bcee95d446181b57dac61d7163c041, dated 2008 Oct 14.
Note that in this case, what Autoconf does is *find a shell implementation
that supports unset* and re-exec itself using that.  If it can't find
any such shell, it errors out.

> printf is not portable; it is missing, both as a built-in to ksh and a
> command, on Ultrix 4.5, as well as (AFAIK) Solaris 2.6, the first of
> which is important for historical purposes, and the second of which is
> still found in the wild in some fields.

I would be willing to consider a patch that adds to _AS_DETECT_BETTER_SHELL
a check for support for `printf '%s' "$message"` and `printf '%s\n'
"$message"` (those two constructs specifically), and/or a patch that
partially restores _AS_ECHO_PREPARE such that it attempts to fall back
to `echo [-n]` on systems where the above two constructs don't work.

If you do not have time to develop such a patch, I regret to say that no one
else reading this message is likely to have the time in the near future either.
Also, I myself do not have access to either an Ultrix 4.5 or a Solaris 2.6
installation, so I could not test the patch properly and would have to demand
a lot of specific testing from you.

zw




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux