Make the configure script more intelligent.