Switch to autoconf to find libraries.