TS-1838 Improve the compiler handling a bit in configure.ac.