put g++ version check outside of check_cxx()
put multiarch check into a separate function
make linuxdist variable local because it is not use anywhere else