doc: Allow rst2man.py as an alternative to rst2man
Gentoo's dev-python/docutils-0.10 installs Docutils scripts with a
*.py extension, so I have /usr/bin/rst2man.py and no rst2man script.
This patch supports users with both types of systems by checking for
rst2man, falling back on rst2man.py, and giving up only if neither is
found. Users can also set the new RST2MAN path variable explicitly
when they call Make:
make RST2MAN=/my/custom/rst_to_man_converter build-man
I use POSIX's 'command -v' [1] to find the path to rst2man or
rst2man.py, and save that as RST2MAN in Makefile.config. We can use a
non-empty RST2MAN to check for the availability of an rst2man program,
so there's no need for a separate HAVE_RST2MAN. Then pass the
configured RST2MAN path through to prerst2man.py to use in its system
call.
[1]: http://pubs.opengroup.org/onlinepubs/
9699919799/utilities/command.html