Tidied configure.ac

Still needs to get correct flags from system