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