On 1/10/19 3:42 AM, Leonid Bloch wrote:

> If you've noticed, the original script was in AWK. But to be as generic 
> as possible, I didn't write the generation script in AWK because even 
> AWK is not guaranteed to be installed on the build system. The only 
> interpreted language that is guaranteed to be there is shell (most basic 
> shell) because .configure itself needs it.
> 
> Sure, the script could be prettier and shorter, but I wanted to keep it 
> compatible with the most basic shell, not only Bash, and without needing 
> external programs.

awk is portable - autoconf-generated scripts assume it exists (same as
sed, grep, ls, ...) if you have a /bin/sh. In fact, the GNU Coding
Standards has a nice list of programs that you can blindly assume exist.
 It's true you may have to use a lowest-common-denominator when using
the tools that are globally available to be portable (not all awk
scripts are portable, even if awk is universally available on systems
with a Bourne-like shell).  So avoiding awk on the grounds that it might
not be present is the wrong approach.

> Eric - thanks for the comment about 'local' - I will get rid of it if we 
> decide to include this patch.

I'm still not convinced we need it.  I would much rather see a patch
that makes QemuOpt accept default integer values as integers rather than
as strings, so we don't have to worry about stringifying special macros.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to