FIXED (hopefully) bugs in autoconf script indicated by Prof. Brian Ripley