Modified configure.ac so it works with Werror, also tuned script