configure.ac: move detection of clang to separate file