Autoconf

Another patches to make the autoconf more complete and a bugfix.