review in the form of a pull request

This is maybe not exactly what you had in mind, but it was quickest for me to adjust the things that I thought needed adjusting myself and then test it.  I have only tested this on a highly-up-to-date Linux system; I mean to test it on a bunch more, weirder platforms, but I may not get to that for a few more days and I didn't want to leave you hanging. (I will also fix and put back the 'gcov' stuff that I deleted.) The first three changesets are actual bugfixes, the next three are cleanup, and the last one is something you probably meant to get to eventually.

Some high-level notes:

As you can probably tell from the diffs, I think the way you had it was a little *over*-commented.  I took out comments that seemed to be just duplicating the code immediately below.  Feel free to put those back if you feel they are necessary.

I think we need to talk a little about exactly how old Autoconf/Automake/Libtool this needs to support.  For Autoconf, 2.59 is so old that I can't find anything that has it now (the oldest I have convenient access to is 2.63); for Libtool, on the other hand, Illumos is still shipping a system libtool that is too old to support LT_INIT, and I can't decide whether I think that means we have to continue using AC_PROG_LIBTOOL (which is how it is now) or whether it means Illumos can go jump in a lake.

I think we don't actually handle the absence of Python correctly (the configure should go through, but 'make check' will bomb out); not sure how much I care.

I unfortunately don't have access to anything ARMed, but I think i do have access to a PPC, will advise.