rework backend detection in configure.