Adapted for recent autoconf and automake