v1 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html
v2 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00152.html
v3:
- Use optarg != NULL as a sentinel for has_arg.
- Moved some variable decls into the inner loop.
- Make nbdkit wrapper depend on config.status, so if srcdir or
builddir changes then we rebuild the wrapper. It probably does so
anyway because <config.h> will change, but let's be safe.
- Document NBDKIT_VALGRIND=1 and NBDKIT_GDB=1.
- Add two extra patches which fix existing uses of NBDKIT_VALGRIND.
- Retested (make check && make check-valgrind).
Rich.